VR-Forces 4.5 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvGraphicsUtils
DtGLRenderToTexture.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2017 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
#pragma once
6
8
9
#include "
DtGraphicsUtilsPreReqs.h
"
10
#include "
DtDataFormat.h
"
11
12
#include <vector>
13
#include <string>
14
15
namespace
makVrv
16
{
17
class
DT_DLL_VRVGRAPHICSUTILS
DtGLRenderTexture
18
{
19
public
:
20
DtGLRenderTexture
(
int
width,
int
height, GLenum internalFormat,
bool
hasDepth);
21
virtual
~
DtGLRenderTexture
();
22
23
void
activateForDrawingInto(
void
);
24
void
deactivateForDrawingInto(
void
);
25
26
void
bindColorTexture(
int
unit);
27
void
unbindColorTexture(
int
unit);
28
29
int
getWidth(
void
)
const
;
30
int
getHeight(
void
)
const
;
31
private
:
32
unsigned
myColorTextureID
;
33
unsigned
myDepthBufferTextureID
;
34
35
unsigned
myFBOID
;
36
37
void
initColorTexture();
38
void
initDepthBufferTexture();
39
void
initFBO();
40
41
int
myWidth
;
42
int
myHeight
;
43
44
bool
myHasDepth
;
45
46
bool
myIsValid
;
47
GLenum
myInternalFormat
;
48
};
49
50
class
DT_DLL_VRVGRAPHICSUTILS
DtGLScreenQuad
51
{
52
public
:
53
DtGLScreenQuad
();
54
virtual
~
DtGLScreenQuad
();
55
56
void
draw();
57
58
private
:
59
unsigned
vbo
;
60
unsigned
vao
;
61
};
62
63
enum
DtGLShaderType
64
{
65
DT_VERTEX_SHADER
= 0
66
,
DT_HULL_SHADER
67
,
DT_DOMAIN_SHADER
68
,
DT_GEOMETRY_SHADER
69
,
DT_PIXEL_SHADER
70
};
71
72
class
DT_DLL_VRVGRAPHICSUTILS
DtGLShader
73
{
74
public
:
75
DtGLShader
(
const
std::string& source,
DtGLShaderType
type);
76
~
DtGLShader
();
77
bool
isValid(
void
)
const
;
78
unsigned
id(
void
)
const
;
79
private
:
80
unsigned
myShaderID
;
81
bool
myIsValid
;
82
};
83
84
typedef
std::vector<DtGLShader*>
VectorShaders
;
85
86
class
DT_DLL_VRVGRAPHICSUTILS
DtGLProgram
87
{
88
public
:
89
DtGLProgram
(
const
VectorShaders
& shaders);
90
~
DtGLProgram
();
91
void
bind
(
void
);
92
void
unbind(
void
);
93
bool
isValid(
void
)
const
;
94
95
private
:
96
unsigned
myProgramID
;
97
bool
myIsValid
;
98
const
VectorShaders
myShaders
;
99
};
100
}
101
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)