DubiousEngine
0.2.0
Simple Game Engine
|
OpenGL Context Store. More...
#include <Open_gl_context_store.h>
Public Member Functions | |
Open_gl_context_store () | |
Constructor. More... | |
Open_gl_context_store (const Open_gl_context_store &)=delete | |
~Open_gl_context_store () | |
Destructor. More... | |
Open_gl_context_store & | operator= (const Open_gl_context_store &)=delete |
void | rebuild () |
Will rebuild the internal stores. More... | |
Call_list_handle | create_call_list (int count) |
Create a number of new call lists. More... | |
bool | call_list_exists (Call_list_handle handle) const |
Check to see whether or not the specified list exists. More... | |
unsigned int | get_call_list (Call_list_handle handle) const |
Get an OpenGL handle for the specified call list. More... | |
OpenGL Context Store.
OpenGL will destroy its context when the screen is resized, or during other random times. When this happens you need to rebuild all the call lists, textures, shaders, etc. Since this is a simplified Engine, I only hold call lists, but in theory there could be more.
Dubious::Renderer::Open_gl_context_store::Open_gl_context_store | ( | ) |
Constructor.
|
delete |
Dubious::Renderer::Open_gl_context_store::~Open_gl_context_store | ( | ) |
Destructor.
bool Dubious::Renderer::Open_gl_context_store::call_list_exists | ( | Call_list_handle | handle | ) | const |
Check to see whether or not the specified list exists.
handle | - [in] handle to the list |
Call_list_handle Dubious::Renderer::Open_gl_context_store::create_call_list | ( | int | count | ) |
Create a number of new call lists.
count | - [in] how many lists you want to make |
unsigned int Dubious::Renderer::Open_gl_context_store::get_call_list | ( | Call_list_handle | handle | ) | const |
Get an OpenGL handle for the specified call list.
Will throw an exception if the specified list does not exist.
handle | - [in] handle to the list |
|
delete |
void Dubious::Renderer::Open_gl_context_store::rebuild | ( | ) |
Will rebuild the internal stores.
You must call this when the resolution changes, or when other context destroying actions happen