|
arsa
2.7
|
Interface making it possible to set constants for gpu programs every frame. More...
#include <IShaderConstantSetCallBack.h>
Public Member Functions | |
| virtual void | OnSetMaterial (const SMaterial &material) |
| Called to let the callBack know the used material (optional method) More... | |
| virtual void | OnSetConstants (IMaterialRendererServices *services, s32 userData)=0 |
| Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set. More... | |
Public Member Functions inherited from irr::IReferenceCounted | |
| IReferenceCounted () | |
| Constructor. More... | |
| virtual | ~IReferenceCounted () |
| Destructor. More... | |
| void | grab () const |
| Grabs the object. Increments the reference counter by one. More... | |
| bool | drop () const |
| Drops the object. Decrements the reference counter by one. More... | |
| s32 | getReferenceCount () const |
| Get the reference count. More... | |
| const c8 * | getDebugName () const |
| Returns the debug name of the object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from irr::IReferenceCounted | |
| void | setDebugName (const c8 *newName) |
| Sets the debug name of the object. More... | |
Interface making it possible to set constants for gpu programs every frame.
Implement this interface in an own class and pass a pointer to it to one of the methods in IGPUProgrammingServices when creating a shader. The OnSetConstants method will be called every frame now.
Definition at line 21 of file IShaderConstantSetCallBack.h.
|
pure virtual |
Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set.
Implement the IShaderConstantSetCallBack in an own class and implement your own OnSetConstants method using the given IMaterialRendererServices interface. Pass a pointer to this class to one of the methods in IGPUProgrammingServices when creating a shader. The OnSetConstants method will now be called every time before geometry is being drawn using your shader material. A sample implementation would look like this:
| services | Pointer to an interface providing methods to set the constants for the shader. |
| userData | Userdata int which can be specified when creating the shader. |
|
inlinevirtual |
Called to let the callBack know the used material (optional method)
Definition at line 44 of file IShaderConstantSetCallBack.h.
1.8.15