forked from Mirrorlandia_minetest/irrlicht
master #5
@ -53,19 +53,8 @@ public:
|
||||
virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count) = 0;
|
||||
|
||||
//! Uint interface for the above.
|
||||
/* NOTE: UINT only works with GLSL, not supported for other shaders.
|
||||
Also GLES drivers in Irrlicht do not support it as this needs at least GLES 3.0.
|
||||
*/
|
||||
virtual bool setVertexShaderConstant(s32 index, const u32* ints, int count) = 0;
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
/** Can be used if you created a shader using pixel/vertex shader
|
||||
assembler or ARB_fragment_program or ARB_vertex_program.
|
||||
\param data: Data to be set in the constants
|
||||
\param startRegister: First register to be set
|
||||
\param constantAmount: Amount of registers to be set. One register consists of 4 floats. */
|
||||
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
|
||||
|
||||
//! Return an index constant for the pixel shader for the given uniform variable name
|
||||
virtual s32 getPixelShaderConstantID(const c8* name) = 0;
|
||||
|
||||
@ -83,19 +72,8 @@ public:
|
||||
virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count) = 0;
|
||||
|
||||
//! Uint interface for the above.
|
||||
/* NOTE: UINT only works with GLSL, not supported for other shaders.
|
||||
Also GLES drivers in Irrlicht do not support it as this needs at least GLES 3.0.
|
||||
*/
|
||||
virtual bool setPixelShaderConstant(s32 index, const u32* ints, int count) = 0;
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
/** Can be used if you created a shader using pixel/vertex shader
|
||||
assembler or ARB_fragment_program or ARB_vertex_program.
|
||||
\param data Data to be set in the constants
|
||||
\param startRegister First register to be set.
|
||||
\param constantAmount Amount of registers to be set. One register consists of 4 floats. */
|
||||
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
|
||||
|
||||
//! Get pointer to the IVideoDriver interface
|
||||
/** \return Pointer to the IVideoDriver interface */
|
||||
virtual IVideoDriver* getVideoDriver() = 0;
|
||||
|
@ -2062,18 +2062,6 @@ COGLES2Driver::~COGLES2Driver()
|
||||
return -1;
|
||||
}
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void COGLES2Driver::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Error: Please call services->setVertexShaderConstant(), not VideoDriver->setPixelShaderConstant().");
|
||||
}
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void COGLES2Driver::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Error: Please call services->setPixelShaderConstant(), not VideoDriver->setPixelShaderConstant().");
|
||||
}
|
||||
|
||||
//! Sets a constant for the vertex shader based on an index.
|
||||
bool COGLES2Driver::setVertexShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
|
@ -187,12 +187,6 @@ namespace video
|
||||
//! Get a pixel shader constant index.
|
||||
s32 getPixelShaderConstantID(const c8* name) override;
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount = 1) override;
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount = 1) override;
|
||||
|
||||
//! Sets a constant for the vertex shader based on an index.
|
||||
bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;
|
||||
|
||||
|
@ -345,16 +345,6 @@ s32 COGLES2MaterialRenderer::getPixelShaderConstantID(const c8* name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void COGLES2MaterialRenderer::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Cannot set constant, please use high level shader call instead.", ELL_WARNING);
|
||||
}
|
||||
|
||||
void COGLES2MaterialRenderer::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Cannot set constant, use high level shader call.", ELL_WARNING);
|
||||
}
|
||||
|
||||
bool COGLES2MaterialRenderer::setVertexShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
return setPixelShaderConstant(index, floats, count);
|
||||
|
@ -54,8 +54,6 @@ public:
|
||||
|
||||
s32 getVertexShaderConstantID(const c8* name) override;
|
||||
s32 getPixelShaderConstantID(const c8* name) override;
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;
|
||||
bool setVertexShaderConstant(s32 index, const s32* ints, int count) override;
|
||||
bool setVertexShaderConstant(s32 index, const u32* ints, int count) override;
|
||||
|
@ -2374,25 +2374,6 @@ bool COGLES1Driver::setPixelShaderConstant(s32 index, const u32* ints, int count
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void COGLES1Driver::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
#ifdef GL_vertex_program
|
||||
for (s32 i=0; i<constantAmount; ++i)
|
||||
extGlProgramLocalParameter4fv(GL_VERTEX_PROGRAM, startRegister+i, &data[i*4]);
|
||||
#endif
|
||||
}
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void COGLES1Driver::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
#ifdef GL_fragment_program
|
||||
for (s32 i=0; i<constantAmount; ++i)
|
||||
extGlProgramLocalParameter4fv(GL_FRAGMENT_PROGRAM, startRegister+i, &data[i*4]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//! Adds a new material renderer to the VideoDriver, using pixel and/or
|
||||
//! vertex shaders to render geometry.
|
||||
s32 COGLES1Driver::addShaderMaterial(const c8* vertexShaderProgram,
|
||||
|
@ -201,12 +201,6 @@ namespace video
|
||||
//! Uint interface for the above.
|
||||
bool setPixelShaderConstant(s32 index, const u32* ints, int count) override;
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
|
||||
//! Adds a new material renderer to the VideoDriver
|
||||
virtual s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram,
|
||||
IShaderConstantSetCallBack* callback, E_MATERIAL_TYPE baseMaterial, s32 userData) override;
|
||||
|
@ -3384,20 +3384,6 @@ s32 COpenGLDriver::getPixelShaderConstantID(const c8* name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void COpenGLDriver::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
for (s32 i=0; i<constantAmount; ++i)
|
||||
extGlProgramLocalParameter4fv(GL_VERTEX_PROGRAM_ARB, startRegister+i, &data[i*4]);
|
||||
}
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void COpenGLDriver::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
for (s32 i=0; i<constantAmount; ++i)
|
||||
extGlProgramLocalParameter4fv(GL_FRAGMENT_PROGRAM_ARB, startRegister+i, &data[i*4]);
|
||||
}
|
||||
|
||||
//! Sets a constant for the vertex shader based on an index.
|
||||
bool COpenGLDriver::setVertexShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
|
@ -259,12 +259,6 @@ namespace video
|
||||
//! Get a pixel shader constant index.
|
||||
s32 getPixelShaderConstantID(const c8* name) override;
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
|
||||
//! Sets a constant for the vertex shader based on an index.
|
||||
bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;
|
||||
|
||||
|
@ -571,16 +571,6 @@ s32 COpenGLSLMaterialRenderer::getPixelShaderConstantID(const c8* name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void COpenGLSLMaterialRenderer::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Cannot set constant, please use high level shader call instead.", ELL_WARNING);
|
||||
}
|
||||
|
||||
void COpenGLSLMaterialRenderer::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Cannot set constant, use high level shader call.", ELL_WARNING);
|
||||
}
|
||||
|
||||
bool COpenGLSLMaterialRenderer::setVertexShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
return setPixelShaderConstant(index, floats, count);
|
||||
|
@ -72,8 +72,6 @@ public:
|
||||
void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) override;
|
||||
s32 getVertexShaderConstantID(const c8* name) override;
|
||||
s32 getPixelShaderConstantID(const c8* name) override;
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;
|
||||
bool setVertexShaderConstant(s32 index, const s32* ints, int count) override;
|
||||
bool setVertexShaderConstant(s32 index, const u32* ints, int count) override;
|
||||
|
@ -1699,18 +1699,6 @@ COpenGL3DriverBase::~COpenGL3DriverBase()
|
||||
return -1;
|
||||
}
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void COpenGL3DriverBase::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Error: Please call services->setVertexShaderConstant(), not VideoDriver->setPixelShaderConstant().");
|
||||
}
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void COpenGL3DriverBase::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Error: Please call services->setPixelShaderConstant(), not VideoDriver->setPixelShaderConstant().");
|
||||
}
|
||||
|
||||
//! Sets a constant for the vertex shader based on an index.
|
||||
bool COpenGL3DriverBase::setVertexShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
|
@ -168,12 +168,6 @@ namespace video
|
||||
//! Get a pixel shader constant index.
|
||||
s32 getPixelShaderConstantID(const c8* name) override;
|
||||
|
||||
//! Sets a vertex shader constant.
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount = 1) override;
|
||||
|
||||
//! Sets a pixel shader constant.
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount = 1) override;
|
||||
|
||||
//! Sets a constant for the vertex shader based on an index.
|
||||
bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;
|
||||
|
||||
|
@ -343,16 +343,6 @@ s32 COpenGL3MaterialRenderer::getPixelShaderConstantID(const c8* name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void COpenGL3MaterialRenderer::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Cannot set constant, please use high level shader call instead.", ELL_WARNING);
|
||||
}
|
||||
|
||||
void COpenGL3MaterialRenderer::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount)
|
||||
{
|
||||
os::Printer::log("Cannot set constant, use high level shader call.", ELL_WARNING);
|
||||
}
|
||||
|
||||
bool COpenGL3MaterialRenderer::setVertexShaderConstant(s32 index, const f32* floats, int count)
|
||||
{
|
||||
return setPixelShaderConstant(index, floats, count);
|
||||
|
@ -52,8 +52,6 @@ public:
|
||||
|
||||
s32 getVertexShaderConstantID(const c8* name) override;
|
||||
s32 getPixelShaderConstantID(const c8* name) override;
|
||||
void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;
|
||||
bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;
|
||||
bool setVertexShaderConstant(s32 index, const s32* ints, int count) override;
|
||||
bool setVertexShaderConstant(s32 index, const u32* ints, int count) override;
|
||||
|
Loading…
Reference in New Issue
Block a user