1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5#include "BsGLPrerequisites.h"
6
7namespace bs { namespace ct
8{
9 /** @addtogroup GL
10 * @{
11 */
12
13 /**
14 * Abstract class that encapsulated an OpenGL context. Each platform should provide its own GLContext specialization.
15 */
16 class GLContext
17 {
18 public:
19 GLContext() = default;
20 virtual ~GLContext() = default;
21
22 /** Activates the rendering context (all subsequent rendering commands will be executed on it). */
23 virtual void setCurrent(const RenderWindow& window) = 0;
24
25 /** Deactivates the rendering context. Normally called just before setCurrent is called on another context. */
26 virtual void endCurrent() = 0;
27
28 /** Releases the render context, freeing all of its resources. */
29 virtual void releaseContext() {}
30 };
31
32 /** @} */
33}}