mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 03:47:07 -05:00
Added IOS/OSX defines to shaderc.
This commit is contained in:
parent
42271092a0
commit
2a918ab4e0
2 changed files with 30 additions and 3 deletions
|
@ -16,6 +16,19 @@
|
||||||
# include <GL/gl.h>
|
# include <GL/gl.h>
|
||||||
# include <GL/glx.h>
|
# include <GL/glx.h>
|
||||||
# undef GL_PROTOTYPES
|
# undef GL_PROTOTYPES
|
||||||
|
# elif BX_PLATFORM_OSX
|
||||||
|
# define GL_PROTOTYPES
|
||||||
|
# define GL_GLEXT_LEGACY
|
||||||
|
# define GL_VERSION_1_2
|
||||||
|
# define GL_VERSION_1_3
|
||||||
|
# define GL_VERSION_1_5
|
||||||
|
# define GL_VERSION_2_0
|
||||||
|
# include <OpenGL/gl.h>
|
||||||
|
# undef GL_VERSION_2_0
|
||||||
|
# undef GL_VERSION_1_5
|
||||||
|
# undef GL_VERSION_1_3
|
||||||
|
# undef GL_VERSION_1_2
|
||||||
|
# undef GL_PROTOTYPES
|
||||||
# else
|
# else
|
||||||
# include <GL/gl.h>
|
# include <GL/gl.h>
|
||||||
# endif // BX_PLATFORM_
|
# endif // BX_PLATFORM_
|
||||||
|
|
|
@ -678,10 +678,12 @@ int main(int _argc, const char* _argv[])
|
||||||
Preprocessor preprocessor(filePath);
|
Preprocessor preprocessor(filePath);
|
||||||
|
|
||||||
preprocessor.setDefaultDefine("BX_PLATFORM_ANDROID");
|
preprocessor.setDefaultDefine("BX_PLATFORM_ANDROID");
|
||||||
|
preprocessor.setDefaultDefine("BX_PLATFORM_IOS");
|
||||||
|
preprocessor.setDefaultDefine("BX_PLATFORM_LINUX");
|
||||||
preprocessor.setDefaultDefine("BX_PLATFORM_NACL");
|
preprocessor.setDefaultDefine("BX_PLATFORM_NACL");
|
||||||
|
preprocessor.setDefaultDefine("BX_PLATFORM_OSX");
|
||||||
preprocessor.setDefaultDefine("BX_PLATFORM_WINDOWS");
|
preprocessor.setDefaultDefine("BX_PLATFORM_WINDOWS");
|
||||||
preprocessor.setDefaultDefine("BX_PLATFORM_XBOX360");
|
preprocessor.setDefaultDefine("BX_PLATFORM_XBOX360");
|
||||||
preprocessor.setDefaultDefine("BX_PLATFORM_LINUX");
|
|
||||||
preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_GLSL");
|
preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_GLSL");
|
||||||
preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_HLSL");
|
preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_HLSL");
|
||||||
preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_FRAGMENT");
|
preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_FRAGMENT");
|
||||||
|
@ -695,15 +697,27 @@ int main(int _argc, const char* _argv[])
|
||||||
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
||||||
glsl = true;
|
glsl = true;
|
||||||
}
|
}
|
||||||
|
else if (0 == _stricmp(platform, "ios") )
|
||||||
|
{
|
||||||
|
preprocessor.setDefine("BX_PLATFORM_IOS=1");
|
||||||
|
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
||||||
|
glsl = true;
|
||||||
|
}
|
||||||
|
else if (0 == _stricmp(platform, "linux") )
|
||||||
|
{
|
||||||
|
preprocessor.setDefine("BX_PLATFORM_IOS=1");
|
||||||
|
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
||||||
|
glsl = true;
|
||||||
|
}
|
||||||
else if (0 == _stricmp(platform, "nacl") )
|
else if (0 == _stricmp(platform, "nacl") )
|
||||||
{
|
{
|
||||||
preprocessor.setDefine("BX_PLATFORM_NACL=1");
|
preprocessor.setDefine("BX_PLATFORM_NACL=1");
|
||||||
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
||||||
glsl = true;
|
glsl = true;
|
||||||
}
|
}
|
||||||
else if (0 == _stricmp(platform, "linux"))
|
else if (0 == _stricmp(platform, "osx") )
|
||||||
{
|
{
|
||||||
preprocessor.setDefine("BX_PLATFORM_LINUX=1");
|
preprocessor.setDefine("BX_PLATFORM_OSX=1");
|
||||||
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
|
||||||
glsl = true;
|
glsl = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue