From ab94f3df363da9533122a50deb542ae2edcba708 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 10 Apr 2015 16:11:55 +0200 Subject: [PATCH] Fix compile for FreeBSD --- src/bgfx.cpp | 2 +- src/bgfx_p.h | 2 +- src/renderer_gl.h | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 867aa4772..ff6b165d4 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -33,7 +33,7 @@ namespace bgfx { g_bgfxEaglLayer = _layer; } -#elif BX_PLATFORM_LINUX +#elif BX_PLATFORM_LINUX || BX_PLATFORM_FREEBSD void* g_bgfxX11Display; uint32_t g_bgfxX11Window; void* g_bgfxGLX; diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 20b6ad697..5b4872e90 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -221,7 +221,7 @@ namespace bgfx extern ::ANativeWindow* g_bgfxAndroidWindow; #elif BX_PLATFORM_IOS extern void* g_bgfxEaglLayer; -#elif BX_PLATFORM_LINUX +#elif BX_PLATFORM_LINUX || BX_PLATFORM_FREEBSD extern void* g_bgfxX11Display; extern uint32_t g_bgfxX11Window; extern void* g_bgfxGLX; diff --git a/src/renderer_gl.h b/src/renderer_gl.h index d21629f72..1ab35f573 100644 --- a/src/renderer_gl.h +++ b/src/renderer_gl.h @@ -10,6 +10,7 @@ || BX_PLATFORM_ANDROID \ || BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_LINUX \ + || BX_PLATFORM_FREEBSD \ || BX_PLATFORM_QNX \ || BX_PLATFORM_RPI \ || BX_PLATFORM_WINDOWS \ @@ -23,6 +24,7 @@ #define BGFX_USE_GL_DYNAMIC_LIB (0 \ || BX_PLATFORM_LINUX \ + || BX_PLATFORM_FREEBSD \ || BX_PLATFORM_OSX \ || BX_PLATFORM_WINDOWS \ ) @@ -34,7 +36,7 @@ # define GL_ARB_shader_objects // OSX collsion with GLhandleARB in gltypes.h # endif // BX_PLATFORM_OSX # else -# if BX_PLATFORM_LINUX +# if BX_PLATFORM_LINUX || BX_PLATFORM_FREEBSD # define GL_PROTOTYPES # define GL_GLEXT_LEGACY # include @@ -584,7 +586,7 @@ typedef uint64_t GLuint64; # include "glcontext_ppapi.h" #elif BX_PLATFORM_WINDOWS # include -#elif BX_PLATFORM_LINUX +#elif BX_PLATFORM_LINUX || BX_PLATFORM_FREEBSD # include "glcontext_glx.h" #elif BX_PLATFORM_OSX # include "glcontext_nsgl.h"