Remove E_GPU_SHADING_LANGUAGE in IGPUProgrammingServices.

Thx @greenya for noticing this is no longer needed as it was only ever used for the CG shader language which we kicked out already.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5846 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2019-08-15 20:43:50 +00:00
parent 3469582bac
commit 1b4444e044
8 changed files with 23 additions and 48 deletions

View File

@ -305,21 +305,17 @@ int main()
if (UseHighLevelShaders) if (UseHighLevelShaders)
{ {
// Choose the desired shader type. Default is the native
// shader type for the driver
const video::E_GPU_SHADING_LANGUAGE shadingLanguage = video::EGSL_DEFAULT;
// create material from high level shaders (hlsl, glsl) // create material from high level shaders (hlsl, glsl)
newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles( newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(
vsFileName, "vertexMain", video::EVST_VS_1_1, vsFileName, "vertexMain", video::EVST_VS_1_1,
psFileName, "pixelMain", video::EPST_PS_1_1, psFileName, "pixelMain", video::EPST_PS_1_1,
mcSolid, video::EMT_SOLID, 0, shadingLanguage); mcSolid, video::EMT_SOLID, 0);
newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles( newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(
vsFileName, "vertexMain", video::EVST_VS_1_1, vsFileName, "vertexMain", video::EVST_VS_1_1,
psFileName, "pixelMain", video::EPST_PS_1_1, psFileName, "pixelMain", video::EPST_PS_1_1,
mcTransparentAdd, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage); mcTransparentAdd, video::EMT_TRANSPARENT_ADD_COLOR, 0);
} }
else else
{ {

View File

@ -24,16 +24,6 @@ namespace video
class IVideoDriver; class IVideoDriver;
class IShaderConstantSetCallBack; class IShaderConstantSetCallBack;
//! Enumeration for different types of shading languages
enum E_GPU_SHADING_LANGUAGE
{
//! The default language, so HLSL for Direct3D and GLSL for OpenGL.
EGSL_DEFAULT = 0,
//! Cg shading language.*/
EGSL_CG
};
//! Interface making it possible to create and use programs running on the GPU. //! Interface making it possible to create and use programs running on the GPU.
class IGPUProgrammingServices class IGPUProgrammingServices
{ {
@ -78,7 +68,6 @@ public:
OnSetConstants(). In this way it is easily possible to use the same OnSetConstants(). In this way it is easily possible to use the same
callback method for multiple materials and distinguish between them callback method for multiple materials and distinguish between them
during the call. during the call.
\param shaderLang a type of shading language used in current shader.
\return Number of the material type which can be set in \return Number of the material type which can be set in
SMaterial::MaterialType to use the renderer. -1 is returned if an error SMaterial::MaterialType to use the renderer. -1 is returned if an error
occurred, e.g. if a shader program could not be compiled or a compile occurred, e.g. if a shader program could not be compiled or a compile
@ -99,8 +88,7 @@ public:
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0) = 0;
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
//! convenience function for use without geometry shaders //! convenience function for use without geometry shaders
s32 addHighLevelShaderMaterial( s32 addHighLevelShaderMaterial(
@ -112,8 +100,7 @@ public:
E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1,
IShaderConstantSetCallBack* callback=0, IShaderConstantSetCallBack* callback=0,
E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
s32 userData=0, s32 userData=0)
E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)
{ {
return addHighLevelShaderMaterial( return addHighLevelShaderMaterial(
vertexShaderProgram, vertexShaderEntryPointName, vertexShaderProgram, vertexShaderEntryPointName,
@ -121,7 +108,7 @@ public:
pixelShaderEntryPointName, psCompileTarget, pixelShaderEntryPointName, psCompileTarget,
0, "main", EGST_GS_4_0, 0, "main", EGST_GS_4_0,
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
callback, baseMaterial, userData, shadingLang); callback, baseMaterial, userData);
} }
//! convenience function for use with many defaults, without geometry shader //! convenience function for use with many defaults, without geometry shader
@ -205,7 +192,6 @@ public:
OnSetConstants(). In this way it is easily possible to use the same OnSetConstants(). In this way it is easily possible to use the same
callback method for multiple materials and distinguish between them callback method for multiple materials and distinguish between them
during the call. during the call.
\param shaderLang a type of shading language used in current shader.
\return Number of the material type which can be set in \return Number of the material type which can be set in
SMaterial::MaterialType to use the renderer. -1 is returned if an error SMaterial::MaterialType to use the renderer. -1 is returned if an error
occurred, e.g. if a shader program could not be compiled or a compile occurred, e.g. if a shader program could not be compiled or a compile
@ -226,8 +212,7 @@ public:
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0) = 0;
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
//! convenience function for use without geometry shaders //! convenience function for use without geometry shaders
s32 addHighLevelShaderMaterialFromFiles( s32 addHighLevelShaderMaterialFromFiles(
@ -239,8 +224,7 @@ public:
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0)
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT)
{ {
return addHighLevelShaderMaterialFromFiles( return addHighLevelShaderMaterialFromFiles(
vertexShaderProgramFileName, vertexShaderEntryPointName, vertexShaderProgramFileName, vertexShaderEntryPointName,
@ -248,7 +232,7 @@ public:
pixelShaderEntryPointName, psCompileTarget, pixelShaderEntryPointName, psCompileTarget,
"", "main", EGST_GS_4_0, "", "main", EGST_GS_4_0,
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
callback, baseMaterial, userData, shadingLang); callback, baseMaterial, userData);
} }
//! convenience function for use with many defaults, without geometry shader //! convenience function for use with many defaults, without geometry shader
@ -330,7 +314,6 @@ public:
OnSetConstants(). In this way it is easily possible to use the same OnSetConstants(). In this way it is easily possible to use the same
callback method for multiple materials and distinguish between them callback method for multiple materials and distinguish between them
during the call. during the call.
\param shaderLang a type of shading language used in current shader.
\return Number of the material type which can be set in \return Number of the material type which can be set in
SMaterial::MaterialType to use the renderer. -1 is returned if an SMaterial::MaterialType to use the renderer. -1 is returned if an
error occurred, e.g. if a shader program could not be compiled or a error occurred, e.g. if a shader program could not be compiled or a
@ -351,8 +334,7 @@ public:
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0) = 0;
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
//! convenience function for use without geometry shaders //! convenience function for use without geometry shaders
s32 addHighLevelShaderMaterialFromFiles( s32 addHighLevelShaderMaterialFromFiles(
@ -364,8 +346,7 @@ public:
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0)
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT)
{ {
return addHighLevelShaderMaterialFromFiles( return addHighLevelShaderMaterialFromFiles(
vertexShaderProgram, vertexShaderEntryPointName, vertexShaderProgram, vertexShaderEntryPointName,
@ -373,7 +354,7 @@ public:
pixelShaderEntryPointName, psCompileTarget, pixelShaderEntryPointName, psCompileTarget,
0, "main", EGST_GS_4_0, 0, "main", EGST_GS_4_0,
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
callback, baseMaterial, userData, shadingLang); callback, baseMaterial, userData);
} }
//! Adds a new ASM shader material renderer to the VideoDriver //! Adds a new ASM shader material renderer to the VideoDriver

View File

@ -3223,7 +3223,7 @@ s32 CD3D9Driver::addHighLevelShaderMaterial(
scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType,
u32 verticesOut, u32 verticesOut,
IShaderConstantSetCallBack* callback, IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) E_MATERIAL_TYPE baseMaterial, s32 userData)
{ {
s32 nr = -1; s32 nr = -1;

View File

@ -383,8 +383,7 @@ namespace video
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0) _IRR_OVERRIDE_;
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
void createMaterialRenderers(); void createMaterialRenderers();

View File

@ -2381,7 +2381,7 @@ s32 CNullDriver::addHighLevelShaderMaterial(
u32 verticesOut, u32 verticesOut,
IShaderConstantSetCallBack* callback, IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) s32 userData)
{ {
os::Printer::log("High level shader materials not available (yet) in this driver, sorry"); os::Printer::log("High level shader materials not available (yet) in this driver, sorry");
return -1; return -1;
@ -2404,7 +2404,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
u32 verticesOut, u32 verticesOut,
IShaderConstantSetCallBack* callback, IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) s32 userData)
{ {
io::IReadFile* vsfile = 0; io::IReadFile* vsfile = 0;
io::IReadFile* psfile = 0; io::IReadFile* psfile = 0;
@ -2445,7 +2445,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
psfile, pixelShaderEntryPointName, psCompileTarget, psfile, pixelShaderEntryPointName, psCompileTarget,
gsfile, geometryShaderEntryPointName, gsCompileTarget, gsfile, geometryShaderEntryPointName, gsCompileTarget,
inType, outType, verticesOut, inType, outType, verticesOut,
callback, baseMaterial, userData, shadingLang); callback, baseMaterial, userData);
if (psfile) if (psfile)
psfile->drop(); psfile->drop();
@ -2476,7 +2476,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
u32 verticesOut, u32 verticesOut,
IShaderConstantSetCallBack* callback, IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) s32 userData)
{ {
c8* vs = 0; c8* vs = 0;
c8* ps = 0; c8* ps = 0;
@ -2527,7 +2527,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
ps, pixelShaderEntryPointName, psCompileTarget, ps, pixelShaderEntryPointName, psCompileTarget,
gs, geometryShaderEntryPointName, gsCompileTarget, gs, geometryShaderEntryPointName, gsCompileTarget,
inType, outType, verticesOut, inType, outType, verticesOut,
callback, baseMaterial, userData, shadingLang); callback, baseMaterial, userData);
delete [] vs; delete [] vs;
delete [] ps; delete [] ps;

View File

@ -558,7 +558,7 @@ namespace video
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_; s32 userData = 0) _IRR_OVERRIDE_;
//! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description), //! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description),
//! but tries to load the programs from files. //! but tries to load the programs from files.
@ -577,7 +577,7 @@ namespace video
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_; s32 userData = 0) _IRR_OVERRIDE_;
//! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description), //! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description),
//! but tries to load the programs from files. //! but tries to load the programs from files.
@ -596,7 +596,7 @@ namespace video
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_; s32 userData = 0) _IRR_OVERRIDE_;
//! Returns a pointer to the mesh manipulator. //! Returns a pointer to the mesh manipulator.
virtual scene::IMeshManipulator* getMeshManipulator() _IRR_OVERRIDE_; virtual scene::IMeshManipulator* getMeshManipulator() _IRR_OVERRIDE_;

View File

@ -3723,7 +3723,7 @@ s32 COpenGLDriver::addHighLevelShaderMaterial(
u32 verticesOut, u32 verticesOut,
IShaderConstantSetCallBack* callback, IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) s32 userData)
{ {
s32 nr = -1; s32 nr = -1;

View File

@ -324,8 +324,7 @@ namespace video
u32 verticesOut = 0, u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0, IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, s32 userData = 0) _IRR_OVERRIDE_;
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
//! Returns a pointer to the IVideoDriver interface. (Implementation for //! Returns a pointer to the IVideoDriver interface. (Implementation for
//! IMaterialRendererServices) //! IMaterialRendererServices)