- Fixed compilation errors related to issues in COGLCoreCacheHandler.h.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5166 dfc29bdd-3216-0410-991c-e03cc46cb475
master
nadro 2015-10-21 19:10:02 +00:00
parent d6a197b5a8
commit 6911048335
5 changed files with 7 additions and 10 deletions

View File

@ -9,8 +9,8 @@
#if defined(_IRR_COMPILE_WITH_OPENGL_) || defined(_IRR_COMPILE_WITH_OGLES1_) || defined(_IRR_COMPILE_WITH_OGLES2_) #if defined(_IRR_COMPILE_WITH_OPENGL_) || defined(_IRR_COMPILE_WITH_OGLES1_) || defined(_IRR_COMPILE_WITH_OGLES2_)
#include "EDriverTypes.h"
#include "SMaterial.h" #include "SMaterial.h"
#include "ITexture.h"
namespace irr namespace irr
{ {
@ -454,7 +454,6 @@ public:
if (FrameBufferID != frameBufferID) if (FrameBufferID != frameBufferID)
{ {
Driver->irrGlBindFramebuffer(GL_FRAMEBUFFER, frameBufferID); Driver->irrGlBindFramebuffer(GL_FRAMEBUFFER, frameBufferID);
FrameBufferID = frameBufferID; FrameBufferID = frameBufferID;
} }
} }
@ -465,7 +464,7 @@ public:
{ {
if (ProgramID != programID) if (ProgramID != programID)
{ {
glUseProgram(programID); Driver->irrGlUseProgram(programID);
ProgramID = programID; ProgramID = programID;
} }
} }

View File

@ -11,8 +11,6 @@
#include "IRenderTarget.h" #include "IRenderTarget.h"
#include "dimension2d.h"
namespace irr namespace irr
{ {
namespace video namespace video

View File

@ -18,7 +18,7 @@ namespace video
COpenGLCacheHandler::COpenGLCacheHandler(COpenGLDriver* driver) : COpenGLCacheHandler::COpenGLCacheHandler(COpenGLDriver* driver) :
COGLCoreCacheHandler<COpenGLDriver, COpenGLTexture>(driver), AlphaMode(GL_ALWAYS), AlphaRef(0.f), AlphaTest(false), COGLCoreCacheHandler<COpenGLDriver, COpenGLTexture>(driver), AlphaMode(GL_ALWAYS), AlphaRef(0.f), AlphaTest(false),
DepthTest(false), MatrixMode(GL_MODELVIEW), ClientActiveTexture(GL_TEXTURE0_ARB), ClientStateVertex(false), DepthTest(false), MatrixMode(GL_MODELVIEW), ClientActiveTexture(GL_TEXTURE0), ClientStateVertex(false),
ClientStateNormal(false), ClientStateColor(false), ClientStateTexCoord0(false) ClientStateNormal(false), ClientStateColor(false), ClientStateTexCoord0(false)
{ {
// Initial OpenGL values from specification. // Initial OpenGL values from specification.

View File

@ -1218,7 +1218,7 @@ class COpenGLExtensionHandler
// that handleARB and uint are the same type // that handleARB and uint are the same type
void extGlLinkProgram(GLuint program); void extGlLinkProgram(GLuint program);
void extGlUseProgramObject(GLhandleARB prog); void extGlUseProgramObject(GLhandleARB prog);
void extGlUseProgram(GLuint prog); void irrGlUseProgram(GLuint prog);
void extGlDeleteObject(GLhandleARB object); void extGlDeleteObject(GLhandleARB object);
void extGlDeleteProgram(GLuint object); void extGlDeleteProgram(GLuint object);
void extGlDeleteShader(GLuint shader); void extGlDeleteShader(GLuint shader);
@ -1733,7 +1733,7 @@ inline void COpenGLExtensionHandler::extGlUseProgramObject(GLhandleARB prog)
#endif #endif
} }
inline void COpenGLExtensionHandler::extGlUseProgram(GLuint prog) inline void COpenGLExtensionHandler::irrGlUseProgram(GLuint prog)
{ {
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlUseProgram) if (pGlUseProgram)

View File

@ -238,7 +238,7 @@ void COpenGLSLMaterialRenderer::OnSetMaterial(const video::SMaterial& material,
if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates)
{ {
if (Program2) if (Program2)
Driver->extGlUseProgram(Program2); Driver->irrGlUseProgram(Program2);
else if (Program) else if (Program)
Driver->extGlUseProgramObject(Program); Driver->extGlUseProgramObject(Program);
} }
@ -290,7 +290,7 @@ void COpenGLSLMaterialRenderer::OnUnsetMaterial()
if (Program) if (Program)
Driver->extGlUseProgramObject(0); Driver->extGlUseProgramObject(0);
if (Program2) if (Program2)
Driver->extGlUseProgram(0); Driver->irrGlUseProgram(0);
} }