Gamedev Framework (gf)  0.17.0
A C++14 framework for 2D games
Public Member Functions | List of all members
gf::SharedGraphics Class Reference

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
 
SharedGraphicsoperator= (const SharedGraphics &)=delete
 
SharedGraphicsoperator= (SharedGraphics &&)=delete
 

Detailed Description

A shared OpenGL context with the main thread.

This class is useful for load textures asynchronously. The context will automatically attached to the current thread at object instantiation and will detached at its destruction.

Constructor & Destructor Documentation

◆ SharedGraphics() [1/3]

gf::SharedGraphics::SharedGraphics ( Window window)

Create a shared OpenGL context.

Attach a OpenGL context to the current thread.

Parameters
windowA reference to the main window

◆ ~SharedGraphics()

gf::SharedGraphics::~SharedGraphics ( )

Destructor.

Detach the OpenGL context from the current thread

◆ SharedGraphics() [2/3]

gf::SharedGraphics::SharedGraphics ( const SharedGraphics )
delete

◆ SharedGraphics() [3/3]

gf::SharedGraphics::SharedGraphics ( SharedGraphics &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

SharedGraphics& gf::SharedGraphics::operator= ( const SharedGraphics )
delete

◆ operator=() [2/2]

SharedGraphics& gf::SharedGraphics::operator= ( SharedGraphics &&  )
delete