2
0

BsGLPrerequisites.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #if BS_THREAD_SUPPORT == 1
  6. # define GLEW_MX
  7. #endif
  8. #if BS_PLATFORM == BS_PLATFORM_WIN32
  9. #if !defined( __MINGW32__ )
  10. # define WIN32_LEAN_AND_MEAN
  11. # ifndef NOMINMAX
  12. # define NOMINMAX // required to stop windows.h messing up std::min
  13. # endif
  14. #endif
  15. # include <windows.h>
  16. # include <wingdi.h>
  17. # include <GL/glew.h>
  18. # include <GL/wglew.h>
  19. # include <GL/glu.h>
  20. #elif BS_PLATFORM == BS_PLATFORM_LINUX
  21. # include <GL/glew.h>
  22. # include <GL/glu.h>
  23. # define GL_GLEXT_PROTOTYPES
  24. #elif BS_PLATFORM == BS_PLATFORM_OSX
  25. # include <GL/glew.h>
  26. # include <OpenGL/glu.h>
  27. #endif
  28. #if BS_THREAD_SUPPORT == 1
  29. GLEWContext * glewGetContext();
  30. # if BS_PLATFORM == BS_PLATFORM_WIN32
  31. WGLEWContext * wglewGetContext();
  32. # endif
  33. #endif
  34. // Lots of generated code in here which triggers the new VC CRT security warnings
  35. #if !defined( _CRT_SECURE_NO_DEPRECATE )
  36. #define _CRT_SECURE_NO_DEPRECATE
  37. #endif
  38. /** @addtogroup Plugins
  39. * @{
  40. */
  41. /** @defgroup GL BansheeGLRenderAPI
  42. * Wrapper around the OpenGL render API.
  43. */
  44. /** @} */
  45. namespace bs { namespace ct
  46. {
  47. extern const char* MODULE_NAME;
  48. class GLSupport;
  49. class GLRenderAPI;
  50. class GLTexture;
  51. class GLVertexBuffer;
  52. class GLContext;
  53. class GLRTTManager;
  54. class GLPixelBuffer;
  55. class GLGpuParamBlock;
  56. class GLSLGpuProgram;
  57. class GLVertexArrayObject;
  58. struct GLSLProgramPipeline;
  59. class GLSLProgramPipelineManager;
  60. class GLTextureView;
  61. /** @addtogroup GL
  62. * @{
  63. */
  64. /** OpenGL specific types to track resource statistics for. */
  65. enum GLRenderStatResourceType
  66. {
  67. RenderStatObject_PipelineObject = 100,
  68. RenderStatObject_FrameBufferObject,
  69. RenderStatObject_VertexArrayObject
  70. };
  71. /** @} */
  72. }}