DubiousEngine  0.2.0
Simple Game Engine
Dubious::Renderer::Open_gl_context_store Class Reference

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_storeoperator= (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Dubious::Renderer::Open_gl_context_store::Open_gl_context_store ( )

Constructor.

Dubious::Renderer::Open_gl_context_store::Open_gl_context_store ( const Open_gl_context_store )
delete
Dubious::Renderer::Open_gl_context_store::~Open_gl_context_store ( )

Destructor.

Member Function Documentation

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.

Parameters
handle- [in] handle to the list
Returns
true if it does
Call_list_handle Dubious::Renderer::Open_gl_context_store::create_call_list ( int  count)

Create a number of new call lists.

Parameters
count- [in] how many lists you want to make
Returns
a handle to the list. Use for subsequent calls
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.

Parameters
handle- [in] handle to the list
Returns
an int you can pass directly to OpenGL
Open_gl_context_store& Dubious::Renderer::Open_gl_context_store::operator= ( const Open_gl_context_store )
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


The documentation for this class was generated from the following files: