OpenGL2Include.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. Copyright (c) 2012 Advanced Micro Devices, Inc.
  3. This software is provided 'as-is', without any express or implied warranty.
  4. In no event will the authors be held liable for any damages arising from the use of this software.
  5. Permission is granted to anyone to use this software for any purpose,
  6. including commercial applications, and to alter it and redistribute it freely,
  7. subject to the following restrictions:
  8. 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  9. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  10. 3. This notice may not be removed or altered from any source distribution.
  11. */
  12. //Originally written by Erwin Coumans
  13. #ifndef __OPENGL_INCLUDE_H
  14. #define __OPENGL_INCLUDE_H
  15. #ifdef BT_NO_GLAD
  16. #include "third_party/GL/gl/include/EGL/egl.h"
  17. #include "third_party/GL/gl/include/EGL/eglext.h"
  18. #include "third_party/GL/gl/include/GL/gl.h"
  19. #else
  20. #ifdef B3_USE_GLFW
  21. #include "glad/gl.h"
  22. #include <GLFW/glfw3.h>
  23. #else
  24. #include "glad/gl.h"
  25. #endif //B3_USE_GLFW
  26. #endif //BT_NO_GLAD
  27. //disable glGetError
  28. //#undef glGetError
  29. //#define glGetError MyGetError
  30. //
  31. //GLenum inline MyGetError()
  32. //{
  33. // return 0;
  34. //}
  35. ///on Linux only glDrawElementsInstancedARB is defined?!?
  36. //#ifdef __linux
  37. //#define glDrawElementsInstanced glDrawElementsInstancedARB
  38. //
  39. //#endif //__linux
  40. #endif //__OPENGL_INCLUDE_H