BsGLContext.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 "BsGLPrerequisites.h"
  6. namespace BansheeEngine
  7. {
  8. /**
  9. * @brief Abstract class that encapsulated an OpenGL context. Each platform
  10. * should provide its own GLContext specialization.
  11. */
  12. class BS_RSGL_EXPORT GLContext
  13. {
  14. public:
  15. GLContext();
  16. virtual ~GLContext();
  17. /**
  18. * @brief Activates the rendering context (all subsequent rendering commands will be executed on it).
  19. */
  20. virtual void setCurrent() = 0;
  21. /**
  22. * @brief Deactivates the rendering context. Normally called just before setCurrent is called on another context.
  23. */
  24. virtual void endCurrent() = 0;
  25. /**
  26. * @brief Releases the render context, freeing all of its resources.
  27. */
  28. virtual void releaseContext() {}
  29. };
  30. }