Bläddra i källkod

Added BX_PLATFORM_QNX.

bkaradzic 12 år sedan
förälder
incheckning
ab05bc6974
6 ändrade filer med 14 tillägg och 4 borttagningar
  1. 7 0
      makefile
  2. 2 2
      premake/bgfx.lua
  3. 1 1
      premake/premake4.lua
  4. 1 0
      src/config.h
  5. 2 0
      src/renderer_gl.cpp
  6. 1 1
      src/renderer_gl.h

+ 7 - 0
makefile

@@ -13,6 +13,7 @@ all:
 	premake4 --file=premake/premake4.lua --gcc=linux gmake
 	premake4 --file=premake/premake4.lua --gcc=linux gmake
 	premake4 --file=premake/premake4.lua --gcc=emscripten gmake
 	premake4 --file=premake/premake4.lua --gcc=emscripten gmake
 	premake4 --file=premake/premake4.lua --gcc=osx gmake
 	premake4 --file=premake/premake4.lua --gcc=osx gmake
+	premake4 --file=premake/premake4.lua --gcc=qnx-arm gmake
 	premake4 --file=premake/premake4.lua xcode4
 	premake4 --file=premake/premake4.lua xcode4
 	make -s --no-print-directory -C src
 	make -s --no-print-directory -C src
 
 
@@ -78,6 +79,12 @@ osx-release64:
 	make -C .build/projects/gmake-osx config=release64
 	make -C .build/projects/gmake-osx config=release64
 osx: osx-debug32 osx-release32 osx-debug64 osx-release64
 osx: osx-debug32 osx-release32 osx-debug64 osx-release64
 
 
+qnx-arm-debug32:
+	make -C .build/projects/gmake-osx config=debug32
+qnx-arm-release32:
+	make -C .build/projects/gmake-osx config=release32
+qnx-arm: qnx-arm-debug32 qnx-arm-release32
+
 rebuild-shaders:
 rebuild-shaders:
 	make -C examples rebuild
 	make -C examples rebuild
 
 

+ 2 - 2
premake/bgfx.lua

@@ -25,12 +25,12 @@ project "bgfx"
 			"$(DXSDK_DIR)/include",
 			"$(DXSDK_DIR)/include",
 		}
 		}
 
 
-	configuration { "macosx" }
+	configuration { "osx" }
 		files {
 		files {
 			BGFX_DIR .. "src/**.mm",
 			BGFX_DIR .. "src/**.mm",
 		}
 		}
 
 
-	configuration { "not nacl" }
+	configuration { "(not nacl*) and (not qnx*)" }
 		includedirs {
 		includedirs {
 			--nacl has GLES2 headers modified...
 			--nacl has GLES2 headers modified...
 			BGFX_DIR .. "3rdparty/glext",
 			BGFX_DIR .. "3rdparty/glext",

+ 1 - 1
premake/premake4.lua

@@ -81,7 +81,7 @@ function exampleProject(_name, _uuid)
 			"pthread",
 			"pthread",
 		}
 		}
 
 
-	configuration { "macosx" }
+	configuration { "osx" }
 		files {
 		files {
 			BGFX_DIR .. "examples/common/**.mm",
 			BGFX_DIR .. "examples/common/**.mm",
 		}
 		}

+ 1 - 0
src/config.h

@@ -39,6 +39,7 @@
 					| BX_PLATFORM_NACL \
 					| BX_PLATFORM_NACL \
 					| BX_PLATFORM_ANDROID \
 					| BX_PLATFORM_ANDROID \
 					| BX_PLATFORM_IOS \
 					| BX_PLATFORM_IOS \
+					| BX_PLATFORM_QNX \
 					)
 					)
 #	endif // BGFX_CONFIG_RENDERER_OPENGLES2
 #	endif // BGFX_CONFIG_RENDERER_OPENGLES2
 
 

+ 2 - 0
src/renderer_gl.cpp

@@ -162,6 +162,7 @@ namespace bgfx
 		}
 		}
 	}
 	}
 
 
+#if BGFX_CONFIG_RENDERER_OPENGL
 	static void APIENTRY debugProcCb(GLenum _source, GLenum _type, GLuint _id, GLenum _severity, GLsizei /*_length*/, const GLchar* _message, GLvoid* /*_userParam*/)
 	static void APIENTRY debugProcCb(GLenum _source, GLenum _type, GLuint _id, GLenum _severity, GLsizei /*_length*/, const GLchar* _message, GLvoid* /*_userParam*/)
 	{
 	{
 		BX_TRACE("src %d, type %d, id %d, severity %d, '%s'"
 		BX_TRACE("src %d, type %d, id %d, severity %d, '%s'"
@@ -172,6 +173,7 @@ namespace bgfx
 				, _message
 				, _message
 				);
 				);
 	}
 	}
+#endif // BGFX_CONFIG_RENDERER_OPENGL
 
 
 	struct RendererContext
 	struct RendererContext
 	{
 	{

+ 1 - 1
src/renderer_gl.h

@@ -86,7 +86,7 @@
 #		include <GLES3/gl3ext.h>
 #		include <GLES3/gl3ext.h>
 #	endif // BGFX_CONFIG_RENDERER_
 #	endif // BGFX_CONFIG_RENDERER_
 
 
-#	if  BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_WINDOWS
+#	if BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_WINDOWS || BX_PLATFORM_QNX
 #		undef BGFX_USE_EGL
 #		undef BGFX_USE_EGL
 #		define BGFX_USE_EGL 1
 #		define BGFX_USE_EGL 1
 #		include "glcontext_egl.h"
 #		include "glcontext_egl.h"