mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-06 02:00:25 +02:00
Added 'uint' GLSL uniform support.
Thanks @devsh for the patch. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6073 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -3176,6 +3176,19 @@ bool CD3D9Driver::setVertexShaderConstant(s32 index, const s32* ints, int count)
|
||||
}
|
||||
|
||||
|
||||
//! Uint interface for the above.
|
||||
bool CD3D9Driver::setVertexShaderConstant(s32 index, const u32* ints, int count)
|
||||
{
|
||||
if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size())
|
||||
{
|
||||
CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer;
|
||||
return r->setVariable(true, index, ints, count);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//! Sets a constant for the pixel shader based on an index.
|
||||
bool CD3D9Driver::setPixelShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
@ -3202,6 +3215,20 @@ bool CD3D9Driver::setPixelShaderConstant(s32 index, const s32* ints, int count)
|
||||
}
|
||||
|
||||
|
||||
//! Uint interface for the above.
|
||||
bool CD3D9Driver::setPixelShaderConstant(s32 index, const u32* ints, int count)
|
||||
{
|
||||
if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size())
|
||||
{
|
||||
CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer;
|
||||
return r->setVariable(false, index, ints, count);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! Adds a new material renderer to the VideoDriver, using pixel and/or
|
||||
//! vertex shaders to render geometry.
|
||||
s32 CD3D9Driver::addShaderMaterial(const c8* vertexShaderProgram,
|
||||
|
Reference in New Issue
Block a user