Quad is an arbitrary colored and textured four-vertex 2D polygon. It is fundamental HGE graphic primitive. To describe a quad hgeQuad structure is used:
struct hgeQuad
{
hgeVertex v[4];
HTEXTURE tex;
int blend;
};
Members
- v
- An array of four vertices, describing the quad.
- tex
- Quad's texture handle or 0.
- blend
- Quad's blending mode.
Requirements
Header: hge.h
See also
Gfx_RenderQuad, Vertex structure, Blending modes
-----------------------------------------------------------
The hgeVertex structure is used to describe vertices of which HGE graphic primitives consist.
struct hgeVertex
{
float x, y;
float z;
DWORD col;
float tx, ty;
};
Members
- x
- Screen X-coordinate.
- y
- Screen Y-coordinate.
- z
- Vertex Z-order ranging from 0.0 to 1.0.
If Z-buffer isn't used, the value is ignored.
- col
- Vertex color and opacity.
- tx
- Texture X-coordinate in range 0.0 to 1.0.
- ty
- Texture Y-coordinate in range 0.0 to 1.0.
Remarks
If you specify values outside the 0.0-1.0 range for texture coordinates, the texture data will be repeated on every integer junction. For example, it is an easy way to implement "rotozoom" effect.
Requirements
Header: hge.h
See also
Triple structure, Quad structure, Hardware color format
--------------------------------------------------------------