Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IUI_Renderer Class Reference

Interface for rendering the UI. More...

#include <IUI_Renderer.h>

List of all members.

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


Detailed Description

Interface for rendering the UI.

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?


Member Function Documentation

virtual bool IUI_Renderer::BeginRendering double  dtime  )  [pure virtual]
 

begin rendering

Called once per frame. Change any states, setup any necessary data.

virtual IUI_Texture* IUI_Renderer::CreateTexture int  width,
int  height,
int  filtering,
bool  renderable
[pure virtual]
 

CreateTexture will be called from Shaders returns a texture object that holds information about dimensions, filtering filename and id

virtual void IUI_Renderer::EndRendering  )  [pure virtual]
 

end rendering

Called once per frame.

virtual bool IUI_Renderer::RenderPrimitive unsigned short  type,
v2_f vlist,
v2_f texcoords,
int  numvert
[pure virtual]
 

render a primitive

Parameters:
type the type of primitive
vlist list of vertices
texcoords list of texture coordinates
numvert number of vertices in the list
See also:
UI_POLYGON

UI_TRIANGLES

UI_QUADS

virtual bool IUI_Renderer::RenderToArea float  minx,
float  miny,
float  maxx,
float  maxy,
bool  restrict = false
[pure virtual]
 

rescale render volume to a specific area

Parameters:
restrict true if renderer should restrict rendering to only this area

virtual bool IUI_Renderer::RenderUnitQuad void   )  [pure virtual]
 

render a [0,1] unit quad

This is probably the most frequent thing to render, so it can be sped up as necessary.

virtual bool IUI_Renderer::SetShader IUI_Shader shader  )  [pure virtual]
 

Set the shader to use when rendering.

NULL means, disable shader & texture rendering

virtual bool IUI_Renderer::UpdateTexture int  texid,
int  xoffset,
int  yoffset,
int  width,
int  height,
void *  data
[pure virtual]
 

UpdateTexture will be called from Shaders copies data to texture memory, returns TRUE on success


The documentation for this class was generated from the following file:
Generated on Mon Sep 29 23:07:04 2003 for glGUI by doxygen 1.3.4