Improve documentation

What Irrlicht calls ShaderConstants is called uniforms by everyone else. So let's mention this at least.
Also reworked setVertexShaderConstant interface had an example for the old interface in the header.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6497 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2023-06-12 19:26:43 +00:00
parent a44e5e3d17
commit cdcb8274ee
2 changed files with 30 additions and 26 deletions

View File

@ -57,6 +57,9 @@ public:
if (UseHighLevelShaders)
{
// Get shader constants id.
// Constants are "uniforms" in most modern shading languages.
// And they are not constant at all but can be changed before every draw call
// (the naming probably has some historical reasons which got lost in time)
WorldViewProjID = services->getVertexShaderConstantID("mWorldViewProj");
TransWorldID = services->getVertexShaderConstantID("mTransWorld");
InvWorldID = services->getVertexShaderConstantID("mInvWorld");