source: Daodan/src/Oni/BFW_Motoko_Draw.h@ 1172

Last change on this file since 1172 was 992, checked in by alloc, 11 years ago

Daodan: Removed unused MSVC tree, build folders; reorganized source layout; removed Flatline from current Daodan

File size: 3.3 KB
RevLine 
[992]1#ifndef ONI_H
2#error Do not include this file directly, include Oni/Oni.h instead!
3#endif
4
5#ifndef BFW_MOTOKO_DRAW_H
6#define BFW_MOTOKO_DRAW_H
7
8typedef struct M3tDisplayMode
9{
10 unsigned short Width;
11 unsigned short Height;
12 unsigned short Depth;
13 unsigned short __unused;
14} M3tDisplayMode; // 0x0010: (size).
15
16typedef struct M3tDisplayDevice
17{
18 unsigned int __unknown; //
19 unsigned short NumModes; // 0x0004: number of valid display modes on this device.
20 M3tDisplayMode Modes[16]; // 0x0006: list of supported display modes.
21 unsigned short __padding; // 0x0086: padding (not used).
22} M3tDisplayDevice; // 0x0088: (size).
23
24typedef struct M3tDrawEngineCaps
25{
26 int Type; // 0x0000:
27 char Name[64]; // 0x0004: draw engine name (eg. "OpenGL").
28 char Driver[64]; // 0x0044: driver name (always NULL string).
29 unsigned int Version; // 0x0084: draw engine version (1 for OpenGL).
30 unsigned int NumDevices; // 0x0088: number of valid DisplayDevice-s.
31 M3tDisplayDevice DisplayDevices[8]; // 0x008c: 1 or more display devices.
32 int __unknown; // 0x04cc:
33} M3tDrawEngineCaps; // 0x04d0: (size).
34
35typedef struct
36{
37 int Context_New;
38 int Context_Delete;
39 int Texture_ResetAll;
40 int PrivateState_Size;
41 int PrivateState_New;
42 int PrivateState_Delete;
43 int State_Update;
44} M3tDrawEngine;
45
46typedef struct
47{
48 int FrameStart;
49 int FrameEnd;
50 int FrameSync;
51 int Triangle;
52 int Quad;
53 int Pent;
54 int Line;
55 int Point;
56 int TriSprite;
57 int Sprite;
58 int SpriteArray;
59 int ScreenCapture;
60 int PointVisible;
61 int SupportsPointVisible;
62 int TextureFormatAvailable;
63 int SetResolution;
64 int ResetFog;
65 int TextureLoad;
66 int TextureUnload;
67 int SinglePassMultitextureCapable;
68} M3tDrawContext;
69
70typedef struct
71{
72 float *Position;
73 int *Color;
74 float *TexCoord0;
75 float *TexCoord1;
76 void *Texture0;
77 void *Texture1;
78 void *State6;
79 void *State7;
80 void *State8;
81} M3tDrawPtrState;
82
83typedef struct
84{
85 WORD data[3][256];
86} M3tWin32GammaRamp;
87
88typedef struct
89{
90 float x;
91 float y;
92 float z;
93 float invW;
94} M3tPointScreen;
95
96typedef struct
97{
98 char pad[8];
99
100 UUtUns16 width;
101 UUtUns16 height;
102 int texelType; // enum IMtPixelType
103
104 UUtUns16 num_x;
105 UUtUns16 num_y;
106
107 UUtUns32 num_textures;
108 void* textures[1]; // struct M3tTextureMap
109} M3tTextureMap_Big;
110
111#define M3cNumBoundingPoints 8// Do not change without changing references below
112#define M3cNumBoundingFaces 6// Do not change without changing references below
113
114typedef struct M3tPoint3D
115{
116 float x;
117 float y;
118 float z;
119} M3tPoint3D;
120
121typedef struct M3tQuad
122{
123 uint32_t indices[4];
124} M3tQuad;
125
126typedef struct M3tPlaneEquation
127{
128 float a;
129 float b;
130 float c;
131 float d;
132} M3tPlaneEquation;
133
134typedef M3tPoint3D M3tVector3D;
135
136typedef struct M3tBoundingVolume
137{
138 M3tPoint3D worldPoints[8];// Must match M3cNumBoundingPoints above
139 M3tQuad faces[6];// Must match M3cNumBoundingFaces above
140 M3tVector3D normals[6];// Must match M3cNumBoundingFaces above- starting normals
141
142 M3tPlaneEquation curPlanes[6];// Must match M3cNumBoundingFaces above- current plane equs
143 uint16_t curProjections[6]; // Must match M3cNumBoundingFaces above
144} M3tBoundingVolume;
145
146typedef struct M3tBoundingSphere
147{
148 M3tPoint3D center;
149 float radius;
150} M3tBoundingSphere;
151
152
153extern char M3gResolutionSwitch;
154
155#endif
Note: See TracBrowser for help on using the repository browser.