📄 getypes.h
字号:
#ifndef GE_TYPES_H
#define GE_TYPES_H
#include "BaseType.h"
#include "Vec3d.h"
#ifdef __cplusplus
extern "C" {
#endif
//
// Render flags for poly operations
//
#define GE_RENDER_FLAG_ALPHA (1<<0) // Alpha in the vertices are valid
#define GE_RENDER_FLAG_SPECULAR (1<<1) // Specular in the vertices are valid
#define GE_RENDER_FLAG_COLORKEY (1<<2) // Texture format has color key on the poly being rendered
#define GE_RENDER_FLAG_CLAMP_UV (1<<3) // Clamp U and V in BOTH directions
#define GE_RENDER_FLAG_COUNTER_CLOCKWISE (1<<4) // Winding of poly will be counter-clockwise
#define GE_RENDER_FLAG_NO_ZTEST (1<<5) // No ZTest should be performed
#define GE_RENDER_FLAG_NO_ZWRITE (1<<6) // No ZWrites should be performed
#define GE_RENDER_FLAG_STEST (1<<7) // Span test should be performed (if set, polys should be front to back)
#define GE_RENDER_FLAG_SWRITE (1<<8) // Spans should be written to the sbuffer
#define GE_RENDER_FLAG_FLUSHBATCH (1<<9) // Flushes the current batch of polys (if any), and the current poly
#define GE_RENDER_FLAG_BILINEAR_FILTER (1<<10) // Enable bilinear filtering
// Device Caps for the current driver
typedef struct
{
uint SuggestedDefaultRenderFlags; // What the driver suggest the DefaultRenderFlags should be
uint CanChangeRenderFlags; // RenderFlags that you can change
// Other Device related stuff should go here (
} geDeviceCaps;
typedef struct
{
geFloat u, v;
geFloat r, g, b, a;
} geUVRGBA;
typedef struct
{
float r, g, b, a;
} geRGBA;
typedef struct
{
float r, g, b;
} geRGB;
typedef struct
{
int Left;
int Right;
int Top;
int Bottom;
} geRect;
typedef struct
{
geFloat MinX,MaxX;
geFloat MinY,MaxY;
} geFloatRect;
// Lit vertex
typedef struct
{
/*
geVec3d Position;
geRGBA Color,SpecularColor;
float u,v,pad1,pad2;
*/
// FIXME: Convert 3d X,Y,Z to geVec3d
float X, Y, Z, pad; // 3d vertex
// FIXME: Convert r,g,b,a to GE_RGBA
float r, g, b, a; // color
float u, v,pad1,pad2; // Uv's
float sr, sg, sb, pad3; // specular color
} geLVertex; // 64 bytes
// Transformed Lit vertex
typedef struct
{
float x, y, z, pad; // screen points
float r, g, b, a; // color
float u, v, pad1,pad2; // Uv's
float sr, sg, sb, pad3; // specular color
} geTLVertex; // 64 bytes
typedef struct
{
geVec3d World;
geVec3d Normal;
geRGBA Color;
float u, v;
float pad1,pad2;
} geVertex; // 64 bytes !
// temporary: ! Get rid of the GE_ types!
#define GE_RGBA geRGBA
#define GE_Rect geRect
#define GE_LVertex geLVertex
#define GE_TLVertex geTLVertex
#ifdef __cplusplus
}
#endif
#endif GETYPES_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -