PS2GL
OpenGL*-like API for the PS2
Loading...
Searching...
No Matches
vu1_context.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// lights
8
9typedef struct {
10 tU32 dir;
11 tU32 point;
12 tU32 spot;
13 tU32 dummy;
15
16#define kNumLights (kContextStart) // x = directional, y = point, z = spot
17#define kBackFaceCullMult kNumLights // stick this in the w field
18#define kLightPointers0 (kNumLights + 1) // same as above
19#define kLightPointers1 (kLightPointers0 + 1) // same as above
20#define kLightPointers2 (kLightPointers1 + 1) // same as above
21#define kLightPointers3 (kLightPointers2 + 1) // same as above
22#define kLightPointers4 (kLightPointers3 + 1) // same as above
23#define kLightPointers5 (kLightPointers4 + 1) // same as above
24#define kLightPointers6 (kLightPointers5 + 1) // same as above
25#define kLightPointers7 (kLightPointers6 + 1) // same as above
26
27#define kLightAmbientOffset 0
28#define kLightDiffuseOffset 1
29#define kLightSpecularOffset 2
30#define kLightPosOffset 3
31#define kLightSpotDirOffset 4
32#define kLightAttenCoeffOffset 5
33
34#define kLightStructSize 6
35
36#define kLight0Base (kLightPointers7 + 1)
37#define kLight1Base (kLight0Base + kLightStructSize)
38#define kLight2Base (kLight1Base + kLightStructSize)
39#define kLight3Base (kLight2Base + kLightStructSize)
40#define kLight4Base (kLight3Base + kLightStructSize)
41#define kLight5Base (kLight4Base + kLightStructSize)
42#define kLight6Base (kLight5Base + kLightStructSize)
43#define kLight7Base (kLight6Base + kLightStructSize)
44
45#define kGlobalAmbient (kLight7Base + kLightStructSize)
46
47#define kClipToGsDepthOffset kGlobalAmbient
48
49// materials
50
51#define kMaterialEmission (kGlobalAmbient + 1)
52#define kMaterialAmbient (kMaterialEmission + 1)
53#define kMaterialDiffuse (kMaterialAmbient + 1)
54#define kMaterialSpecular (kMaterialDiffuse + 1)
55
56// transforms
57
58#define kVertexXfrm (kMaterialSpecular + 1)
59#define kFixedVertToEye (kVertexXfrm + 4)
60#define kObjToWorldXfrmTrans (kFixedVertToEye + 1)
61#define kWorldToObjXfrm (kObjToWorldXfrmTrans + 4)
62
63#define kGifTag (kWorldToObjXfrm + 4)
64
65#define kClipInfo (kGifTag + 1)
66
67#define kContextLength (kClipInfo - kContextStart + 1)