Guard for executing plain OpenGL commands. More...
#include <Luminous/RenderContext.hpp>
Public Member Functions | |
| LUMINOUS_API | CustomOpenGL (RenderContext &r, bool reset=false) |
| Creates guard for the given OpenGL context. More... | |
| ProgramGL & | handle (const Program &program) |
| Returns the GL resources handle corresponding to given program. More... | |
| TextureGL & | handle (const Texture &texture) |
| Returns the GL resources handle corresponding to given texture. More... | |
| BufferGL & | handle (const Buffer &buffer) |
| Returns the GL resources handle corresponding to given buffer (vertex/index). More... | |
| VertexArrayGL & | handle (const VertexArray &vertexArray, ProgramGL *program) |
| Returns the GL resources handle corresponding to given vertex array. More... | |
| RenderBufferGL & | handle (const RenderBuffer &buffer) |
| Returns the GL resources handle corresponding to given render buffer. More... | |
| FrameBufferGL & | handle (const FrameBuffer &target) |
| Returns the GL resources handle corresponding to given frame buffer. More... | |
| LUMINOUS_API | ~CustomOpenGL () |
| Sets the given render context to the default state. | |
Guard for executing plain OpenGL commands.
With the help of this object one can inject custom OpenGL commands into Cornerstone application. The usage of this class is strongly discouraged because it can cause big performance losses. When using more exotic states, user should set the state of OpenGL state machine to the state it was before.
| LUMINOUS_API Luminous::CustomOpenGL::CustomOpenGL | ( | RenderContext & | r, |
| bool | reset = false |
||
| ) |
Creates guard for the given OpenGL context.
Executes all queued drawing commands in the given context.
| r | Context to guard. |
| reset | Do we reset OpenGL state |
Returns the GL resources handle corresponding to given program.
| program | CPU side object representing the shader program |
Returns the GL resources handle corresponding to given texture.
| texture | CPU side object representing the texture |
Returns the GL resources handle corresponding to given buffer (vertex/index).
| buffer | CPU side object representing the buffer |
|
inline |
Returns the GL resources handle corresponding to given vertex array.
| vertexArray | CPU side object representing the vertex array |
| program | Handle to OpenGL program associated with vertexarray |
|
inline |
Returns the GL resources handle corresponding to given render buffer.
| buffer | CPU side object representing the render buffer |
|
inline |
Returns the GL resources handle corresponding to given frame buffer.
| target | CPU side object representing the frame buffer |