Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
|
Interface making it possible to set constants for gpu programs every frame. More...
#include <jimcpp/core/engine/IShaderConstantSetCallBack.hpp>
Public Member Functions | |
virtual void | OnSetMaterial (const SMaterial &material) |
Called to let the callBack know the used material (optional method) | |
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. | |
Public Member Functions inherited from jpp::IReferenceCounted | |
IReferenceCounted () | |
Constructor. | |
virtual | ~IReferenceCounted () |
Destructor. | |
void | grab () const |
Grabs the object. Increments the reference counter by one. | |
bool | drop () const |
Drops the object. Decrements the reference counter by one. | |
s32 | getReferenceCount () const |
Get the reference count. | |
const c8 * | getDebugName () const |
Returns the debug name of the object. | |
Additional Inherited Members | |
Protected Member Functions inherited from jpp::IReferenceCounted | |
void | setDebugName (const c8 *newName) |
Sets the debug name of the object. | |
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.
|
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)