From c520db663fc16d05ba162754858d06920c94561a Mon Sep 17 00:00:00 2001 From: vincentlj Date: Mon, 13 Jan 2014 15:28:37 +0000 Subject: [PATCH] OGL32CTX: Some fixes. The track is now displayed (even with light) but not the karts, animations... git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15046 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/graphics/glwrap.cpp | 2 +- src/graphics/stkmesh.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/graphics/glwrap.cpp b/src/graphics/glwrap.cpp index 63d541d05..b7999f8ff 100644 --- a/src/graphics/glwrap.cpp +++ b/src/graphics/glwrap.cpp @@ -174,7 +174,7 @@ void initGL() glUniform1fv = (PFNGLUNIFORM1FVPROC)IRR_OGL_LOAD_EXTENSION("glUniform1fv"); glUniform4fv = (PFNGLUNIFORM4FVPROC)IRR_OGL_LOAD_EXTENSION("glUniform4fv"); #endif -#if ENABLE_ARB_DEBUG_OUTPUT +#ifdef ENABLE_ARB_DEBUG_OUTPUT glDebugMessageCallbackARB(debugCallback, NULL); #endif const float quad_vertex[] = { diff --git a/src/graphics/stkmesh.cpp b/src/graphics/stkmesh.cpp index 29cd7ce4b..57cdcec0f 100644 --- a/src/graphics/stkmesh.cpp +++ b/src/graphics/stkmesh.cpp @@ -321,14 +321,18 @@ void STKMesh::render() video::IMaterialRenderer* rnd = driver->getMaterialRenderer(material.MaterialType); bool transparent = (rnd && rnd->isTransparent()); +#ifdef OGL32CTX // only render transparent buffer if this is the transparent render pass // and solid only in solid pass -/* if (isObject(material.MaterialType) && !isTransparentPass && !transparent) + if (isObject(material.MaterialType) && !isTransparentPass && !transparent) { initvaostate(GLmeshes[i], material.MaterialType); draw(GLmeshes[i], material.MaterialType); } - else*/ if (transparent == isTransparentPass) + else if (transparent == isTransparentPass) +#else + if (transparent == isTransparentPass) +#endif { driver->setMaterial(material); driver->drawMeshBuffer(mb);