![]() |
DI-Guy SDK Documentation
13.7.1
|
This class is an abstract wrapper around shader constants for use with DI-Guy rendering. More...
#include <diguyUniformBufferUpdater.h>
Public Member Functions | |
| diguyUniformBufferUpdater () | |
| virtual | ~diguyUniformBufferUpdater () |
| virtual void | initialize ()=0 |
| virtual void | update ()=0 |
| called by various shaders and internal code before trying to render something, this function should ensure that any out of date uniform buffers are updated and sent to the video card. More... | |
| virtual void | set_projection_matrix (const float *matrix)=0 |
| Called as part of diguy camera apply function. More... | |
| virtual void | get_projection_matrix (float *matrix, int transpose)=0 |
| helper function if neede More... | |
| virtual void | set_view_matrix (const float *matrix)=0 |
| Called as part of diguy camera apply function. More... | |
| virtual void | get_view_matrix (float *matrix, int transpose)=0 |
| Needed by particle systems. More... | |
| virtual void | set_model_matrix (const float *matrix)=0 |
| Called as part of diguy scene traversing code. More... | |
| virtual void | set_eye_position (float x, float y, float z)=0 |
| virtual void | set_texture_matrix (const float *matrix)=0 |
| Needed for shadow casting. More... | |
| virtual void | set_material (const diguyGraphicsMaterial *material)=0 |
| This uniform material updater effectively replaces a subclassed graphics material in immediate mode, since that class just communicates old style OpenGL state values down to the shader. More... | |
| virtual void | set_material_color (float r, float g, float b, float a)=0 |
| needed for drawing helper objects More... | |
| virtual void | set_material_spec (float r, float g, float b, float shine)=0 |
| virtual void | set_fog (const diguyViewFog *fog)=0 |
| indicates the current diguy fog to use for rendering. Probably only relevant to DI-Guy Scenario More... | |
| virtual void | set_use_global_ambient_material (int val)=0 |
| Indicates that when material bind happens the ambient value of the material should be ignored and the value from set_global_ambient_material() should be used. More... | |
| virtual int | get_use_global_ambient_material ()=0 |
| virtual void | set_global_ambient_material (float r, float g, float b)=0 |
| virtual void | get_global_ambient_material (float **\return, float *g, float **< b >)=0 |
| </b > virtual void | set_global_ambient_light (float r, float g, float b)=0 |
| Replacement for gl light model. More... | |
| virtual void | set_light (int index, const diguyLightRenderDesc *light)=0 |
| See diguyOglUtils::update_lighting for an example of using this function to fill out uniform buffer. More... | |
| virtual void | set_num_active_lights (int num_lights)=0 |
| Called so shaders know how many lights to iterate through. More... | |
| virtual void | set_shadow_map_params (const diguyShadowMapParams *shadow_params)=0 |
| Used by DI-Guy Scenario to communicate shadow params to video card. More... | |
This class is an abstract wrapper around shader constants for use with DI-Guy rendering.
This class is an abstract wrapper around shader constants for use with DI-Guy rendering. It's up to the end user to map these to reasonable constants in their own shaders. diguyOglUniformBufferUpdater implements all of these functions mapping them into a set of uniform buffer objects that are updated at different frequencies.
Must be subclassed in immediate mode and an implmentation should be provided to diguy_graphics_set_uniform_updater()
Also see diguyOglUniformBufferUpdater.
|
inline |
|
inlinevirtual |
|
pure virtual |
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
called by various shaders and internal code before trying to render something, this function should ensure that any out of date uniform buffers are updated and sent to the video card.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Called as part of diguy camera apply function.
Presumably end users will want to call it themselves to setup the uniform buffer data.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
helper function if neede
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Called as part of diguy camera apply function.
Presumably end users will want to call it themselves to setup the uniform buffer data.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Needed by particle systems.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Called as part of diguy scene traversing code.
Typically called once per character draw Potentially called many times for scene objects.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Needed for shadow casting.
This matrix will only be used for projecting light coordinates Probably only relevant to DI-Guy Scenario and shadowing examples.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
This uniform material updater effectively replaces a subclassed graphics material in immediate mode, since that class just communicates old style OpenGL state values down to the shader.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
needed for drawing helper objects
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
indicates the current diguy fog to use for rendering. Probably only relevant to DI-Guy Scenario
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Indicates that when material bind happens the ambient value of the material should be ignored and the value from set_global_ambient_material() should be used.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Implemented in diguyDx11UniformBufferUpdater.
|
pure virtual |
Replacement for gl light model.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
See diguyOglUtils::update_lighting for an example of using this function to fill out uniform buffer.
Light sources can be diguy global directional light in addition to particle systems and weapon effects.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Called so shaders know how many lights to iterate through.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.
|
pure virtual |
Used by DI-Guy Scenario to communicate shadow params to video card.
Implemented in diguyDx11UniformBufferUpdater, and diguyOglUniformBufferUpdater.