BsGLPrerequisites.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. namespace BansheeEngine
  4. {
  5. extern String MODULE_NAME;
  6. class GLSupport;
  7. class GLRenderSystem;
  8. class GLTexture;
  9. class GLVertexBuffer;
  10. class GLVertexBufferCore;
  11. class GLTextureManager;
  12. class GLSLGpuProgram;
  13. class GLContext;
  14. class GLRTTManager;
  15. class GLPixelBuffer;
  16. class GLGpuParamBlock;
  17. class GLSLGpuProgram;
  18. class GLVertexArrayObject;
  19. struct GLSLProgramPipeline;
  20. class GLSLProgramPipelineManager;
  21. typedef std::shared_ptr<GLPixelBuffer> GLPixelBufferPtr;
  22. typedef std::shared_ptr<GLGpuParamBlock> GLGpuParamBlockPtr;
  23. typedef std::shared_ptr<GLSLGpuProgram> GLSLGpuProgramPtr;
  24. /**
  25. * @brief Type IDs used for RTTI.
  26. */
  27. enum TypeID_D3D9
  28. {
  29. TID_GL_GLSLGpuProgram = 11000
  30. };
  31. /**
  32. * @brief OpenGL specific types to track resource statistics for.
  33. */
  34. enum GLRenderStatResourceType
  35. {
  36. RenderStatObject_PipelineObject = 100,
  37. RenderStatObject_FrameBufferObject,
  38. RenderStatObject_VertexArrayObject
  39. };
  40. }
  41. #if BS_THREAD_SUPPORT == 1
  42. # define GLEW_MX
  43. #endif
  44. #if BS_PLATFORM == BS_PLATFORM_WIN32
  45. #if !defined( __MINGW32__ )
  46. # define WIN32_LEAN_AND_MEAN
  47. # ifndef NOMINMAX
  48. # define NOMINMAX // required to stop windows.h messing up std::min
  49. # endif
  50. #endif
  51. # include <windows.h>
  52. # include <wingdi.h>
  53. # include <GL/glew.h>
  54. # include <GL/wglew.h>
  55. # include <GL/glu.h>
  56. #elif BS_PLATFORM == BS_PLATFORM_LINUX
  57. # include <GL/glew.h>
  58. # include <GL/glu.h>
  59. # define GL_GLEXT_PROTOTYPES
  60. #elif BS_PLATFORM == BS_PLATFORM_APPLE
  61. # include <GL/glew.h>
  62. # include <OpenGL/glu.h>
  63. #endif
  64. #if BS_THREAD_SUPPORT == 1
  65. GLEWContext * glewGetContext();
  66. # if BS_PLATFORM == BS_PLATFORM_WIN32
  67. WGLEWContext * wglewGetContext();
  68. # endif
  69. #endif
  70. // Lots of generated code in here which triggers the new VC CRT security warnings
  71. #if !defined( _CRT_SECURE_NO_DEPRECATE )
  72. #define _CRT_SECURE_NO_DEPRECATE
  73. #endif
  74. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(BS_STATIC_LIB)
  75. # ifdef BS_RSGL_EXPORTS
  76. # define BS_RSGL_EXPORT __declspec(dllexport)
  77. # else
  78. # if defined( __MINGW32__ )
  79. # define BS_RSGL_EXPORT
  80. # else
  81. # define BS_RSGL_EXPORT __declspec(dllimport)
  82. # endif
  83. # endif
  84. #elif defined ( BS_GCC_VISIBILITY )
  85. # define BS_RSGL_EXPORT __attribute__ ((visibility("default")))
  86. #else
  87. # define BS_RSGL_EXPORT
  88. #endif