Browse Source

GL: Include glcontext_* based on defines.

Бранимир Караџић 2 years ago
parent
commit
cb7ca00fe1
1 changed files with 7 additions and 13 deletions
  1. 7 13
      src/renderer_gl.h

+ 7 - 13
src/renderer_gl.h

@@ -150,14 +150,6 @@ typedef uint64_t GLuint64;
 #		include <GLES2/gl2ext.h>
 #		include <GLES2/gl2ext.h>
 #	endif // BGFX_CONFIG_RENDERER_
 #	endif // BGFX_CONFIG_RENDERER_
 
 
-#	if BGFX_USE_EGL
-#		include "glcontext_egl.h"
-#	endif // BGFX_USE_EGL
-
-#	if BGFX_USE_HTML5
-#		include "glcontext_html5.h"
-#	endif // BGFX_USE_EGL
-
 #endif // BGFX_CONFIG_RENDERER_OPENGL
 #endif // BGFX_CONFIG_RENDERER_OPENGL
 
 
 #include "renderer.h"
 #include "renderer.h"
@@ -1168,18 +1160,20 @@ typedef uint64_t GLuint64;
 #	define GL_TEXTURE_LOD_BIAS 0x8501
 #	define GL_TEXTURE_LOD_BIAS 0x8501
 #endif // GL_TEXTURE_LOD_BIAS
 #endif // GL_TEXTURE_LOD_BIAS
 
 
-#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
+#if BGFX_USE_EGL
+#	include "glcontext_egl.h"
+#elif BGFX_USE_HTML5
+#	include "glcontext_html5.h"
+#elif BGFX_USE_GLX
 #	include "glcontext_glx.h"
 #	include "glcontext_glx.h"
+#elif BGFX_USE_WGL
+#	include "glcontext_wgl.h"
 #elif BX_PLATFORM_OSX
 #elif BX_PLATFORM_OSX
 #	include "glcontext_nsgl.h"
 #	include "glcontext_nsgl.h"
 #elif BX_PLATFORM_IOS
 #elif BX_PLATFORM_IOS
 #	include "glcontext_eagl.h"
 #	include "glcontext_eagl.h"
 #endif // BX_PLATFORM_
 #endif // BX_PLATFORM_
 
 
-#if BGFX_USE_WGL
-#	include "glcontext_wgl.h"
-#endif // BGFX_USE_WGL
-
 #ifndef GL_APIENTRY
 #ifndef GL_APIENTRY
 #	define GL_APIENTRY APIENTRY
 #	define GL_APIENTRY APIENTRY
 #endif // GL_APIENTRY
 #endif // GL_APIENTRY