CmGLSupport.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. #include "CmGLPrerequisites.h"
  3. #include "CmGLRenderSystem.h"
  4. #include "CmRenderWindow.h"
  5. namespace BansheeEngine
  6. {
  7. class CM_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. protected:
  52. Set<String> extensionList;
  53. String mVersion;
  54. String mVendor;
  55. };
  56. };