HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RE_LightBatch.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: RE_LightBatch ( RE Library, C++)
7
*
8
* COMMENTS:
9
* A small batch of lights of similar type which can be rendered in a
10
* single HQ Lighting pass together. Their uniforms are stored in a single
11
* SSBO and their shadow maps in a single array map (cube or 2D).
12
*/
13
#ifndef RE_LightBatch_h
14
#define RE_LightBatch_h
15
16
#include "
RE_API.h
"
17
#include "
RE_Light.h
"
18
#include "
RE_UniformBlock.h
"
19
#include <
UT/UT_NonCopyable.h
>
20
21
class
RE_OGLTexture
;
22
class
RE_Render
;
23
24
class
RE_API
RE_LightBatch
25
{
26
public
:
27
RE_LightBatch
(
int
max_lights,
28
RE_Light::RE_HQLightType
type
,
29
bool
use_ssbo =
false
);
30
~
RE_LightBatch
();
31
32
UT_NON_COPYABLE
(
RE_LightBatch
)
33
34
RE_Light
::RE_HQLightType batchType()
const
{
return
myLightType; }
35
36
static
RE_LightBatch
*findBatch(
int
id
);
37
38
int
getID
()
const
{
return
myID; }
39
int
batchSize
()
const
{
return
myLights.entries(); }
40
41
bool
addLight(
RE_Light
*light);
42
void
removeLight(
RE_Light
*light);
43
44
void
prepareBatch(
RE_Render
*
r
,
int
area_samples = 1);
45
46
void
prepShadowMap(
RE_Render
*
r
,
int
res);
47
48
void
bindToShader(
RE_Render
*
r
,
RE_Shader
*sh);
49
void
unbindFromShader(
RE_Render
*
r
,
RE_Shader
*sh);
50
51
const
UT_Array<RE_Light *>
&
lights
() {
return
myLights; }
52
53
void
dump();
54
private
:
55
56
void
updateLightBlocks(
RE_Render
*
r
);
57
58
bool
myUseSSBO;
59
60
UT_Array<RE_Light *>
mySetupLights;
61
UT_Array<RE_Light *>
myLights;
62
63
RE_Light::RE_HQLightType
myLightType;
64
int
myMaxLights;
65
int
myCurrentMax;
66
int
myID;
67
68
RE_UniformBlockHandle
myHQLightBlock;
69
RE_UniformBlockHandle
myAreaBlock;
70
RE_UniformBlockHandle
myBasicBlock;
71
RE_UniformBlockHandle
myUniformBlock;
72
bool
myUniformBound;
73
bool
myBasicBound;
74
bool
myHQBound;
75
bool
myAreaBound;
76
77
RE_OGLTexture
*myFalloffArray;
78
RE_OGLTexture
*myShadowArray;
79
};
80
81
#endif
RE_LightBatch::batchSize
int batchSize() const
Definition:
RE_LightBatch.h:39
RE_Light::RE_HQLightType
RE_HQLightType
Definition:
RE_Light.h:384
RE_API.h
RE_API
#define RE_API
Definition:
RE_API.h:10
RE_UniformBlock.h
RE_LightBatch::lights
const UT_Array< RE_Light * > & lights()
Definition:
RE_LightBatch.h:51
RE_Light.h
RE_Light
Definition:
RE_Light.h:98
UT_Array< RE_Light * >
type
GLint GLint GLsizei GLint GLenum GLenum type
Definition:
glcorearb.h:108
RE_Render
Definition:
RE_Render.h:29
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_IntrusivePtr< RE_UniformBlock >
UT_NonCopyable.h
RE_Shader
Definition:
RE_Shader.h:60
RE_OGLTexture
Definition:
RE_OGLTexture.h:34
RE_LightBatch
Definition:
RE_LightBatch.h:24
RE_LightBatch::getID
int getID() const
Definition:
RE_LightBatch.h:38
r
GLboolean r
Definition:
glcorearb.h:1222
RE
RE_LightBatch.h
Generated on Thu Sep 4 2025 02:39:22 for HDK by
1.8.6