CCGL-ios.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /****************************************************************************
  2. Copyright (c) 2010-2012 cocos2d-x.org
  3. Copyright (c) 2013-2017 Chukong Technologies Inc.
  4. http://www.cocos2d-x.org
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be included in
  12. all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. THE SOFTWARE.
  20. ****************************************************************************/
  21. #ifndef __PLATFORM_IOS_CCGL_H__
  22. #define __PLATFORM_IOS_CCGL_H__
  23. #include "platform/CCPlatformConfig.h"
  24. #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
  25. #define glClearDepth glClearDepthf
  26. #define glDeleteVertexArrays glDeleteVertexArraysOES
  27. #define glGenVertexArrays glGenVertexArraysOES
  28. #define glBindVertexArray glBindVertexArrayOES
  29. #define glMapBuffer glMapBufferOES
  30. #define glUnmapBuffer glUnmapBufferOES
  31. #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
  32. #define GL_WRITE_ONLY GL_WRITE_ONLY_OES
  33. #include <OpenGLES/ES2/gl.h>
  34. #include <OpenGLES/ES2/glext.h>
  35. #endif // CC_PLATFORM_IOS
  36. #endif // __PLATFORM_IOS_CCGL_H__