From bd9bd3f8b2055546e93a7643fbd6520a1e088b65 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 9 Jun 2015 12:51:38 +0000 Subject: [PATCH] Added namespace around typedef to avoid conflict issues git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14903 16af8721-9629-0410-8352-f15c8da7e697 --- include/osg/GLDefines | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/include/osg/GLDefines b/include/osg/GLDefines index 02e0bd719..ef320c46e 100644 --- a/include/osg/GLDefines +++ b/include/osg/GLDefines @@ -589,25 +589,28 @@ typedef char GLchar; #define GL_RASTERIZER_DISCARD 0x8C89 #endif -#ifndef GL_VERSION_3_2 -typedef struct __GLsync *GLsync; -#endif - -// for compatibility with gl.h headers that don't support VBO, -//GL_VERSION_1_5 and GL_ARB_vertex_buffer_object provide these types for OpenGL -//all ES versions except GL_OES_VERSION_1_0 provide these types for OpenGL ES -#if !defined(GL_VERSION_1_5) && !defined(GL_ARB_vertex_buffer_object) \ - && !defined(GL_ES_VERSION_2_0) && !defined(OPENGLES_1_1_FOUND) - #if defined(_WIN64) - typedef __int64 GLintptr; - typedef __int64 GLsizeiptr; - #elif defined(__ia64__) || defined(__x86_64__) || defined(__ANDROID__) - typedef long int GLintptr; - typedef long int GLsizeiptr; - #else - typedef int GLintptr; - typedef int GLsizeiptr; +namespace osg +{ + #ifndef GL_VERSION_3_2 + typedef struct __GLsync *GLsync; #endif -#endif + + // for compatibility with gl.h headers that don't support VBO, + //GL_VERSION_1_5 and GL_ARB_vertex_buffer_object provide these types for OpenGL + //all ES versions except GL_OES_VERSION_1_0 provide these types for OpenGL ES + #if !defined(GL_VERSION_1_5) && !defined(GL_ARB_vertex_buffer_object) \ + && !defined(GL_ES_VERSION_2_0) && !defined(OPENGLES_1_1_FOUND) + #if defined(_WIN64) + typedef __int64 GLintptr; + typedef __int64 GLsizeiptr; + #elif defined(__ia64__) || defined(__x86_64__) || defined(__ANDROID__) + typedef long int GLintptr; + typedef long int GLsizeiptr; + #else + typedef int GLintptr; + typedef int GLsizeiptr; + #endif + #endif +} #endif