Build support for NX platform (#1257)

* NX platform supports GLES and Vulkan

* These defines are already set on NX
This commit is contained in:
Codecat 2017-10-13 17:13:21 +02:00 committed by Branimir Karadžić
parent bf3f68a596
commit c707e06d79
3 changed files with 12 additions and 4 deletions

View File

@ -143,10 +143,11 @@ function bgfxProject(_name, _kind, _defines)
"-weak_framework MetalKit",
}
configuration { "not nacl", "not linux-steamlink" }
configuration { "not nacl", "not linux-steamlink", "not NX32", "not NX64" }
includedirs {
--nacl has GLES2 headers modified...
--steamlink has EGL headers modified...
--NX has EGL headers modified...
path.join(BGFX_DIR, "3rdparty/khronos"),
}

View File

@ -66,6 +66,7 @@
|| BX_PLATFORM_QNX \
|| BX_PLATFORM_RPI \
|| BX_PLATFORM_STEAMLINK \
|| BX_PLATFORM_NX \
? 1 : 0)
# endif // BGFX_CONFIG_RENDERER_OPENGLES
@ -74,6 +75,7 @@
|| BX_PLATFORM_ANDROID \
|| BX_PLATFORM_LINUX \
|| BX_PLATFORM_WINDOWS \
|| BX_PLATFORM_NX \
? 1 : 0)
# endif // BGFX_CONFIG_RENDERER_VULKAN

View File

@ -15,6 +15,7 @@
|| BX_PLATFORM_RPI \
|| BX_PLATFORM_STEAMLINK \
|| BX_PLATFORM_WINDOWS \
|| BX_PLATFORM_NX \
) )
#define BGFX_USE_WGL (BGFX_CONFIG_RENDERER_OPENGL && BX_PLATFORM_WINDOWS)
@ -82,11 +83,15 @@ typedef uint64_t GLuint64;
# define GL_HALF_FLOAT GL_HALF_FLOAT_OES
# define GL_RGBA8 GL_RGBA8_OES
# define GL_UNSIGNED_INT_2_10_10_10_REV GL_UNSIGNED_INT_2_10_10_10_REV_EXT
# define GL_TEXTURE_3D GL_TEXTURE_3D_OES
# ifndef BX_PLATFORM_NX
# define GL_TEXTURE_3D GL_TEXTURE_3D_OES
# endif
# define GL_SAMPLER_3D GL_SAMPLER_3D_OES
# define GL_TEXTURE_WRAP_R GL_TEXTURE_WRAP_R_OES
# define GL_MIN GL_MIN_EXT
# define GL_MAX GL_MAX_EXT
# ifndef BX_PLATFORM_NX
# define GL_MIN GL_MIN_EXT
# define GL_MAX GL_MAX_EXT
# endif
# define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES
# define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
# define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES