Projects
Eulaceura:Factory
ogre
_service:obs_scm:ogre-1.9.0-glew.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:ogre-1.9.0-glew.patch of Package ogre
diff -uNr ogre-1.9.0/RenderSystems/GL/include/GL/glew.h ogre-1.9.0.glew/RenderSystems/GL/include/GL/glew.h --- ogre-1.9.0/RenderSystems/GL/include/GL/glew.h 2014-06-07 21:12:14.000000000 +0400 +++ ogre-1.9.0.glew/RenderSystems/GL/include/GL/glew.h 2014-06-07 21:45:03.422493324 +0400 @@ -109,6 +109,11 @@ #define __GLEXT_H_ #define __gl_ATI_h_ +// SJS +// Build statically +#define GLEW_STATIC +// SJS + #if defined(_WIN32) /* diff -uNr ogre-1.9.0/RenderSystems/GL/src/glew.cpp ogre-1.9.0.glew/RenderSystems/GL/src/glew.cpp --- ogre-1.9.0/RenderSystems/GL/src/glew.cpp 2014-06-07 21:12:16.000000000 +0400 +++ ogre-1.9.0.glew/RenderSystems/GL/src/glew.cpp 2014-06-07 21:48:09.519775784 +0400 @@ -29,6 +29,10 @@ ** THE POSSIBILITY OF SUCH DAMAGE. */ +// SJS +#include "OgreGLSupport.h" +// SJS + #include <GL/glew.h> #if defined(_WIN32) @@ -57,13 +61,21 @@ # endif /* _WIN32 */ # define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx #else /* GLEW_MX */ -# define GLEW_CONTEXT_ARG_DEF_INIT void -# define GLEW_CONTEXT_ARG_VAR_INIT -# define GLEW_CONTEXT_ARG_DEF_LIST void -# define WGLEW_CONTEXT_ARG_DEF_INIT void -# define WGLEW_CONTEXT_ARG_DEF_LIST void -# define GLXEW_CONTEXT_ARG_DEF_INIT void -# define GLXEW_CONTEXT_ARG_DEF_LIST void +// SJS +# define GLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport +# define GLEW_CONTEXT_ARG_VAR_INIT glSupport +# define GLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport +# define WGLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport +# define WGLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport +# define GLXEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport +# define GLXEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport +//# define GLEW_CONTEXT_ARG_DEF_INIT void +//# define GLEW_CONTEXT_ARG_VAR_INIT +//# define GLEW_CONTEXT_ARG_DEF_LIST void +//# define WGLEW_CONTEXT_ARG_DEF_INIT void +//# define WGLEW_CONTEXT_ARG_DEF_LIST void +//# define GLXEW_CONTEXT_ARG_DEF_INIT void +//# define GLXEW_CONTEXT_ARG_DEF_LIST void #endif /* GLEW_MX */ #if defined(__sgi) || defined (__sun) || defined(GLEW_APPLE_GLX) @@ -137,7 +149,7 @@ #endif } /* prepend a '_' for the Unix C symbol mangling convention */ - symbolName = malloc(strlen((const char*)name) + 2); + symbolName = (char*)malloc(strlen((const char*)name) + 2); strcpy(symbolName+1, (const char*)name); symbolName[0] = '_'; symbol = NULL; @@ -9481,9 +9493,11 @@ /* ------------------------------------------------------------------------- */ -#ifndef GLEW_MX -static -#endif +// SJS +//#ifndef GLEW_MX +//static +//#endif +// SJS GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) { const GLubyte* s; @@ -12543,7 +12557,14 @@ { GLboolean r = GL_FALSE; - r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; + // SJS + // FB: Patched to allow Ogre to overload glXGetCurrentDisplay + if (glXGetCurrentDisplay == NULL) + { + r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; + } + //r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; + // SJS return r; } @@ -13476,19 +13497,21 @@ extern GLenum GLEWAPIENTRY glxewContextInit (void); #endif /* _WIN32 */ -GLenum GLEWAPIENTRY glewInit (void) -{ - GLenum r; - r = glewContextInit(); - if ( r != 0 ) return r; -#if defined(_WIN32) - return wglewContextInit(); -#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */ - return glxewContextInit(); -#else - return r; -#endif /* _WIN32 */ -} +// SJS +//GLenum GLEWAPIENTRY glewInit (void) +//{ +// GLenum r; +// r = glewContextInit(); +// if ( r != 0 ) return r; +//#if defined(_WIN32) +// return wglewContextInit(); +//#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */ +// return glxewContextInit(); +//#else +// return r; +//#endif /* _WIN32 */ +//} +// End SJS #endif /* !GLEW_MX */ #ifdef GLEW_MX
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2