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
master
hybrid 2011-06-06 20:19:17 +00:00
parent 34d1b8b827
commit a959a76b0c
2 changed files with 15 additions and 6 deletions

View File

@ -66,6 +66,13 @@
#include "glxext.h"
#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
/* GL type for program/shader text */
typedef char GLchar;
@ -1041,7 +1048,7 @@ class COpenGLExtensionHandler
void extGlDisableIndexed(GLenum target, GLuint index);
void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst);
void extGlBlendEquationIndexed(GLuint buf, GLenum mode);
void extGlProgramParameteri(GLuint program, GLenum pname, GLint value);
void extGlProgramParameteri(GLhandleARB program, GLenum pname, GLint value);
// occlusion query
void extGlGenQueries(GLsizei n, GLuint *ids);
@ -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 (queryFeature(EVDF_GEOMETRY_SHADER))
@ -2223,6 +2230,7 @@ inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLen
#endif
}
inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
@ -2239,6 +2247,7 @@ inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids)
#endif
}
inline void COpenGLExtensionHandler::extGlDeleteQueries(GLsizei n, const GLuint *ids)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_

View File

@ -157,12 +157,12 @@ void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr,
}
else
{
Driver->extGlProgramParameteri((GLuint)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_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
Driver->extGlProgramParameteri(Program, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
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
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)
if (verticesOut==0)