BsGLPrerequisites.h 2.6 KB

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