![]() |
omegalib
13.1
|
A class managing all resources associated with a single GPU context. More...
#include <GpuResource.h>
Public Types | |
| enum | TextureUnit { TextureUnitInvalid = 0, TextureUnit0 = GL_TEXTURE0, TextureUnit1 = GL_TEXTURE1, TextureUnit2 = GL_TEXTURE2, TextureUnit3 = GL_TEXTURE3 } |
Public Member Functions | |
| GpuContext (GLEWContext *ctx=NULL) | |
| Initializes a GPU context. More... | |
| ~GpuContext () | |
| uint | getId () const |
| GLEWContext * | getGlewContext () |
| void | makeCurrent () |
| void | garbageCollect () |
| Destroys all GPU resources that are not referenced anywhere. More... | |
| Texture * | createTexture () |
| Resource management. More... | |
| RenderTarget * | createRenderTarget (uint type) |
| GpuProgram * | createProgram () |
| VertexBuffer * | createVertexBuffer () |
| VertexArray * | createVertexArray () |
Public Member Functions inherited from omicron::ReferenceType | |
| ReferenceType () | |
| virtual | ~ReferenceType () |
| void | ref () |
| void | unref () |
| long | refCount () |
Static Public Attributes | |
| static const unsigned int | MaxContexts = 64 |
Additional Inherited Members | |
Static Public Member Functions inherited from omicron::ReferenceType | |
| static void | printObjCounts () |
Static Protected Attributes inherited from omicron::ReferenceType | |
| static List< ReferenceType * > | mysObjList |
A class managing all resources associated with a single GPU context.
Inheritance diagram for omega::GpuContext:| omega::GpuContext::GpuContext | ( | GLEWContext * | ctx = NULL | ) |
Initializes a GPU context.
If the passed GLEW context is null, a glew context will be created internally and GLEW will be initialized by this contstructor.
| omega::GpuContext::~GpuContext | ( | ) |
| GpuProgram* omega::GpuContext::createProgram | ( | ) |
| RenderTarget* omega::GpuContext::createRenderTarget | ( | uint | type | ) |
| Texture* omega::GpuContext::createTexture | ( | ) |
Resource management.
| VertexArray* omega::GpuContext::createVertexArray | ( | ) |
| VertexBuffer* omega::GpuContext::createVertexBuffer | ( | ) |
| void omega::GpuContext::garbageCollect | ( | ) |
Destroys all GPU resources that are not referenced anywhere.
|
inline |
|
inline |
| void omega::GpuContext::makeCurrent | ( | ) |
|
static |