mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14755 from mogemimi/fix-redefinition-warning
Fix OpenGL macro redefinition warning in JS bindings/Mac
This commit is contained in:
commit
8fda08abcd
|
@ -13,6 +13,7 @@
|
|||
#include "js_bindings_core.h"
|
||||
#include "js_manual_conversions.h"
|
||||
#include "jsb_opengl_functions.h"
|
||||
#include "platform/CCGL.h"
|
||||
|
||||
// Arguments: GLenum
|
||||
// Ret value: void
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "js_manual_conversions.h"
|
||||
#include "js_bindings_core.h"
|
||||
#include "jsb_opengl_functions.h"
|
||||
#include "platform/CCGL.h"
|
||||
|
||||
|
||||
// Helper functions that link "glGenXXXs" (OpenGL ES 2.0 spec), with "gl.createXXX" (WebGL spec)
|
||||
|
|
|
@ -28,22 +28,9 @@
|
|||
#include "js_bindings_config.h"
|
||||
#ifdef JSB_INCLUDE_OPENGL
|
||||
|
||||
//#include <Availability.h>
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
|
||||
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
|
||||
#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
|
||||
|
||||
// compatible with iOS
|
||||
#define glClearDepthf glClearDepth
|
||||
#define glDepthRangef glDepthRange
|
||||
#ifndef glReleaseShaderCompiler
|
||||
#define glReleaseShaderCompiler()
|
||||
#endif
|
||||
|
||||
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED
|
||||
|
||||
// forward declaration of new functions
|
||||
bool JSB_glGetSupportedExtensions(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
|
|
Loading…
Reference in New Issue