BsGLPrerequisites.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. namespace BansheeEngine
  4. {
  5. extern String MODULE_NAME;
  6. // Forward declarations
  7. class GLSupport;
  8. class GLRenderSystem;
  9. class GLTexture;
  10. class GLVertexBuffer;
  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. enum TypeID_D3D9
  25. {
  26. TID_GL_GLSLGpuProgram = 11000
  27. };
  28. }
  29. #if BS_THREAD_SUPPORT == 1
  30. # define GLEW_MX
  31. #endif
  32. #if BS_PLATFORM == BS_PLATFORM_WIN32
  33. #if !defined( __MINGW32__ )
  34. # define WIN32_LEAN_AND_MEAN
  35. # ifndef NOMINMAX
  36. # define NOMINMAX // required to stop windows.h messing up std::min
  37. # endif
  38. #endif
  39. # include <windows.h>
  40. # include <wingdi.h>
  41. # include <GL/glew.h>
  42. # include <GL/wglew.h>
  43. # include <GL/glu.h>
  44. #elif BS_PLATFORM == BS_PLATFORM_LINUX
  45. # include <GL/glew.h>
  46. # include <GL/glu.h>
  47. # define GL_GLEXT_PROTOTYPES
  48. #elif BS_PLATFORM == BS_PLATFORM_APPLE
  49. # include <GL/glew.h>
  50. # include <OpenGL/glu.h>
  51. #endif
  52. #if BS_THREAD_SUPPORT == 1
  53. GLEWContext * glewGetContext();
  54. # if BS_PLATFORM == BS_PLATFORM_WIN32
  55. WGLEWContext * wglewGetContext();
  56. # endif
  57. #endif
  58. /// Lots of generated code in here which triggers the new VC CRT security warnings
  59. #if !defined( _CRT_SECURE_NO_DEPRECATE )
  60. #define _CRT_SECURE_NO_DEPRECATE
  61. #endif
  62. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(BS_STATIC_LIB)
  63. # ifdef BS_RSGL_EXPORTS
  64. # define BS_RSGL_EXPORT __declspec(dllexport)
  65. # else
  66. # if defined( __MINGW32__ )
  67. # define BS_RSGL_EXPORT
  68. # else
  69. # define BS_RSGL_EXPORT __declspec(dllimport)
  70. # endif
  71. # endif
  72. #elif defined ( BS_GCC_VISIBILITY )
  73. # define BS_RSGL_EXPORT __attribute__ ((visibility("default")))
  74. #else
  75. # define BS_RSGL_EXPORT
  76. #endif