SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
sphericalmirror.h
Go to the documentation of this file.
1
/*****************************************************************************************
2
* SGCT *
3
* Simple Graphics Cluster Toolkit *
4
* *
5
* Copyright (c) 2012-2026 *
6
* For conditions of distribution and use, see copyright notice in LICENSE.md *
7
****************************************************************************************/
8
9
#ifndef __SGCT__SPHERICALMIRROR__H__
10
#define __SGCT__SPHERICALMIRROR__H__
11
12
#include <sgct/sgctexports.h>
13
#include <
sgct/projection/nonlinearprojection.h
>
14
15
#include <
sgct/correctionmesh.h
>
16
#include <
sgct/shaderprogram.h
>
17
18
namespace
sgct
{
19
20
namespace
config
{
struct
SphericalMirrorProjection
; }
21
class
BaseViewport
;
22
class
User
;
23
class
Window
;
24
28
class
SGCT_EXPORT
SphericalMirrorProjection
final :
public
NonLinearProjection
{
29
public
:
30
SphericalMirrorProjection
(
const
config::SphericalMirrorProjection
&
config
,
31
const
Window
& parent,
User
& user);
32
~SphericalMirrorProjection
() final;
33
34
void
update
(const
vec2
& size) const override;
35
39
void
render
(const
BaseViewport
& viewport,
FrustumMode
frustumMode) const override;
40
44
void
renderCubemap
(
FrustumMode
frustumMode) const override;
45
52
void
setTilt
(
float
angle);
53
54
private:
55
void
initTextures(
unsigned
int
internalFormat) override;
56
void
initVBO() override;
57
void
initViewports() override;
58
void
initShaders() override;
59
60
float
_tilt;
61
float
_diameter = 2.4f;
62
63
// mesh data
64
CorrectionMesh
_meshBottom;
65
CorrectionMesh
_meshLeft;
66
CorrectionMesh
_meshRight;
67
CorrectionMesh
_meshTop;
68
std::
string
_meshPathBottom;
69
std::
string
_meshPathLeft;
70
std::
string
_meshPathRight;
71
std::
string
_meshPathTop;
72
73
// shader locations
74
int
_texLoc = -1;
75
int
_matrixLoc = -1;
76
ShaderProgram
_shader;
77
ShaderProgram
_depthCorrectionShader;
78
};
79
80
}
// namespace sgct
81
82
#endif
// __SGCT__SPHERICALMIRROR__H__
sgct::BaseViewport
This class holds and manages viewportdata and calculates frustums.
Definition
baseviewport.h:27
sgct::CorrectionMesh
Helper class for reading and rendering a correction mesh.
Definition
correctionmesh.h:26
sgct::NonLinearProjection::NonLinearProjection
NonLinearProjection(const Window &parent)
sgct::ShaderProgram
Class for handling compiling, linking and using shader programs.
Definition
shaderprogram.h:24
sgct::SphericalMirrorProjection::update
void update(const vec2 &size) const override
sgct::SphericalMirrorProjection::render
void render(const BaseViewport &viewport, FrustumMode frustumMode) const override
Render the non linear projection to currently bounded FBO.
sgct::SphericalMirrorProjection::renderCubemap
void renderCubemap(FrustumMode frustumMode) const override
Render the enabled faces of the cubemap.
sgct::SphericalMirrorProjection::SphericalMirrorProjection
SphericalMirrorProjection(const config::SphericalMirrorProjection &config, const Window &parent, User &user)
sgct::SphericalMirrorProjection::setTilt
void setTilt(float angle)
Set the dome tilt angle used in the spherical mirror renderer.
sgct::SphericalMirrorProjection::~SphericalMirrorProjection
~SphericalMirrorProjection() final
sgct::User
Helper class for setting user variables.
Definition
user.h:24
sgct::Window
Definition
window.h:46
correctionmesh.h
sgct::config
Definition
clustermanager.h:22
sgct
Definition
actions.h:16
sgct::FrustumMode
FrustumMode
Definition
definitions.h:23
nonlinearprojection.h
shaderprogram.h
sgct::config::SphericalMirrorProjection
Definition
config.h:263
sgct::vec2
Definition
math.h:47
sgct
projection
sphericalmirror.h
Generated by
1.18.0