CCGL-tizen.h 2.2 KB

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