Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dlgmanager.h

Go to the documentation of this file.
00001 /*           Copyright (C) 2001 Sony Computer Entertainment America
00002                               All Rights Reserved
00003                                SCEA Confidential                                */
00004 
00005 #ifndef ps2gl_dlgmanager_h
00006 #define ps2gl_dlgmanager_h
00007 
00008 #include "ps2gl/gmanager.h"
00009 
00010 /********************************************
00011  * CDListGeomManager - the display list renderer
00012  */
00013 
00014 class CDList;
00015 
00016 class CDListGeomManager : public CGeomManager {
00017 
00018       CDmaPacket        *CurVertexBuf, *CurNormalBuf, *CurTexCoordBuf, *CurColorBuf;
00019 
00020       CDList            *CurDList;
00021       CGeometryBlock    Geometry;
00022 
00023       bool              Vu1RendererMayHaveChanged;
00024 
00025       void DrawBlock( CGeometryBlock &block );
00026       void CommitNewGeom();
00027 
00028    public:
00029       CDListGeomManager( CGLContext &context );
00030       virtual ~CDListGeomManager() {}
00031 
00032       void PrimChanged( unsigned char prim );
00033       // geometry
00034 
00035       void BeginDListDef();
00036       void EndDListDef();
00037 
00038       void BeginGeom( GLenum mode );
00039       void Vertex( cpu_vec_xyzw newVert );
00040       void Normal( cpu_vec_xyz normal );
00041       void TexCoord( float u, float v );
00042       void Color( cpu_vec_xyzw color );
00043       void EndGeom();
00044       void DrawArrays( GLenum mode, int first, int count );
00045       void Flush();
00046 };
00047 
00048 #endif // ps2gl_dlgmanager_h

ps2gl version 0.2