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

IUI_Renderer.h

00001 
00015 #ifndef IUI_RENDERER_H
00016 #define IUI_RENDERER_H
00017 
00018 #include "UI_Lib.h"
00019 #include "UI_types.h"
00020 #include "IUI_Shader.h"
00021 #include "IUI_Texture.h"
00022 
00023 #define UI_NUM_PRIMITIVES       4
00024 
00025 #define UI_POLYGON              0
00026 #define UI_QUADS                1
00027 #define UI_TRIANGLES    2
00028 #define UI_LINE_LOOP    3
00029 
00031 
00043 class GLGUI_ENTRY IUI_Renderer
00044 {
00045 public:
00047 
00050         virtual bool BeginRendering( double dtime ) = 0;
00051 
00053 
00055         virtual bool SetShader( IUI_Shader *shader ) = 0;
00056 
00058 
00060         virtual bool RenderToArea( float minx, float miny, float maxx, float maxy, bool restrict = false ) = 0;
00061 
00063         virtual bool RenderToPrevArea( bool restrict = false ) = 0;
00064 
00066 
00069         virtual bool RenderUnitQuad( void ) = 0;
00070 
00072 
00080         virtual bool RenderPrimitive( unsigned short type, v2_f *vlist, v2_f *texcoords, int numvert ) = 0;
00081 
00083         virtual bool SetFade( float fade ) = 0;
00084 
00086         virtual float GetFade( ) = 0;
00087 
00088 
00089         //
00090         // new methods supplied for procedural shaders
00091         //
00092 
00094         virtual bool SetTexture(int textureID) = 0;
00095 
00097         virtual bool SetColor(v4_f color) = 0;
00098 
00101         virtual IUI_Texture* CreateTexture(int width, int height, int filtering, bool renderable) = 0;
00102 
00105         virtual bool UpdateTexture(int texid, int xoffset, int yoffset, int width, int height, void *data) = 0;
00106 
00107         // ! Load a texture and return texture object
00108         virtual IUI_Texture* LoadTextureNew(char* file) = 0;
00109 
00110         // ! Clear current buffers
00111         virtual void ClearBuffer(bool clearDepth, bool clearColor, float depth) = 0;
00112 
00114 
00116         virtual void EndRendering( ) = 0;
00117 
00118 private:
00119 };
00120 
00121 #endif

Generated on Mon Sep 29 23:07:02 2003 for glGUI by doxygen 1.3.4