#include <IUI_Renderer.h>
Public Member Functions | |
virtual bool | BeginRendering (double dtime)=0 |
begin rendering | |
virtual bool | SetShader (IUI_Shader *shader)=0 |
Set the shader to use when rendering. | |
virtual bool | RenderToArea (float minx, float miny, float maxx, float maxy, bool restrict=false)=0 |
rescale render volume to a specific area | |
virtual bool | RenderToPrevArea (bool restrict=false)=0 |
return to previous render area | |
virtual bool | RenderUnitQuad (void)=0 |
render a [0,1] unit quad | |
virtual bool | RenderPrimitive (unsigned short type, v2_f *vlist, v2_f *texcoords, int numvert)=0 |
render a primitive | |
virtual bool | SetFade (float fade)=0 |
Fade all rendering by this amount. | |
virtual float | GetFade ()=0 |
Get the current fade amount. | |
virtual bool | SetTexture (int textureID)=0 |
bool SetTexture | |
virtual bool | SetColor (v4_f color)=0 |
bool SetColor | |
virtual IUI_Texture * | CreateTexture (int width, int height, int filtering, bool renderable)=0 |
virtual bool | UpdateTexture (int texid, int xoffset, int yoffset, int width, int height, void *data)=0 |
virtual IUI_Texture * | LoadTextureNew (char *file)=0 |
virtual void | ClearBuffer (bool clearDepth, bool clearColor, float depth)=0 |
virtual void | EndRendering ()=0 |
end rendering |
This is an abstraction for all rendering functions required by the UI.
Generic implementations will be done for OpenGL and (maybe) D3D. It is also designed so a renderer can be written for a pre-existing engine.
This class is not meant to be a complete renderer. It only implements what the UI needs and is not platform dependent. To that end, it should not deal with initializing the rendering system, swapping buffers, creating windows, etc.
TODO: display lists for static text?
|
begin rendering Called once per frame. Change any states, setup any necessary data. |
|
CreateTexture will be called from Shaders returns a texture object that holds information about dimensions, filtering filename and id |
|
end rendering Called once per frame. |
|
render a primitive
|
|
rescale render volume to a specific area
|
|
render a [0,1] unit quad This is probably the most frequent thing to render, so it can be sped up as necessary. |
|
Set the shader to use when rendering. NULL means, disable shader & texture rendering |
|
UpdateTexture will be called from Shaders copies data to texture memory, returns TRUE on success |