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
vrvGraphics
DtProjected2DFlatEffect.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2011 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvGraphics/Dt2DEffect.h
>
13
14
namespace
makVrv
15
{
16
19
class
DT_DLL_VRVGRAPHICS
DtProjected2DFlatEffect
:
public
Dt2DEffect
20
{
21
public
:
22
24
DtProjected2DFlatEffect
();
25
27
virtual
~
DtProjected2DFlatEffect
();
28
30
virtual
void
setCamera(
bool
geocentric,
float
occluded,
31
const
double
position[3]
32
,
const
double
positionMatrix[16]
33
,
const
double
projectionMatrix[16]);
34
35
//Set the number of groups.
36
virtual
void
setGroupCount(
unsigned
int
count );
37
38
// Sets the given attributes to the OpenGL context.
39
virtual
void
setVertexAttribPointers(
size_t
stride,
40
const
VertexAttribPtrInfo
& positionAddress,
41
const
VertexAttribPtrInfo
& colorAddress,
42
const
VertexAttribPtrInfo
& offsetAddress,
43
const
VertexAttribPtrInfo
& rotationAddress );
44
46
virtual
void
unsetVertexAttribPointers();
47
48
protected
:
49
51
virtual
void
updateUniformLocations();
52
54
virtual
void
updateUniforms();
55
57
virtual
void
initializeShaderSource(
void
);
58
59
protected
:
60
61
int
myUniform_CameraPos
;
62
int
myUniform_CameraMat
;
63
int
myUniform_ProjectionMat
;
64
int
myUniform_GroupCount
;
65
int
myUniform_Sphere
;
66
int
myUniform_OccludedAlpha
;
67
68
unsigned
int
myUnit
;
69
unsigned
int
myGroupCount
;
70
double
myCameraPos[3];
71
double
myMatrix[16];
72
double
myProjectionMatrix[16];
73
bool
myGeocentricFlag
;
74
float
myGeocentricAlpha
;
75
76
void
updateOtherUniforms(
void
);
77
};
78
79
82
class
DT_DLL_VRVGRAPHICS
DtProjected2DFlatQuadEffectCreator
:
public
DtEffectCreator
83
{
84
public
:
85
86
virtual
DtEffect
* create(
CreateParameters
* params = 0 )
87
{
88
return
new
DtProjected2DFlatEffect
();
89
}
90
91
};
92
93
}
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
)