SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
viewport.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__VIEWPORT__H__
10
#define __SGCT__VIEWPORT__H__
11
12
#include <sgct/sgctexports.h>
13
#include <
sgct/baseviewport.h
>
14
15
#include <
sgct/correctionmesh.h
>
16
#include <
sgct/window.h
>
17
#include <cstdint>
18
#include <filesystem>
19
#include <memory>
20
21
namespace
sgct
{
22
23
namespace
config
{
struct
Viewport
; }
24
class
NonLinearProjection
;
25
29
class
SGCT_EXPORT
Viewport
final :
public
BaseViewport
{
30
public
:
31
Viewport
(
const
config::Viewport
& viewport,
const
Window
& parent);
32
~Viewport
()
override
;
33
34
void
initialize
(
vec2
size
,
bool
hasStereo,
unsigned
int
internalFormat,
35
uint8_t samples);
36
37
void
loadData
();
38
39
void
calculateFrustum
(
FrustumMode
mode,
float
nearClip,
float
farClip)
override
;
40
41
void
renderQuadMesh
()
const
;
42
void
renderWarpMesh
()
const
;
43
void
renderMaskMesh
()
const
;
44
45
bool
hasOverlayTexture
()
const
;
46
bool
hasBlendMaskTexture
()
const
;
47
bool
hasBlackLevelMaskTexture
()
const
;
48
bool
hasSubViewports
()
const
;
49
bool
isTracked
()
const
;
50
unsigned
int
overlayTextureIndex
()
const
;
51
unsigned
int
blendMaskTextureIndex
()
const
;
52
unsigned
int
blackLevelMaskTextureIndex
()
const
;
53
NonLinearProjection
*
nonLinearProjection
()
const
;
54
55
private
:
56
CorrectionMesh
_mesh;
57
std::filesystem::path _overlayFilename;
58
std::filesystem::path _blendMaskFilename;
59
std::filesystem::path _blackLevelMaskFilename;
60
std::filesystem::path _meshFilename;
61
bool
_isTracked;
62
bool
_useTextureMappedProjection =
false
;
63
unsigned
int
_overlayTextureIndex = 0;
64
unsigned
int
_blendMaskTextureIndex = 0;
65
unsigned
int
_blackLevelMaskTextureIndex = 0;
66
67
std::unique_ptr<NonLinearProjection> _nonLinearProjection;
68
};
69
70
}
// namespace sgct
71
72
#endif
// __SGCT__VIEWPORT__H__
baseviewport.h
sgct::BaseViewport::BaseViewport
BaseViewport(const Window &parent, FrustumMode eye=FrustumMode::Mono)
sgct::BaseViewport::size
const vec2 & size() const
sgct::CorrectionMesh
Helper class for reading and rendering a correction mesh.
Definition
correctionmesh.h:26
sgct::NonLinearProjection
Base class for non-linear projections.
Definition
nonlinearprojection.h:27
sgct::Viewport::renderMaskMesh
void renderMaskMesh() const
sgct::Viewport::isTracked
bool isTracked() const
sgct::Viewport::~Viewport
~Viewport() override
sgct::Viewport::Viewport
Viewport(const config::Viewport &viewport, const Window &parent)
sgct::Viewport::blendMaskTextureIndex
unsigned int blendMaskTextureIndex() const
sgct::Viewport::initialize
void initialize(vec2 size, bool hasStereo, unsigned int internalFormat, uint8_t samples)
sgct::Viewport::blackLevelMaskTextureIndex
unsigned int blackLevelMaskTextureIndex() const
sgct::Viewport::renderWarpMesh
void renderWarpMesh() const
sgct::Viewport::overlayTextureIndex
unsigned int overlayTextureIndex() const
sgct::Viewport::hasBlendMaskTexture
bool hasBlendMaskTexture() const
sgct::Viewport::loadData
void loadData()
sgct::Viewport::hasOverlayTexture
bool hasOverlayTexture() const
sgct::Viewport::hasSubViewports
bool hasSubViewports() const
sgct::Viewport::nonLinearProjection
NonLinearProjection * nonLinearProjection() const
sgct::Viewport::hasBlackLevelMaskTexture
bool hasBlackLevelMaskTexture() const
sgct::Viewport::renderQuadMesh
void renderQuadMesh() const
sgct::Viewport::calculateFrustum
void calculateFrustum(FrustumMode mode, float nearClip, float farClip) override
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
sgct::config::Viewport
Definition
config.h:295
sgct::vec2
Definition
math.h:47
window.h
sgct
viewport.h
Generated by
1.18.0