![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
A shared OpenGL context with the main thread. More...
#include <gf/SharedGraphics.h>
Public Member Functions | |
SharedGraphics (Window &window) | |
Create a shared OpenGL context. More... | |
~SharedGraphics () | |
Destructor. More... | |
SharedGraphics (const SharedGraphics &)=delete | |
SharedGraphics (SharedGraphics &&)=delete | |
SharedGraphics & | operator= (const SharedGraphics &)=delete |
SharedGraphics & | operator= (SharedGraphics &&)=delete |
A shared OpenGL context with the main thread.
This class is useful for loading textures asynchronously. The context will automatically be attached to the current thread at object instantiation and will be detached at its destruction.
gf::SharedGraphics::SharedGraphics | ( | Window & | window | ) |
Create a shared OpenGL context.
Attach a OpenGL context to the current thread.
window | A reference to the main window |
gf::SharedGraphics::~SharedGraphics | ( | ) |
Destructor.
Detach the OpenGL context from the current thread
|
delete |
|
delete |
|
delete |
|
delete |