BsGLSupport.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #pragma once
  2. #include "BsGLPrerequisites.h"
  3. #include "BsGLRenderSystem.h"
  4. #include "BsRenderWindow.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_RSGL_EXPORT GLSupport
  8. {
  9. public:
  10. GLSupport() { }
  11. virtual ~GLSupport() { }
  12. virtual RenderWindowPtr newWindow(RENDER_WINDOW_DESC& desc, RenderWindowPtr parentWindow) = 0;
  13. /**
  14. * Start anything special
  15. */
  16. virtual void start() = 0;
  17. /**
  18. * Stop anything special
  19. */
  20. virtual void stop() = 0;
  21. /**
  22. * Get vendor information
  23. */
  24. const String& getGLVendor() const
  25. {
  26. return mVendor;
  27. }
  28. /**
  29. * Get version information
  30. */
  31. const String& getGLVersion() const
  32. {
  33. return mVersion;
  34. }
  35. /**
  36. * Compare GL version numbers
  37. */
  38. bool checkMinGLVersion(const String& v) const;
  39. /**
  40. * Check if an extension is available
  41. */
  42. virtual bool checkExtension(const String& ext) const;
  43. /**
  44. * Get the address of a function
  45. */
  46. virtual void* getProcAddress(const String& procname) = 0;
  47. /** Initialises GL extensions, must be done AFTER the GL context has been
  48. established.
  49. */
  50. virtual void initializeExtensions();
  51. /**
  52. * @brief Gets a structure describing all available video modes.
  53. */
  54. virtual VideoModeInfoPtr getVideoModeInfo() const = 0;
  55. protected:
  56. Set<String> extensionList;
  57. String mVersion;
  58. String mVendor;
  59. };
  60. };