PS2GL
OpenGL*-like API for the PS2
Loading...
Searching...
No Matches
dlgmanager.h
1/* Copyright (C) 2000,2001,2002 Sony Computer Entertainment America
2
3 This file is subject to the terms and conditions of the GNU Lesser
4 General Public License Version 2.1. See the file "COPYING" in the
5 main directory of this archive for more details. */
6
7#ifndef ps2gl_dlgmanager_h
8#define ps2gl_dlgmanager_h
9
10#include "ps2gl/gmanager.h"
11
12/********************************************
13 * CDListGeomManager - the display list renderer
14 */
15
16class CDList;
17
19
20 CDmaPacket *CurVertexBuf, *CurNormalBuf, *CurTexCoordBuf, *CurColorBuf;
21
22 CDList* CurDList;
23 CGeometryBlock Geometry;
24
25 bool RendererMayHaveChanged;
26
27 void DrawBlock(CGeometryBlock& block);
28 void CommitNewGeom();
29
30 void DrawingIndexedArray();
31 void DrawingLinearArray();
32
33public:
35 virtual ~CDListGeomManager() {}
36
37 void PrimChanged(GLenum prim);
38
39 // user state
40
41 void EnableCustom(tU64 flag);
42 void DisableCustom(tU64 flag);
43
44 void SetUserRenderContextChanged() { mError("not implemented yet"); }
45
46 // geometry
47
48 void BeginDListDef();
49 void EndDListDef();
50
51 void BeginGeom(GLenum mode);
52 void Vertex(cpu_vec_xyzw newVert);
53 void Normal(cpu_vec_xyz normal);
54 void TexCoord(float u, float v);
55 void Color(cpu_vec_xyzw color);
56 void EndGeom();
57 void DrawArrays(GLenum mode, int first, int count);
58 void DrawIndexedArrays(GLenum primType,
59 int numIndices, const unsigned char* indices,
60 int numVertices);
61 void Flush();
62};
63
64#endif // ps2gl_dlgmanager_h