mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Add IShaderConstantSetCallBack::OnCreate to allow earlier access to IMaterialRendererServices
Accessing IMaterialRendererServices outside of OnSetConstants can be useful and Irrlicht made this a bit too hard to access. Also OnCreate allows actually for nicer code where initialization and update of shader constants are strictly separated (see changed example). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6465 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -22,6 +22,14 @@ class IShaderConstantSetCallBack : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
|
||||
//! Called by the engine after a shader material has been created successfully
|
||||
/** If you are using one callback instance per shader (much recommended)
|
||||
this is a good place to get shader constant id's for high level shaders.
|
||||
\param services: Pointer to an interface providing methods to set/get the constants for the shader.
|
||||
\param userData: Userdata int which can be specified when creating the shader. */
|
||||
virtual void OnCreate(IMaterialRendererServices* services, s32 userData) { }
|
||||
|
||||
|
||||
//! Called to let the callBack know the used material (optional method)
|
||||
/**
|
||||
\code
|
||||
|
Reference in New Issue
Block a user