SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
correctionmesh.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__CORRECTION_MESH__H__
10
#define __SGCT__CORRECTION_MESH__H__
11
12
#include <sgct/sgctexports.h>
13
14
#include <filesystem>
15
#include <optional>
16
17
namespace
sgct
{
18
19
namespace
correction
{
struct
Buffer
; }
20
class
BaseViewport
;
21
26
class
SGCT_EXPORT
CorrectionMesh
{
27
public
:
41
void
loadMesh
(
const
std::filesystem::path& path,
BaseViewport
& parent,
42
bool
needsMaskGeometry =
false
,
bool
textureRenderMode =
false
);
43
47
void
renderQuadMesh
()
const
;
48
52
void
renderWarpMesh
()
const
;
53
57
void
renderMaskMesh
()
const
;
58
59
private
:
60
struct
CorrectionMeshGeometry {
61
CorrectionMeshGeometry(
const
correction::Buffer
& buffer);
62
CorrectionMeshGeometry(CorrectionMeshGeometry&&) noexcept;
63
~CorrectionMeshGeometry();
64
65
CorrectionMeshGeometry& operator=(CorrectionMeshGeometry&&) noexcept = default;
66
67
void
render() const;
68
69
unsigned
int
vao = 0;
70
unsigned
int
vbo = 0;
71
unsigned
int
ibo = 0;
72
unsigned
int
nVertices = 0;
73
unsigned
int
nIndices = 0;
74
unsigned
int
type = 0x0005;
// = GL_TRIANGLE_STRIP;
75
};
76
77
std::optional<CorrectionMeshGeometry> _quadGeometry;
78
std::optional<CorrectionMeshGeometry> _warpGeometry;
79
std::optional<CorrectionMeshGeometry> _maskGeometry;
80
};
81
82
}
// namespace sgct
83
84
#endif
// __SGCT__CORRECTION_MESH__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::CorrectionMesh::renderQuadMesh
void renderQuadMesh() const
Render the final mesh where for mapping the frame buffer to the screen.
sgct::CorrectionMesh::loadMesh
void loadMesh(const std::filesystem::path &path, BaseViewport &parent, bool needsMaskGeometry=false, bool textureRenderMode=false)
This function finds a suitable parser for warping meshes and loads them.
sgct::CorrectionMesh::renderWarpMesh
void renderWarpMesh() const
Render the final mesh where for mapping the frame buffer to the screen.
sgct::CorrectionMesh::renderMaskMesh
void renderMaskMesh() const
Render the final mesh where for mapping the frame buffer to the screen.
sgct::correction
Definition
buffer.h:16
sgct
Definition
actions.h:16
sgct::correction::Buffer
Definition
buffer.h:18
sgct
correctionmesh.h
Generated by
1.18.0