BsGLPrerequisites.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 GLTextureManager;
  11. class GLSLGpuProgram;
  12. class GLContext;
  13. class GLRTTManager;
  14. class GLPixelBuffer;
  15. class GLGpuParamBlock;
  16. class GLSLGpuProgram;
  17. class GLVertexArrayObject;
  18. struct GLSLProgramPipeline;
  19. class GLSLProgramPipelineManager;
  20. typedef std::shared_ptr<GLPixelBuffer> GLPixelBufferPtr;
  21. typedef std::shared_ptr<GLGpuParamBlock> GLGpuParamBlockPtr;
  22. typedef std::shared_ptr<GLSLGpuProgram> GLSLGpuProgramPtr;
  23. enum TypeID_D3D9
  24. {
  25. TID_GL_GLSLGpuProgram = 11000
  26. };
  27. }
  28. #if BS_THREAD_SUPPORT == 1
  29. # define GLEW_MX
  30. #endif
  31. #if BS_PLATFORM == BS_PLATFORM_WIN32
  32. #if !defined( __MINGW32__ )
  33. # define WIN32_LEAN_AND_MEAN
  34. # ifndef NOMINMAX
  35. # define NOMINMAX // required to stop windows.h messing up std::min
  36. # endif
  37. #endif
  38. # include <windows.h>
  39. # include <wingdi.h>
  40. # include <GL/glew.h>
  41. # include <GL/wglew.h>
  42. # include <GL/glu.h>
  43. #elif BS_PLATFORM == BS_PLATFORM_LINUX
  44. # include <GL/glew.h>
  45. # include <GL/glu.h>
  46. # define GL_GLEXT_PROTOTYPES
  47. #elif BS_PLATFORM == BS_PLATFORM_APPLE
  48. # include <GL/glew.h>
  49. # include <OpenGL/glu.h>
  50. #endif
  51. #if BS_THREAD_SUPPORT == 1
  52. GLEWContext * glewGetContext();
  53. # if BS_PLATFORM == BS_PLATFORM_WIN32
  54. WGLEWContext * wglewGetContext();
  55. # endif
  56. #endif
  57. // Lots of generated code in here which triggers the new VC CRT security warnings
  58. #if !defined( _CRT_SECURE_NO_DEPRECATE )
  59. #define _CRT_SECURE_NO_DEPRECATE
  60. #endif
  61. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(BS_STATIC_LIB)
  62. # ifdef BS_RSGL_EXPORTS
  63. # define BS_RSGL_EXPORT __declspec(dllexport)
  64. # else
  65. # if defined( __MINGW32__ )
  66. # define BS_RSGL_EXPORT
  67. # else
  68. # define BS_RSGL_EXPORT __declspec(dllimport)
  69. # endif
  70. # endif
  71. #elif defined ( BS_GCC_VISIBILITY )
  72. # define BS_RSGL_EXPORT __attribute__ ((visibility("default")))
  73. #else
  74. # define BS_RSGL_EXPORT
  75. #endif