Commit a959a76b authored by hybrid's avatar hybrid

Unify incompatible parameter types, mentioned by balrog

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3809 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 34d1b8b8
...@@ -66,6 +66,13 @@ ...@@ -66,6 +66,13 @@
#include "glxext.h" #include "glxext.h"
#endif #endif
#endif #endif
#ifndef GL_ARB_shader_objects
/* GL types for program/shader text and shader object handles */
typedef char GLcharARB;
typedef unsigned int GLhandleARB;
#endif
#ifndef GL_VERSION_2_0 #ifndef GL_VERSION_2_0
/* GL type for program/shader text */ /* GL type for program/shader text */
typedef char GLchar; typedef char GLchar;
...@@ -1041,7 +1048,7 @@ class COpenGLExtensionHandler ...@@ -1041,7 +1048,7 @@ class COpenGLExtensionHandler
void extGlDisableIndexed(GLenum target, GLuint index); void extGlDisableIndexed(GLenum target, GLuint index);
void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst); void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst);
void extGlBlendEquationIndexed(GLuint buf, GLenum mode); void extGlBlendEquationIndexed(GLuint buf, GLenum mode);
void extGlProgramParameteri(GLuint program, GLenum pname, GLint value); void extGlProgramParameteri(GLhandleARB program, GLenum pname, GLint value);
// occlusion query // occlusion query
void extGlGenQueries(GLsizei n, GLuint *ids); void extGlGenQueries(GLsizei n, GLuint *ids);
...@@ -2202,7 +2209,7 @@ inline void COpenGLExtensionHandler::extGlBlendEquationIndexed(GLuint buf, GLenu ...@@ -2202,7 +2209,7 @@ inline void COpenGLExtensionHandler::extGlBlendEquationIndexed(GLuint buf, GLenu
} }
inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLenum pname, GLint value) inline void COpenGLExtensionHandler::extGlProgramParameteri(GLhandleARB program, GLenum pname, GLint value)
{ {
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
if (queryFeature(EVDF_GEOMETRY_SHADER)) if (queryFeature(EVDF_GEOMETRY_SHADER))
...@@ -2223,6 +2230,7 @@ inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLen ...@@ -2223,6 +2230,7 @@ inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLen
#endif #endif
} }
inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids) inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids)
{ {
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
...@@ -2239,6 +2247,7 @@ inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids) ...@@ -2239,6 +2247,7 @@ inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids)
#endif #endif
} }
inline void COpenGLExtensionHandler::extGlDeleteQueries(GLsizei n, const GLuint *ids) inline void COpenGLExtensionHandler::extGlDeleteQueries(GLsizei n, const GLuint *ids)
{ {
#ifdef _IRR_OPENGL_USE_EXTPOINTER_ #ifdef _IRR_OPENGL_USE_EXTPOINTER_
......
...@@ -157,12 +157,12 @@ void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr, ...@@ -157,12 +157,12 @@ void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr,
} }
else else
{ {
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType)); Driver->extGlProgramParameteri(Program, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType)); Driver->extGlProgramParameteri(Program, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
if (verticesOut==0) if (verticesOut==0)
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut); Driver->extGlProgramParameteri(Program, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut);
else else
Driver->extGlProgramParameteri((GLuint)Program, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut)); Driver->extGlProgramParameteri(Program, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
} }
#elif defined(GL_NV_geometry_program4) #elif defined(GL_NV_geometry_program4)
if (verticesOut==0) if (verticesOut==0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment