librw/src/rwrender.h

87 lines
1.3 KiB
C
Raw Normal View History

2017-08-29 09:12:56 +01:00
namespace rw {
// Render states
enum RenderState
{
TEXTURERASTER,
TEXTUREADDRESS,
TEXTUREADDRESSU,
TEXTUREADDRESSV,
TEXTUREFILTER,
VERTEXALPHA,
2017-08-29 09:12:56 +01:00
SRCBLEND,
DESTBLEND,
ZTESTENABLE,
ZWRITEENABLE,
FOGENABLE,
FOGCOLOR,
2018-01-03 17:02:02 +00:00
CULLMODE,
2017-08-29 09:12:56 +01:00
// TODO:
// fog type, density ?
// ? shademode
// ???? stencil
// platform specific or opaque?
ALPHATESTFUNC,
ALPHATESTREF,
};
enum AlphaTestFunc
{
ALPHAALWAYS = 0,
ALPHAGREATEREQUAL,
ALPHALESS
};
2018-01-03 17:02:02 +00:00
enum CullMode
{
CULLNONE,
CULLBACK,
CULLFRONT
};
2017-08-29 09:12:56 +01:00
enum BlendFunction
{
BLENDZERO = 0,
BLENDONE,
BLENDSRCCOLOR,
BLENDINVSRCCOLOR,
BLENDSRCALPHA,
BLENDINVSRCALPHA,
BLENDDESTALPHA,
BLENDINVDESTALPHA,
BLENDDESTCOLOR,
BLENDINVDESTCOLOR,
BLENDSRCALPHASAT,
// TODO: add more perhaps
};
void SetRenderState(int32 state, uint32 value);
void SetRenderStatePtr(int32 state, void *value);
2017-08-29 09:12:56 +01:00
uint32 GetRenderState(int32 state);
void *GetRenderStatePtr(int32 state);
2017-08-29 09:12:56 +01:00
// Im2D
namespace im2d {
float32 GetNearZ(void);
float32 GetFarZ(void);
void RenderIndexedPrimitive(PrimitiveType, void *verts, int32 numVerts, void *indices, int32 numIndices);
}
// Im3D
namespace im3d {
void Transform(void *vertices, int32 numVertices, Matrix *world);
void RenderIndexed(PrimitiveType primType, void *indices, int32 numIndices);
void End(void);
}
2017-08-29 13:05:45 +01:00
}