| Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <IMaterialRendererServices.h>
Public Member Functions | |
| virtual IVideoDriver * | getVideoDriver ()=0 |
| Get pointer to the IVideoDriver interface. | |
| virtual void | setBasicRenderStates (const SMaterial &material, const SMaterial &lastMaterial, bool resetAllRenderstates)=0 |
| Can be called by an IMaterialRenderer to make its work easier. | |
| virtual void | setPixelShaderConstant (const f32 *data, s32 startRegister, s32 constantAmount=1)=0 |
| Sets a pixel shader constant. | |
| virtual bool | setPixelShaderConstant (const c8 *name, const f32 *floats, int count)=0 |
| Sets a constant for the pixel shader based on a name. | |
| virtual void | setVertexShaderConstant (const f32 *data, s32 startRegister, s32 constantAmount=1)=0 |
| Sets a vertex shader constant. | |
| virtual bool | setVertexShaderConstant (const c8 *name, const f32 *floats, int count)=0 |
| Sets a constant for the vertex shader based on a name. | |
| virtual | ~IMaterialRendererServices () |
| Destructor. | |
Definition at line 21 of file IMaterialRendererServices.h.
|
|
Destructor.
Definition at line 26 of file IMaterialRendererServices.h. |
|
|
Get pointer to the IVideoDriver interface.
|
|
||||||||||||||||
|
Can be called by an IMaterialRenderer to make its work easier. Sets all basic renderstates if needed. Basic render states are diffuse, ambient, specular, and emissive color, specular power, bilinear and trilinear filtering, wireframe mode, grouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and fog enabling.
|
|
||||||||||||||||
|
Sets a pixel shader constant. Can be used if you created a shader using pixel/vertex shader assembler or ARB_fragment_program or ARB_vertex_program.
|
|
||||||||||||||||
|
Sets a constant for the pixel shader based on a name. This can be used if you used a high level shader language like GLSL or HLSL to create a shader. See setVertexShaderConstant() for an example on how to use this.
|
|
||||||||||||||||
|
Sets a vertex shader constant. Can be used if you created a shader using pixel/vertex shader assembler or ARB_fragment_program or ARB_vertex_program.
|
|
||||||||||||||||
|
Sets a constant for the vertex shader based on a name. This can be used if you used a high level shader language like GLSL or HLSL to create a shader. Example: If you created a shader which has variables named 'mWorldViewProj' (containing the WorldViewProjection matrix) and another one named 'fTime' containing one float, you can set them in your IShaderConstantSetCallBack derived class like this: virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData) { video::IVideoDriver* driver = services->getVideoDriver(); f32 time = (f32)os::Timer::getTime()/100000.0f; services->setVertexShaderConstant("fTime", &time, 1); core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); worldViewProj *= driver->getTransform(video::ETS_VIEW); worldViewProj *= driver->getTransform(video::ETS_WORLD); services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16); }
|
| The Irrlicht
Engine Documentation © 2003-2008 by Nikolaus Gebhardt. Generated
on Sun Jun 1 07:59:23 2008 by Doxygen
(1.4.2) |