BsGLContext.h 1005 B

123456789101112131415161718192021222324252627282930313233
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsGLPrerequisites.h"
  5. namespace bs { namespace ct
  6. {
  7. /** @addtogroup GL
  8. * @{
  9. */
  10. /**
  11. * Abstract class that encapsulated an OpenGL context. Each platform should provide its own GLContext specialization.
  12. */
  13. class GLContext
  14. {
  15. public:
  16. GLContext();
  17. virtual ~GLContext();
  18. /** Activates the rendering context (all subsequent rendering commands will be executed on it). */
  19. virtual void setCurrent() = 0;
  20. /** Deactivates the rendering context. Normally called just before setCurrent is called on another context. */
  21. virtual void endCurrent() = 0;
  22. /** Releases the render context, freeing all of its resources. */
  23. virtual void releaseContext() {}
  24. };
  25. /** @} */
  26. }}