2
0

BsGLPrerequisites.h 2.5 KB

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