yage.system.graphics.context
Authors:
Eric Poggel
License:
LGPL v3
This is an experiment toward a wrapper around OpenGL's state
manager, or perhaps eventually all of OpenGL.
- struct GLState
;
- This represents a current OpenGL state that can be pushed
or popped.
- class GLContext
;
- Wrapping all of OpenGL's functionality as I'm doing here
would take 1000's of LoC. I need to find a way to do this more
quickly using templates.
- protected int apply
();
- Apply the current virtual OpenGL state to the real OpenGL
state.
Returns:
The number of OpenGL state changes that were required to apply
the state.
- void execute
(void delegate() code);
- Execute the following OpenGL code
in an asynchronous-safe way. This can be called from any thread
Params:
- GLState pop
();
- If this is called from an empty stack, then the state
will be set to the default OpenGL state.
Returns:
|