Merge pull request #14755 from mogemimi/fix-redefinition-warning

Fix OpenGL macro redefinition warning in JS bindings/Mac
This commit is contained in:
zilongshanren 2016-01-21 10:46:58 +08:00
commit 8fda08abcd
3 changed files with 2 additions and 13 deletions

View File

@ -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

View File

@ -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)

View File

@ -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);