BsGLPrerequisites.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(BS_STATIC_LIB)
  39. # ifdef BS_RSGL_EXPORTS
  40. # define BS_RSGL_EXPORT __declspec(dllexport)
  41. # else
  42. # if defined( __MINGW32__ )
  43. # define BS_RSGL_EXPORT
  44. # else
  45. # define BS_RSGL_EXPORT __declspec(dllimport)
  46. # endif
  47. # endif
  48. #elif defined ( BS_GCC_VISIBILITY )
  49. # define BS_RSGL_EXPORT __attribute__ ((visibility("default")))
  50. #else
  51. # define BS_RSGL_EXPORT
  52. #endif
  53. /** @addtogroup Plugins
  54. * @{
  55. */
  56. /** @defgroup GL BansheeGLRenderAPI
  57. * Wrapper around the OpenGL render API.
  58. */
  59. /** @} */
  60. namespace BansheeEngine
  61. {
  62. extern const char* MODULE_NAME;
  63. class GLSupport;
  64. class GLRenderAPI;
  65. class GLTextureCore;
  66. class GLVertexBuffer;
  67. class GLVertexBufferCore;
  68. class GLTextureManager;
  69. class GLContext;
  70. class GLRTTManager;
  71. class GLPixelBuffer;
  72. class GLGpuParamBlock;
  73. class GLSLGpuProgramCore;
  74. class GLVertexArrayObject;
  75. struct GLSLProgramPipeline;
  76. class GLSLProgramPipelineManager;
  77. /** @addtogroup GL
  78. * @{
  79. */
  80. /** OpenGL specific types to track resource statistics for. */
  81. enum GLRenderStatResourceType
  82. {
  83. RenderStatObject_PipelineObject = 100,
  84. RenderStatObject_FrameBufferObject,
  85. RenderStatObject_VertexArrayObject
  86. };
  87. /** @} */
  88. }