Scene shader parameters. More...
#include <VR3Scene.h>
Public Attributes | |
GLfloat | projmat [16] |
projection matrix updated at each Begin()..End() block | |
GLfloat | viewmat [16] |
viewing matrix updated at each Begin()..End() block | |
GLfloat | projviewmat [16] |
projection and viewing matrix updated at each Begin()..End() block | |
GLfloat | orthoprojmat [16] |
GLfloat | camerapos [3] |
Camera position. | |
GLint | numactivelights |
Number of active lights. | |
GLfloat | lightambient [VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights ambient colors (one for each active light) | |
GLfloat | lightdiffuse [VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights diffuse colors (one for each active light) | |
GLfloat | lightspecular [VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights specular colors (one for each active light) | |
GLfloat | lightpos [VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights light positions (one for each active light) |
Scene shader parameters.
During rendering, some scene properties depending on the active camera and the lights must be used as shader uniforms. To obtain efficient shader operations, each frame we prepare the useful variables in the form the shaders consume them, this operation is done once for every Begin()...End() block.
Definition at line 37 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::camerapos[3] |
Camera position.
this parameter may be recovered from the viewmatrix, by storing it we get faster operations.
Definition at line 51 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::lightambient[VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights ambient colors (one for each active light)
Definition at line 55 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::lightdiffuse[VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights diffuse colors (one for each active light)
Definition at line 57 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::lightpos[VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights light positions (one for each active light)
Definition at line 61 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::lightspecular[VR3SC_NUM_LIGHTS *3] |
Array containing m_numactivelights specular colors (one for each active light)
Definition at line 59 of file VR3Scene.h.
Number of active lights.
Definition at line 53 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::orthoprojmat[16] |
It may be eventually used (e.g. when rendering text in 2D mode).
Definition at line 47 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::projmat[16] |
projection matrix updated at each Begin()..End() block
Definition at line 39 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::projviewmat[16] |
projection and viewing matrix updated at each Begin()..End() block
It is the product of the two matrices above.
Definition at line 44 of file VR3Scene.h.
GLfloat VR3SceneShaderParams::viewmat[16] |
viewing matrix updated at each Begin()..End() block
Definition at line 41 of file VR3Scene.h.