From 13dcd3d031ed811b54e4ae67a05332dcc2bd5b06 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 14 Sep 2013 00:46:10 +0200 Subject: [PATCH] Rename --- code/nel/include/nel/3d/driver.h | 4 +- code/nel/include/nel/3d/geometry_program.h | 4 +- code/nel/include/nel/3d/pixel_program.h | 4 +- .../nel/3d/{gpu_program.h => program.h} | 52 ++++++------- code/nel/include/nel/3d/vertex_program.h | 4 +- code/nel/src/3d/CMakeLists.txt | 4 +- .../src/3d/driver/direct3d/driver_direct3d.h | 8 +- .../direct3d/driver_direct3d_material.cpp | 4 +- .../driver_direct3d_pixel_program.cpp | 6 +- .../driver_direct3d_vertex_program.cpp | 6 +- code/nel/src/3d/driver/opengl/driver_opengl.h | 4 +- .../driver/opengl/driver_opengl_material.cpp | 6 +- .../opengl/driver_opengl_pixel_program.cpp | 10 +-- .../driver/opengl/driver_opengl_uniform.cpp | 78 +++++++++---------- .../3d/driver/opengl/driver_opengl_vertex.cpp | 4 +- .../opengl/driver_opengl_vertex_program.cpp | 20 ++--- code/nel/src/3d/landscape.cpp | 4 +- code/nel/src/3d/meshvp_per_pixel_light.cpp | 2 +- code/nel/src/3d/meshvp_wind_tree.cpp | 4 +- .../src/3d/{gpu_program.cpp => program.cpp} | 24 +++--- code/nel/src/3d/stereo_debugger.cpp | 12 +-- code/nel/src/3d/stereo_ovr.cpp | 8 +- code/nel/src/3d/vegetable_manager.cpp | 4 +- code/nel/src/3d/vertex_program.cpp | 2 +- code/nel/src/3d/water_env_map.cpp | 2 +- code/nel/src/3d/water_model.cpp | 4 +- code/ryzom/client/src/decal.cpp | 2 +- 27 files changed, 143 insertions(+), 143 deletions(-) rename code/nel/include/nel/3d/{gpu_program.h => program.h} (87%) rename code/nel/src/3d/{gpu_program.cpp => program.cpp} (81%) diff --git a/code/nel/include/nel/3d/driver.h b/code/nel/include/nel/3d/driver.h index c9c55f864..716c88480 100644 --- a/code/nel/include/nel/3d/driver.h +++ b/code/nel/include/nel/3d/driver.h @@ -1455,8 +1455,8 @@ protected: friend class CTextureDrvShare; friend class ITextureDrvInfos; friend class IMaterialDrvInfos; - friend class IGPUProgramDrvInfos; - friend class IGPUProgramParamsDrvInfos; + friend class IProgramDrvInfos; + friend class IProgramParamsDrvInfos; /// remove ptr from the lists in the driver. void removeVBDrvInfoPtr(ItVBDrvInfoPtrList vbDrvInfoIt); diff --git a/code/nel/include/nel/3d/geometry_program.h b/code/nel/include/nel/3d/geometry_program.h index adba5f01d..48e48e260 100644 --- a/code/nel/include/nel/3d/geometry_program.h +++ b/code/nel/include/nel/3d/geometry_program.h @@ -26,13 +26,13 @@ #include #include -#include +#include #include namespace NL3D { -class CGeometryProgram : public IGPUProgram +class CGeometryProgram : public IProgram { public: /// Constructor diff --git a/code/nel/include/nel/3d/pixel_program.h b/code/nel/include/nel/3d/pixel_program.h index 1bfdb84d0..0787ae9fb 100644 --- a/code/nel/include/nel/3d/pixel_program.h +++ b/code/nel/include/nel/3d/pixel_program.h @@ -26,13 +26,13 @@ #include #include -#include +#include #include namespace NL3D { -class CPixelProgram : public IGPUProgram +class CPixelProgram : public IProgram { public: /// Constructor diff --git a/code/nel/include/nel/3d/gpu_program.h b/code/nel/include/nel/3d/program.h similarity index 87% rename from code/nel/include/nel/3d/gpu_program.h rename to code/nel/include/nel/3d/program.h index b7114a3bd..77e6baa62 100644 --- a/code/nel/include/nel/3d/gpu_program.h +++ b/code/nel/include/nel/3d/program.h @@ -1,9 +1,9 @@ /** - * \file gpu_program.h - * \brief IGPUProgram + * \file program.h + * \brief IProgram * \date 2013-09-07 15:00GMT * \author Jan Boon (Kaetemi) - * IGPUProgram + * IProgram */ /* @@ -25,8 +25,8 @@ * . */ -#ifndef NL3D_GPU_PROGRAM_H -#define NL3D_GPU_PROGRAM_H +#ifndef NL3D_PROGRAM_H +#define NL3D_PROGRAM_H #include // STL includes @@ -40,22 +40,22 @@ namespace NL3D { // List typedef. class IDriver; -class IGPUProgramDrvInfos; -typedef std::list TGPUPrgDrvInfoPtrList; +class IProgramDrvInfos; +typedef std::list TGPUPrgDrvInfoPtrList; typedef TGPUPrgDrvInfoPtrList::iterator ItGPUPrgDrvInfoPtrList; // Class for interaction of vertex program with Driver. -// IGPUProgramDrvInfos represent the real data of the GPU program, stored into the driver (eg: just a GLint for opengl). -class IGPUProgramDrvInfos : public NLMISC::CRefCount +// IProgramDrvInfos represent the real data of the GPU program, stored into the driver (eg: just a GLint for opengl). +class IProgramDrvInfos : public NLMISC::CRefCount { private: IDriver *_Driver; ItGPUPrgDrvInfoPtrList _DriverIterator; public: - IGPUProgramDrvInfos (IDriver *drv, ItGPUPrgDrvInfoPtrList it); + IProgramDrvInfos (IDriver *drv, ItGPUPrgDrvInfoPtrList it); // The virtual dtor is important. - virtual ~IGPUProgramDrvInfos(void); + virtual ~IProgramDrvInfos(void); virtual uint getUniformIndex(const char *name) const = 0; }; @@ -73,9 +73,9 @@ public: // This does not work extremely efficient, but it's the most practical option // for passing builtin parameters onto user provided shaders. // Note: May need additional flags related to scene sorting, etcetera. -struct CGPUProgramFeatures +struct CProgramFeatures { - CGPUProgramFeatures() : DriverFlags(0), MaterialFlags(0) { } + CProgramFeatures() : DriverFlags(0), MaterialFlags(0) { } // Driver builtin parameters enum TDriverFlags @@ -100,7 +100,7 @@ struct CGPUProgramFeatures // Stucture used to cache the indices of builtin parameters which are used by the drivers // Not used for parameters of specific nl3d programs -struct CGPUProgramIndex +struct CProgramIndex { enum TName { @@ -128,12 +128,12 @@ struct CGPUProgramIndex }; /** - * \brief IGPUProgram + * \brief IProgram * \date 2013-09-07 15:00GMT * \author Jan Boon (Kaetemi) * A generic GPU program */ -class IGPUProgram : public NLMISC::CRefCount +class IProgram : public NLMISC::CRefCount { public: enum TProfile @@ -195,7 +195,7 @@ public: std::string DisplayName; /// Minimal required profile for this GPU program - IGPUProgram::TProfile Profile; + IProgram::TProfile Profile; const char *SourcePtr; size_t SourceLen; @@ -207,7 +207,7 @@ public: inline void setSourcePtr(const char *sourcePtr) { SourceCopy.clear(); SourcePtr = sourcePtr; SourceLen = strlen(sourcePtr); } /// CVertexProgramInfo/CPixelProgramInfo/... NeL features - CGPUProgramFeatures Features; + CProgramFeatures Features; /// Map with known parameter indices, used for assembly programs std::map ParamIndices; @@ -217,8 +217,8 @@ public: }; public: - IGPUProgram(); - virtual ~IGPUProgram(); + IProgram(); + virtual ~IProgram(); // Manage the sources, not allowed after compilation. // Add multiple sources using different profiles, the driver will use the first one it supports. @@ -230,11 +230,11 @@ public: // Get the idx of a parameter (ogl: uniform, d3d: constant, etcetera) by name. Invalid name returns ~0 inline uint getUniformIndex(const char *name) const { return m_DrvInfo->getUniformIndex(name); }; inline uint getUniformIndex(const std::string &name) const { return m_DrvInfo->getUniformIndex(name.c_str()); }; - inline uint getUniformIndex(CGPUProgramIndex::TName name) const { return m_Index.Indices[name]; } + inline uint getUniformIndex(CProgramIndex::TName name) const { return m_Index.Indices[name]; } // Get feature information of the current program inline CSource *source() const { return m_Source; }; - inline const CGPUProgramFeatures &features() const { return m_Source->Features; }; + inline const CProgramFeatures &features() const { return m_Source->Features; }; inline TProfile profile() const { return m_Source->Profile; } // Build feature info, called automatically by the driver after compile succeeds @@ -249,16 +249,16 @@ protected: /// The source used for compilation NLMISC::CSmartPtr m_Source; - CGPUProgramIndex m_Index; + CProgramIndex m_Index; public: /// The driver information. For the driver implementation only. - NLMISC::CRefPtr m_DrvInfo; + NLMISC::CRefPtr m_DrvInfo; -}; /* class IGPUProgram */ +}; /* class IProgram */ } /* namespace NL3D */ -#endif /* #ifndef NL3D_GPU_PROGRAM_H */ +#endif /* #ifndef NL3D_PROGRAM_H */ /* end of file */ diff --git a/code/nel/include/nel/3d/vertex_program.h b/code/nel/include/nel/3d/vertex_program.h index 2e20db584..3d77c6104 100644 --- a/code/nel/include/nel/3d/vertex_program.h +++ b/code/nel/include/nel/3d/vertex_program.h @@ -19,13 +19,13 @@ #include "nel/misc/types_nl.h" #include "nel/misc/smart_ptr.h" -#include "nel/3d/gpu_program.h" +#include "nel/3d/program.h" #include namespace NL3D { -class CVertexProgram : public IGPUProgram +class CVertexProgram : public IProgram { public: /// Constructor diff --git a/code/nel/src/3d/CMakeLists.txt b/code/nel/src/3d/CMakeLists.txt index 15eb77734..fff343915 100644 --- a/code/nel/src/3d/CMakeLists.txt +++ b/code/nel/src/3d/CMakeLists.txt @@ -167,8 +167,8 @@ SOURCE_GROUP(Driver FILES ../../include/nel/3d/pixel_program.h geometry_program.cpp ../../include/nel/3d/geometry_program.h - gpu_program.cpp - ../../include/nel/3d/gpu_program.h + program.cpp + ../../include/nel/3d/program.h gpu_program_params.cpp ../../include/nel/3d/gpu_program_params.h) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.h b/code/nel/src/3d/driver/direct3d/driver_direct3d.h index d21bef92f..aef51b3b9 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.h +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.h @@ -299,7 +299,7 @@ public: // *************************************************************************** -class CVertexProgamDrvInfosD3D : public IGPUProgramDrvInfos +class CVertexProgamDrvInfosD3D : public IProgramDrvInfos { public: @@ -321,7 +321,7 @@ public: // *************************************************************************** -class CPixelProgramDrvInfosD3D : public IGPUProgramDrvInfos +class CPixelProgramDrvInfosD3D : public IProgramDrvInfos { public: @@ -2111,7 +2111,7 @@ public: { H_AUTO_D3D(CDriverD3D_getPixelProgramD3D); CPixelProgramDrvInfosD3D* d3dPixelProgram; - d3dPixelProgram = (CPixelProgramDrvInfosD3D*)(IGPUProgramDrvInfos*)(pixelProgram.m_DrvInfo); + d3dPixelProgram = (CPixelProgramDrvInfosD3D*)(IProgramDrvInfos*)(pixelProgram.m_DrvInfo); return d3dPixelProgram; } @@ -2120,7 +2120,7 @@ public: { H_AUTO_D3D(CDriverD3D_getVertexProgramD3D); CVertexProgamDrvInfosD3D* d3dVertexProgram; - d3dVertexProgram = (CVertexProgamDrvInfosD3D*)(IGPUProgramDrvInfos*)(vertexProgram.m_DrvInfo); + d3dVertexProgram = (CVertexProgamDrvInfosD3D*)(IProgramDrvInfos*)(vertexProgram.m_DrvInfo); return d3dVertexProgram; } diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp index b8d2fa41b..40d01039b 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp @@ -649,7 +649,7 @@ bool CDriverD3D::setupMaterial(CMaterial &mat) // because setupTexture() may disable all stage. if (matShader == CMaterial::Normal - || ((matShader == CMaterial::Program) && (_PixelProgramUser->features().MaterialFlags & CGPUProgramFeatures::TextureStages)) + || ((matShader == CMaterial::Program) && (_PixelProgramUser->features().MaterialFlags & CProgramFeatures::TextureStages)) ) { uint stage; @@ -671,7 +671,7 @@ bool CDriverD3D::setupMaterial(CMaterial &mat) { H_AUTO_D3D(CDriverD3D_setupMaterial_normalShaderActivateTextures) if (matShader == CMaterial::Normal - || ((matShader == CMaterial::Program) && (_PixelProgramUser->features().MaterialFlags & CGPUProgramFeatures::TextureStages)) + || ((matShader == CMaterial::Program) && (_PixelProgramUser->features().MaterialFlags & CProgramFeatures::TextureStages)) ) { uint stage; diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp index 1519a9554..e0a2cd4a4 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp @@ -37,7 +37,7 @@ namespace NL3D // *************************************************************************** -CPixelProgramDrvInfosD3D::CPixelProgramDrvInfosD3D(IDriver *drv, ItGPUPrgDrvInfoPtrList it) : IGPUProgramDrvInfos (drv, it) +CPixelProgramDrvInfosD3D::CPixelProgramDrvInfosD3D(IDriver *drv, ItGPUPrgDrvInfoPtrList it) : IProgramDrvInfos (drv, it) { H_AUTO_D3D(CPixelProgramDrvInfosD3D_CPixelProgamDrvInfosD3D) Shader = NULL; @@ -69,7 +69,7 @@ bool CDriverD3D::compilePixelProgram(CPixelProgram *program) if (program->m_DrvInfo==NULL) { // Find a supported pixel program profile - IGPUProgram::CSource *source = NULL; + IProgram::CSource *source = NULL; for (uint i = 0; i < program->getSourceNb(); ++i) { if (supportPixelProgram(program->getSource(i)->Profile)) @@ -128,7 +128,7 @@ bool CDriverD3D::activePixelProgram(CPixelProgram *program) { if (!CDriverD3D::compilePixelProgram(program)) return false; - CPixelProgramDrvInfosD3D *info = static_cast((IGPUProgramDrvInfos*)program->m_DrvInfo); + CPixelProgramDrvInfosD3D *info = static_cast((IProgramDrvInfos*)program->m_DrvInfo); _PixelProgramUser = program; setPixelShader(info->Shader); } diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp index 3f069edd5..d4af02592 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp @@ -26,7 +26,7 @@ namespace NL3D // *************************************************************************** -CVertexProgamDrvInfosD3D::CVertexProgamDrvInfosD3D(IDriver *drv, ItGPUPrgDrvInfoPtrList it) : IGPUProgramDrvInfos (drv, it) +CVertexProgamDrvInfosD3D::CVertexProgamDrvInfosD3D(IDriver *drv, ItGPUPrgDrvInfoPtrList it) : IProgramDrvInfos (drv, it) { H_AUTO_D3D(CVertexProgamDrvInfosD3D_CVertexProgamDrvInfosD3D) Shader = NULL; @@ -268,7 +268,7 @@ bool CDriverD3D::compileVertexProgram(NL3D::CVertexProgram *program) if (program->m_DrvInfo == NULL) { // Find nelvp - IGPUProgram::CSource *source = NULL; + IProgram::CSource *source = NULL; for (uint i = 0; i < program->getSourceNb(); ++i) { if (program->getSource(i)->Profile == CVertexProgram::nelvp) @@ -378,7 +378,7 @@ bool CDriverD3D::activeVertexProgram (CVertexProgram *program) { if (!CDriverD3D::compileVertexProgram(program)) return false; - CVertexProgamDrvInfosD3D *info = NLMISC::safe_cast((IGPUProgramDrvInfos*)program->m_DrvInfo); + CVertexProgamDrvInfosD3D *info = NLMISC::safe_cast((IProgramDrvInfos*)program->m_DrvInfo); _VertexProgramUser = program; setVertexProgram (info->Shader, program); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index 154506250..3c75c270c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -1627,7 +1627,7 @@ private: }; // *************************************************************************** -class CVertexProgamDrvInfosGL : public IGPUProgramDrvInfos +class CVertexProgamDrvInfosGL : public IProgramDrvInfos { public: // The GL Id. @@ -1661,7 +1661,7 @@ public: }; // *************************************************************************** -class CPixelProgamDrvInfosGL : public IGPUProgramDrvInfos +class CPixelProgamDrvInfosGL : public IProgramDrvInfos { public: // The GL Id. diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp index 61a685428..d5920fe64 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp @@ -404,7 +404,7 @@ bool CDriverGL::setupMaterial(CMaterial& mat) // Must separate texture setup and texture activation in 2 "for"... // because setupTexture() may disable all stage. if (matShader != CMaterial::Water - && ((matShader != CMaterial::Program) || (_LastSetuppedPP->features().MaterialFlags & CGPUProgramFeatures::TextureStages)) + && ((matShader != CMaterial::Program) || (_LastSetuppedPP->features().MaterialFlags & CProgramFeatures::TextureStages)) ) { for (uint stage = 0; stage < inlGetNumTextStages(); ++stage) @@ -441,7 +441,7 @@ bool CDriverGL::setupMaterial(CMaterial& mat) && matShader != CMaterial::Cloud && matShader != CMaterial::Water && matShader != CMaterial::Specular - && ((matShader != CMaterial::Program) || (_LastSetuppedPP->features().MaterialFlags & CGPUProgramFeatures::TextureStages)) + && ((matShader != CMaterial::Program) || (_LastSetuppedPP->features().MaterialFlags & CProgramFeatures::TextureStages)) ) { for(uint stage=0 ; stagefeatures().MaterialFlags & CGPUProgramFeatures::TextureMatrices)) + || ((matShader == CMaterial::Program) && (_LastSetuppedPP->features().MaterialFlags & CProgramFeatures::TextureMatrices)) ) { setupUserTextureMatrix(inlGetNumTextStages(), mat); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp index f787530e7..d1ef146f2 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp @@ -51,7 +51,7 @@ namespace NLDRIVERGL { // *************************************************************************** -CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoPtrList it) : IGPUProgramDrvInfos (drv, it) +CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoPtrList it) : IProgramDrvInfos (drv, it) { H_AUTO_OGL(CPixelProgamDrvInfosGL_CPixelProgamDrvInfosGL) // Extension must exist @@ -103,7 +103,7 @@ bool CDriverGL::compilePixelProgram(NL3D::CPixelProgram *program) _PixelProgramEnabled = false; // Insert into driver list. (so it is deleted when driver is deleted). - ItGPUPrgDrvInfoPtrList it = _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IGPUProgramDrvInfos*)NULL); + ItGPUPrgDrvInfoPtrList it = _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IProgramDrvInfos*)NULL); // Create a driver info CPixelProgamDrvInfosGL *drvInfo; @@ -136,7 +136,7 @@ bool CDriverGL::activeARBPixelProgram(CPixelProgram *program) if (!CDriverGL::compilePixelProgram(program)) return false; // Cast the driver info pointer - CPixelProgamDrvInfosGL *drvInfo = safe_cast((IGPUProgramDrvInfos*)program->m_DrvInfo); + CPixelProgamDrvInfosGL *drvInfo = safe_cast((IProgramDrvInfos*)program->m_DrvInfo); glEnable(GL_FRAGMENT_PROGRAM_ARB); _PixelProgramEnabled = true; @@ -159,10 +159,10 @@ bool CDriverGL::setupPixelProgram(CPixelProgram *program, GLuint id/*, bool &spe { H_AUTO_OGL(CDriverGL_setupARBPixelProgram) - CPixelProgamDrvInfosGL *drvInfo = static_cast((IGPUProgramDrvInfos *)program->m_DrvInfo); + CPixelProgamDrvInfosGL *drvInfo = static_cast((IProgramDrvInfos *)program->m_DrvInfo); // Find a supported pixel program profile - IGPUProgram::CSource *source = NULL; + IProgram::CSource *source = NULL; for (uint i = 0; i < program->getSourceNb(); ++i) { if (supportPixelProgram(program->getSource(i)->Profile)) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp index b3ba1ba54..9b0447dc5 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp @@ -310,7 +310,7 @@ void CDriverGL::setUniformFog(NL3D::IDriver::TProgram program, uint index) bool CDriverGL::setUniformDriver(TProgram program) { - IGPUProgram *prog = NULL; + IProgram *prog = NULL; switch (program) { case VertexProgram: @@ -322,66 +322,66 @@ bool CDriverGL::setUniformDriver(TProgram program) } if (!prog) return false; - const CGPUProgramFeatures &features = prog->features(); + const CProgramFeatures &features = prog->features(); if (features.DriverFlags) { - if (features.DriverFlags & CGPUProgramFeatures::Matrices) + if (features.DriverFlags & CProgramFeatures::Matrices) { - if (prog->getUniformIndex(CGPUProgramIndex::ModelView) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelView) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelView), ModelView, Identity); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelView), ModelView, Identity); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewInverse) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewInverse) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewInverse), ModelView, Inverse); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewInverse), ModelView, Inverse); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewTranspose) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewTranspose) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewTranspose), ModelView, Transpose); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewTranspose), ModelView, Transpose); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewInverseTranspose) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewInverseTranspose) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewInverseTranspose), ModelView, InverseTranspose); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewInverseTranspose), ModelView, InverseTranspose); } - if (prog->getUniformIndex(CGPUProgramIndex::Projection) != ~0) + if (prog->getUniformIndex(CProgramIndex::Projection) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::Projection), Projection, Identity); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::Projection), Projection, Identity); } - if (prog->getUniformIndex(CGPUProgramIndex::ProjectionInverse) != ~0) + if (prog->getUniformIndex(CProgramIndex::ProjectionInverse) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ProjectionInverse), Projection, Inverse); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ProjectionInverse), Projection, Inverse); } - if (prog->getUniformIndex(CGPUProgramIndex::ProjectionTranspose) != ~0) + if (prog->getUniformIndex(CProgramIndex::ProjectionTranspose) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ProjectionTranspose), Projection, Transpose); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ProjectionTranspose), Projection, Transpose); } - if (prog->getUniformIndex(CGPUProgramIndex::ProjectionInverseTranspose) != ~0) + if (prog->getUniformIndex(CProgramIndex::ProjectionInverseTranspose) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ProjectionInverseTranspose), Projection, InverseTranspose); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ProjectionInverseTranspose), Projection, InverseTranspose); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewProjection) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewProjection) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewProjection), ModelViewProjection, Identity); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewProjection), ModelViewProjection, Identity); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewProjectionInverse) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewProjectionInverse) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewProjectionInverse), ModelViewProjection, Inverse); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewProjectionInverse), ModelViewProjection, Inverse); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewProjectionTranspose) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewProjectionTranspose) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewProjectionTranspose), ModelViewProjection, Transpose); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewProjectionTranspose), ModelViewProjection, Transpose); } - if (prog->getUniformIndex(CGPUProgramIndex::ModelViewProjectionInverseTranspose) != ~0) + if (prog->getUniformIndex(CProgramIndex::ModelViewProjectionInverseTranspose) != ~0) { - setUniformMatrix(program, prog->getUniformIndex(CGPUProgramIndex::ModelViewProjectionInverseTranspose), ModelViewProjection, InverseTranspose); + setUniformMatrix(program, prog->getUniformIndex(CProgramIndex::ModelViewProjectionInverseTranspose), ModelViewProjection, InverseTranspose); } } - if (features.DriverFlags & CGPUProgramFeatures::Fog) + if (features.DriverFlags & CProgramFeatures::Fog) { - if (prog->getUniformIndex(CGPUProgramIndex::Fog) != ~0) + if (prog->getUniformIndex(CProgramIndex::Fog) != ~0) { - setUniformFog(program, prog->getUniformIndex(CGPUProgramIndex::Fog)); + setUniformFog(program, prog->getUniformIndex(CProgramIndex::Fog)); } } } @@ -391,7 +391,7 @@ bool CDriverGL::setUniformDriver(TProgram program) bool CDriverGL::setUniformMaterial(TProgram program, CMaterial &material) { - IGPUProgram *prog = NULL; + IProgram *prog = NULL; switch (program) { case VertexProgram: @@ -403,12 +403,12 @@ bool CDriverGL::setUniformMaterial(TProgram program, CMaterial &material) } if (!prog) return false; - const CGPUProgramFeatures &features = prog->features(); + const CProgramFeatures &features = prog->features(); // These are also already set by setupMaterial, so setupMaterial uses setUniformMaterialInternal instead - if (features.MaterialFlags & (CGPUProgramFeatures::TextureStages | CGPUProgramFeatures::TextureMatrices)) + if (features.MaterialFlags & (CProgramFeatures::TextureStages | CProgramFeatures::TextureMatrices)) { - if (features.MaterialFlags & CGPUProgramFeatures::TextureStages) + if (features.MaterialFlags & CProgramFeatures::TextureStages) { for (uint stage = 0; stage < inlGetNumTextStages(); ++stage) { @@ -427,7 +427,7 @@ bool CDriverGL::setUniformMaterial(TProgram program, CMaterial &material) } - if (features.MaterialFlags & CGPUProgramFeatures::TextureMatrices) + if (features.MaterialFlags & CProgramFeatures::TextureMatrices) { // Textures user matrix setupUserTextureMatrix(inlGetNumTextStages(), material); @@ -439,7 +439,7 @@ bool CDriverGL::setUniformMaterial(TProgram program, CMaterial &material) bool CDriverGL::setUniformMaterialInternal(TProgram program, CMaterial &material) { - IGPUProgram *prog = NULL; + IProgram *prog = NULL; switch (program) { case VertexProgram: @@ -451,9 +451,9 @@ bool CDriverGL::setUniformMaterialInternal(TProgram program, CMaterial &material } if (!prog) return false; - const CGPUProgramFeatures &features = prog->features(); + const CProgramFeatures &features = prog->features(); - if (features.MaterialFlags & ~(CGPUProgramFeatures::TextureStages | CGPUProgramFeatures::TextureMatrices)) + if (features.MaterialFlags & ~(CProgramFeatures::TextureStages | CProgramFeatures::TextureMatrices)) { // none } @@ -463,7 +463,7 @@ bool CDriverGL::setUniformMaterialInternal(TProgram program, CMaterial &material void CDriverGL::setUniformParams(TProgram program, CGPUProgramParams ¶ms) { - IGPUProgram *prog = NULL; + IProgram *prog = NULL; switch (program) { case VertexProgram: diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp index dd1351955..6df62dfc3 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp @@ -1151,7 +1151,7 @@ void CDriverGL::toggleGlArraysForEXTVertexShader() CVertexProgram *vp = _LastSetuppedVP; if (vp) { - CVertexProgamDrvInfosGL *drvInfo = NLMISC::safe_cast((IGPUProgramDrvInfos *) vp->m_DrvInfo); + CVertexProgamDrvInfosGL *drvInfo = NLMISC::safe_cast((IProgramDrvInfos *) vp->m_DrvInfo); if (drvInfo) { // Disable all VertexAttribs. @@ -1396,7 +1396,7 @@ void CDriverGL::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb) CVertexProgram *vp = _LastSetuppedVP; if (!vp) return; - CVertexProgamDrvInfosGL *drvInfo = NLMISC::safe_cast((IGPUProgramDrvInfos *) vp->m_DrvInfo); + CVertexProgamDrvInfosGL *drvInfo = NLMISC::safe_cast((IProgramDrvInfos *) vp->m_DrvInfo); if (!drvInfo) return; uint32 flags= vb.VertexFormat; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index a5e00d3f1..5470ec5c5 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -41,7 +41,7 @@ namespace NLDRIVERGL { #endif // *************************************************************************** -CVertexProgamDrvInfosGL::CVertexProgamDrvInfosGL(CDriverGL *drv, ItGPUPrgDrvInfoPtrList it) : IGPUProgramDrvInfos (drv, it) +CVertexProgamDrvInfosGL::CVertexProgamDrvInfosGL(CDriverGL *drv, ItGPUPrgDrvInfoPtrList it) : IProgramDrvInfos (drv, it) { H_AUTO_OGL(CVertexProgamDrvInfosGL_CVertexProgamDrvInfosGL); @@ -98,7 +98,7 @@ bool CDriverGL::compileNVVertexProgram(CVertexProgram *program) _VertexProgramEnabled = false; // Find nelvp - IGPUProgram::CSource *source = NULL; + IProgram::CSource *source = NULL; for (uint i = 0; i < program->getSourceNb(); ++i) { if (program->getSource(i)->Profile == CVertexProgram::nelvp) @@ -130,7 +130,7 @@ bool CDriverGL::compileNVVertexProgram(CVertexProgram *program) } // Insert into driver list. (so it is deleted when driver is deleted). - ItGPUPrgDrvInfoPtrList it = _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IGPUProgramDrvInfos*)NULL); + ItGPUPrgDrvInfoPtrList it = _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IProgramDrvInfos*)NULL); // Create a driver info *it = drvInfo = new CVertexProgamDrvInfosGL(this, it); @@ -208,7 +208,7 @@ bool CDriverGL::activeNVVertexProgram(CVertexProgram *program) if (program) { // Driver info - CVertexProgamDrvInfosGL *drvInfo = safe_cast((IGPUProgramDrvInfos*)program->m_DrvInfo); + CVertexProgamDrvInfosGL *drvInfo = safe_cast((IProgramDrvInfos*)program->m_DrvInfo); nlassert(drvInfo); // Enable vertex program @@ -1529,7 +1529,7 @@ bool CDriverGL::compileARBVertexProgram(NL3D::CVertexProgram *program) _VertexProgramEnabled = false; // Find nelvp - IGPUProgram::CSource *source = NULL; + IProgram::CSource *source = NULL; for (uint i = 0; i < program->getSourceNb(); ++i) { if (program->getSource(i)->Profile == CVertexProgram::nelvp) @@ -1557,7 +1557,7 @@ bool CDriverGL::compileARBVertexProgram(NL3D::CVertexProgram *program) return false; } // Insert into driver list. (so it is deleted when driver is deleted). - ItGPUPrgDrvInfoPtrList it = _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IGPUProgramDrvInfos*)NULL); + ItGPUPrgDrvInfoPtrList it = _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IProgramDrvInfos*)NULL); // Create a driver info CVertexProgamDrvInfosGL *drvInfo; @@ -1600,7 +1600,7 @@ bool CDriverGL::activeARBVertexProgram(CVertexProgram *program) if (program) { // Driver info - CVertexProgamDrvInfosGL *drvInfo = safe_cast((IGPUProgramDrvInfos*)program->m_DrvInfo); + CVertexProgamDrvInfosGL *drvInfo = safe_cast((IProgramDrvInfos*)program->m_DrvInfo); nlassert(drvInfo); glEnable( GL_VERTEX_PROGRAM_ARB ); @@ -1644,7 +1644,7 @@ bool CDriverGL::compileEXTVertexShader(CVertexProgram *program) _VertexProgramEnabled = false; // Find nelvp - IGPUProgram::CSource *source = NULL; + IProgram::CSource *source = NULL; for (uint i = 0; i < program->getSourceNb(); ++i) { if (program->getSource(i)->Profile == CVertexProgram::nelvp) @@ -1684,7 +1684,7 @@ bool CDriverGL::compileEXTVertexShader(CVertexProgram *program) */ // Insert into driver list. (so it is deleted when driver is deleted). - ItGPUPrgDrvInfoPtrList it= _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IGPUProgramDrvInfos*)NULL); + ItGPUPrgDrvInfoPtrList it= _GPUPrgDrvInfos.insert(_GPUPrgDrvInfos.end(), (NL3D::IProgramDrvInfos*)NULL); // Create a driver info CVertexProgamDrvInfosGL *drvInfo; @@ -1727,7 +1727,7 @@ bool CDriverGL::activeEXTVertexShader(CVertexProgram *program) if (program) { // Driver info - CVertexProgamDrvInfosGL *drvInfo = safe_cast((IGPUProgramDrvInfos*)program->m_DrvInfo); + CVertexProgamDrvInfosGL *drvInfo = safe_cast((IProgramDrvInfos*)program->m_DrvInfo); nlassert(drvInfo); glEnable(GL_VERTEX_SHADER_EXT); diff --git a/code/nel/src/3d/landscape.cpp b/code/nel/src/3d/landscape.cpp index 06054a48d..0dc3d2a82 100644 --- a/code/nel/src/3d/landscape.cpp +++ b/code/nel/src/3d/landscape.cpp @@ -1207,7 +1207,7 @@ void CLandscape::render(const CVector &refineCenter, const CVector &frontVecto _TileVB.activateVP(i); // c[0..3] take the ModelViewProjection Matrix. - driver->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); + driver->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); // c[4] take useful constants. driver->setUniform4f(IDriver::VertexProgram, program->idx().ProgramConstants0, 0, 1, 0.5f, 0); // c[5] take RefineCenter @@ -1215,7 +1215,7 @@ void CLandscape::render(const CVector &refineCenter, const CVector &frontVecto // c[6] take info for Geomorph trnasition to TileNear. driver->setUniform2f(IDriver::VertexProgram, program->idx().TileDist, CLandscapeGlobals::TileDistFarSqr, CLandscapeGlobals::OOTileDistDeltaSqr); // c[10] take the fog vector. - driver->setUniformFog(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::Fog)); + driver->setUniformFog(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::Fog)); // c[12] take the current landscape Center / delta Pos to apply driver->setUniform3f(IDriver::VertexProgram, program->idx().PZBModelPosition, _PZBModelPosition); } diff --git a/code/nel/src/3d/meshvp_per_pixel_light.cpp b/code/nel/src/3d/meshvp_per_pixel_light.cpp index b607aa7d5..7b189107d 100644 --- a/code/nel/src/3d/meshvp_per_pixel_light.cpp +++ b/code/nel/src/3d/meshvp_per_pixel_light.cpp @@ -555,7 +555,7 @@ bool CMeshVPPerPixelLight::begin(IDriver *drv, } // c[0..3] take the ModelViewProjection Matrix. After setupModelMatrix(); - drv->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); + drv->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); return true; } diff --git a/code/nel/src/3d/meshvp_wind_tree.cpp b/code/nel/src/3d/meshvp_wind_tree.cpp index 174adfda8..2ab76dc1f 100644 --- a/code/nel/src/3d/meshvp_wind_tree.cpp +++ b/code/nel/src/3d/meshvp_wind_tree.cpp @@ -315,10 +315,10 @@ inline void CMeshVPWindTree::setupPerInstanceConstants(IDriver *driver, CScene setupLighting(scene, mbi, invertedModelMat); // c[0..3] take the ModelViewProjection Matrix. After setupModelMatrix(); - driver->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::ModelViewProjection), + driver->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); // c[4..7] take the ModelView Matrix. After setupModelMatrix();00 - driver->setUniformFog(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::Fog)); + driver->setUniformFog(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::Fog)); // c[15] take Wind of level 0. diff --git a/code/nel/src/3d/gpu_program.cpp b/code/nel/src/3d/program.cpp similarity index 81% rename from code/nel/src/3d/gpu_program.cpp rename to code/nel/src/3d/program.cpp index 4e5916398..facf877fc 100644 --- a/code/nel/src/3d/gpu_program.cpp +++ b/code/nel/src/3d/program.cpp @@ -1,9 +1,9 @@ /** - * \file gpu_program.cpp - * \brief IGPUProgram + * \file program.cpp + * \brief IProgram * \date 2013-09-07 15:00GMT * \author Jan Boon (Kaetemi) - * IGPUProgram + * IProgram */ /* @@ -26,7 +26,7 @@ */ #include -#include +#include // STL includes @@ -44,7 +44,7 @@ namespace NL3D { // *************************************************************************** -IGPUProgramDrvInfos::IGPUProgramDrvInfos(IDriver *drv, ItGPUPrgDrvInfoPtrList it) +IProgramDrvInfos::IProgramDrvInfos(IDriver *drv, ItGPUPrgDrvInfoPtrList it) { _Driver = drv; _DriverIterator = it; @@ -52,27 +52,27 @@ IGPUProgramDrvInfos::IGPUProgramDrvInfos(IDriver *drv, ItGPUPrgDrvInfoPtrList it // *************************************************************************** -IGPUProgramDrvInfos::~IGPUProgramDrvInfos () +IProgramDrvInfos::~IProgramDrvInfos () { _Driver->removeGPUPrgDrvInfoPtr(_DriverIterator); } // *************************************************************************** -IGPUProgram::IGPUProgram() +IProgram::IProgram() { } // *************************************************************************** -IGPUProgram::~IGPUProgram() +IProgram::~IProgram() { // Must kill the drv mirror of this program. m_DrvInfo.kill(); } -const char *CGPUProgramIndex::Names[NUM_UNIFORMS] = +const char *CProgramIndex::Names[NUM_UNIFORMS] = { "modelView", "modelViewInverse", @@ -92,14 +92,14 @@ const char *CGPUProgramIndex::Names[NUM_UNIFORMS] = "fog", }; -void IGPUProgram::buildInfo(CSource *source) +void IProgram::buildInfo(CSource *source) { nlassert(!m_Source); m_Source = source; // Fill index cache - for (int i = 0; i < CGPUProgramIndex::NUM_UNIFORMS; ++i) + for (int i = 0; i < CProgramIndex::NUM_UNIFORMS; ++i) { m_Index.Indices[i] = getUniformIndex(m_Index.Names[i]); } @@ -107,7 +107,7 @@ void IGPUProgram::buildInfo(CSource *source) buildInfo(); } -void IGPUProgram::buildInfo() +void IProgram::buildInfo() { } diff --git a/code/nel/src/3d/stereo_debugger.cpp b/code/nel/src/3d/stereo_debugger.cpp index 74d8806f0..c5c5e262a 100644 --- a/code/nel/src/3d/stereo_debugger.cpp +++ b/code/nel/src/3d/stereo_debugger.cpp @@ -163,17 +163,17 @@ void CStereoDebugger::setDriver(NL3D::UDriver *driver) m_PixelProgram = new CPixelProgram(); // arbfp1 { - IGPUProgram::CSource *source = new IGPUProgram::CSource(); - source->Features.MaterialFlags = CGPUProgramFeatures::TextureStages; - source->Profile = IGPUProgram::arbfp1; + IProgram::CSource *source = new IProgram::CSource(); + source->Features.MaterialFlags = CProgramFeatures::TextureStages; + source->Profile = IProgram::arbfp1; source->setSourcePtr(a_arbfp1); m_PixelProgram->addSource(source); } // ps_2_0 { - IGPUProgram::CSource *source = new IGPUProgram::CSource(); - source->Features.MaterialFlags = CGPUProgramFeatures::TextureStages; - source->Profile = IGPUProgram::ps_2_0; + IProgram::CSource *source = new IProgram::CSource(); + source->Features.MaterialFlags = CProgramFeatures::TextureStages; + source->Profile = IProgram::ps_2_0; source->setSourcePtr(a_ps_2_0); m_PixelProgram->addSource(source); } diff --git a/code/nel/src/3d/stereo_ovr.cpp b/code/nel/src/3d/stereo_ovr.cpp index b3eb2f235..46a8d147c 100644 --- a/code/nel/src/3d/stereo_ovr.cpp +++ b/code/nel/src/3d/stereo_ovr.cpp @@ -251,14 +251,14 @@ public: { CSource *source = new CSource(); source->Profile = glsl330f; - source->Features.MaterialFlags = CGPUProgramFeatures::TextureStages; + source->Features.MaterialFlags = CProgramFeatures::TextureStages; source->setSourcePtr(g_StereoOVR_glsl330f); addSource(source); } { CSource *source = new CSource(); source->Profile = fp40; - source->Features.MaterialFlags = CGPUProgramFeatures::TextureStages; + source->Features.MaterialFlags = CProgramFeatures::TextureStages; source->setSourcePtr(g_StereoOVR_fp40); source->ParamIndices["cLensCenter"] = 0; source->ParamIndices["cScreenCenter"] = 1; @@ -270,7 +270,7 @@ public: { CSource *source = new CSource(); source->Profile = arbfp1; - source->Features.MaterialFlags = CGPUProgramFeatures::TextureStages; + source->Features.MaterialFlags = CProgramFeatures::TextureStages; source->setSourcePtr(g_StereoOVR_arbfp1); source->ParamIndices["cLensCenter"] = 0; source->ParamIndices["cScreenCenter"] = 1; @@ -282,7 +282,7 @@ public: { CSource *source = new CSource(); source->Profile = ps_2_0; - source->Features.MaterialFlags = CGPUProgramFeatures::TextureStages; + source->Features.MaterialFlags = CProgramFeatures::TextureStages; source->setSourcePtr(g_StereoOVR_ps_2_0); source->ParamIndices["cLensCenter"] = 0; source->ParamIndices["cScreenCenter"] = 1; diff --git a/code/nel/src/3d/vegetable_manager.cpp b/code/nel/src/3d/vegetable_manager.cpp index d548413a8..ba44a766f 100644 --- a/code/nel/src/3d/vegetable_manager.cpp +++ b/code/nel/src/3d/vegetable_manager.cpp @@ -1872,11 +1872,11 @@ void CVegetableManager::setupVertexProgramConstants(IDriver *driver, bool fogE // Standard // setup VertexProgram constants. // c[0..3] take the ModelViewProjection Matrix. After setupModelMatrix(); - driver->setUniformMatrix(IDriver::VertexProgram, _ActiveVertexProgram->getUniformIndex(CGPUProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); + driver->setUniformMatrix(IDriver::VertexProgram, _ActiveVertexProgram->getUniformIndex(CProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); // c[6] take the Fog vector. After setupModelMatrix(); if (fogEnabled) { - driver->setUniformFog(IDriver::VertexProgram, _ActiveVertexProgram->getUniformIndex(CGPUProgramIndex::Fog)); + driver->setUniformFog(IDriver::VertexProgram, _ActiveVertexProgram->getUniformIndex(CProgramIndex::Fog)); } // c[8] take useful constants. driver->setUniform4f(IDriver::VertexProgram, _ActiveVertexProgram->idx().ProgramConstants0, 0, 1, 0.5f, 2); diff --git a/code/nel/src/3d/vertex_program.cpp b/code/nel/src/3d/vertex_program.cpp index b47e706ee..d0c0cfb79 100644 --- a/code/nel/src/3d/vertex_program.cpp +++ b/code/nel/src/3d/vertex_program.cpp @@ -36,7 +36,7 @@ CVertexProgram::CVertexProgram() CVertexProgram::CVertexProgram(const char *nelvp) { CSource *source = new CSource(); - source->Profile = IGPUProgram::nelvp; + source->Profile = IProgram::nelvp; source->setSource(nelvp); addSource(source); } diff --git a/code/nel/src/3d/water_env_map.cpp b/code/nel/src/3d/water_env_map.cpp index 6bc6beda5..4fc5819af 100644 --- a/code/nel/src/3d/water_env_map.cpp +++ b/code/nel/src/3d/water_env_map.cpp @@ -303,7 +303,7 @@ void CWaterEnvMap::renderTestMesh(IDriver &driver) driver.activeVertexBuffer(_TestVB); driver.activeIndexBuffer(_TestIB); _MaterialPassThruZTest.setTexture(0, _EnvCubic); - driver.setUniformMatrix(IDriver::VertexProgram, testMeshVP->getUniformIndex(CGPUProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); + driver.setUniformMatrix(IDriver::VertexProgram, testMeshVP->getUniformIndex(CProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); driver.setUniform2f(IDriver::VertexProgram, testMeshVP->idx().ProgramConstant0, 2.f, 1.f); //driver.renderTriangles(testMat, 0, TEST_VB_NUM_TRIS); driver.renderTriangles(_MaterialPassThruZTest, 0, TEST_VB_NUM_TRIS); diff --git a/code/nel/src/3d/water_model.cpp b/code/nel/src/3d/water_model.cpp index 6a239b6e0..eb8ceae27 100644 --- a/code/nel/src/3d/water_model.cpp +++ b/code/nel/src/3d/water_model.cpp @@ -958,8 +958,8 @@ void CWaterModel::setupMaterialNVertexShader(IDriver *drv, CWaterShape *shape, c drv->setUniform4f(IDriver::VertexProgram, program->idx().DiffuseMapVector1, _ColorMapMatColumn0.y, _ColorMapMatColumn1.y, 0, _ColorMapMatColumn0.y * obsPos.x + _ColorMapMatColumn1.y * obsPos.y + _ColorMapMatPos.y); } // set builtins - drv->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); - drv->setUniformFog(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::Fog)); + drv->setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::ModelViewProjection), IDriver::ModelViewProjection, IDriver::Identity); + drv->setUniformFog(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::Fog)); // retrieve current time double date = scene->getCurrentTime(); // set bumpmaps pos diff --git a/code/ryzom/client/src/decal.cpp b/code/ryzom/client/src/decal.cpp index 073c1ef0d..1454d9f59 100644 --- a/code/ryzom/client/src/decal.cpp +++ b/code/ryzom/client/src/decal.cpp @@ -373,7 +373,7 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/* memcpy(vba.getVertexCoordPointer(), &_TriCache[0], sizeof(CRGBAVertex) * _TriCache.size()); } drv.activeVertexBuffer(_VB); - drv.setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CGPUProgramIndex::ModelViewProjection), NL3D::IDriver::ModelViewProjection, NL3D::IDriver::Identity); + drv.setUniformMatrix(IDriver::VertexProgram, program->getUniformIndex(CProgramIndex::ModelViewProjection), NL3D::IDriver::ModelViewProjection, NL3D::IDriver::Identity); drv.setUniform4f(IDriver::VertexProgram, program->idx().WorldToUV0, _WorldToUVMatrix[0][0], _WorldToUVMatrix[1][0], _WorldToUVMatrix[2][0], _WorldToUVMatrix[3][0]); drv.setUniform4f(IDriver::VertexProgram, program->idx().WorldToUV1, _WorldToUVMatrix[0][1], _WorldToUVMatrix[1][1], _WorldToUVMatrix[2][1], _WorldToUVMatrix[3][1]); drv.setUniform4f(IDriver::VertexProgram, program->idx().Diffuse, _Diffuse.R * (1.f / 255.f), _Diffuse.G * (1.f / 255.f), _Diffuse.B * (1.f / 255.f), 1.f);