vegastrike
0.5.1.r1
|
#include <gfxlib_struct.h>
Classes | |
union | INDEX |
union | VDAT |
Vertices and colors stored. More... | |
Public Member Functions | |
void | RefreshDisplayList () |
Propagates modifications to the display list. More... | |
GFXVertexList (enum POLYTYPE poly, int numVertices, const GFXVertex *vertices, int numindices, bool Mutable=false, unsigned int *index=0) | |
creates a vertex list with 1 polytype and a given number of vertices More... | |
GFXVertexList (enum POLYTYPE *poly, int numVertices, const GFXVertex *vertices, int numlists, int *offsets, bool Mutable=false, unsigned int *index=0) | |
Creates a vertex list with an arbitrary number of poly types and given vertices, num list and offsets (see above) More... | |
GFXVertexList (enum POLYTYPE poly, int numVertices, const GFXColorVertex *colors, int numindices, bool Mutable=false, unsigned int *index=0) | |
Creates a vertex list with 1 poly type and color information to boot. More... | |
GFXVertexList (enum POLYTYPE *poly, int numVertices, const GFXColorVertex *colors, int numlists, int *offsets, bool Mutable=false, unsigned int *index=0) | |
Creates a vertex list with an arbitrary number of poly types and color. More... | |
virtual | ~GFXVertexList () |
virtual int | numTris () const |
Returns number of Triangles in vertex list (counts tri strips) More... | |
virtual int | numQuads () const |
Returns number of Quads in vertex list (counts quad strips) More... | |
unsigned int | GetIndex (int offset) const |
Looks up the index in the appropriate short, char or int array. More... | |
POLYTYPE * | GetPolyType () const |
int * | GetOffsets () const |
int | GetNumLists () const |
bool | hasColor () const |
int | GetNumVertices () const |
virtual VDAT * | Map (bool read, bool write) |
void | UnMap () |
virtual VDAT * | BeginMutate (int offset) |
Returns the array of vertices to be mutated. More... | |
virtual void | EndMutate (int newsize=0) |
Ends mutation and refreshes display list. More... | |
void | LoadDrawState () |
Loads the draw state (what is active) of a given vlist for mass drawing. More... | |
virtual void | BeginDrawState (GFXBOOL lock=GFXTRUE) |
Specifies array pointers and loads the draw state of a given vlist for mass drawing. More... | |
virtual void | Draw () |
Draws a single copy of the mass-loaded vlist. More... | |
void | Draw (enum POLYTYPE poly, int numV) |
void | Draw (enum POLYTYPE poly, int numV, unsigned char *index) |
void | Draw (enum POLYTYPE poly, int numV, unsigned short *index) |
void | Draw (enum POLYTYPE poly, int numV, unsigned int *index) |
void | DrawOnce () |
Loads draw state and prepares to draw only once. More... | |
virtual void | EndDrawState (GFXBOOL lock=GFXTRUE) |
virtual void | GetPolys (GFXVertex **vert, int *numPolys, int *numTris) |
returns a packed vertex list with number of polys and number of tries to passed in arguments. Useful for getting vertex info from a mesh More... | |
Protected Member Functions | |
const GFXVertex * | GetVertex (int index) const |
Num vertices allocated. More... | |
const GFXColorVertex * | GetColorVertex (int index) const |
void | Init (enum POLYTYPE *poly, int numVertices, const GFXVertex *vert, const GFXColorVertex *colors, int numlists, int *offsets, bool Mutable, unsigned int *indices) |
Init function (call from construtor) More... | |
virtual void | Draw (enum POLYTYPE *poly, const INDEX index, const int numLists, const int *offsets) |
void | RenormalizeNormals () |
GFXVertexList () | |
Static Protected Member Functions | |
static void | VtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
copies nonindexed vertices to dst vertex array More... | |
static void | ColVtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
Copies nonindex colored vertices to dst vertex array. More... | |
static void | ColIndVtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
Copies indexed colored vertices to dst vertex array. More... | |
static void | IndVtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
Copies indexed vertices to dst vertex array. More... | |
Protected Attributes | |
int | numVertices |
union GFXVertexList::VDAT | data |
union GFXVertexList::INDEX | index |
enum POLYTYPE * | mode |
Array of modes that vertices will be drawn with. More... | |
bool | unique_mode |
int | display_list |
Display list number if list is indeed active. 0 otherwise. More... | |
int | vbo_data |
int | numlists |
number of different mode, drawn lists More... | |
int * | offsets |
char | changed |
If vertex list has been mutated since last draw. Low 3 bits store the stride of the index list (if avail). another bit for if color is presnet. More... | |
Friends | |
class | GFXSphereVertexList |
A vertex list is a list of any conglomeration of POLY TYPES. It is held for storage in an array of GFXVertex but attempts to use a display list to hold information if possible
Definition at line 491 of file gfxlib_struct.h.
|
protected |
Definition at line 602 of file gfxlib_struct.cpp.
|
inline |
creates a vertex list with 1 polytype and a given number of vertices
Definition at line 558 of file gfxlib_struct.h.
|
inline |
Creates a vertex list with an arbitrary number of poly types and given vertices, num list and offsets (see above)
Definition at line 568 of file gfxlib_struct.h.
|
inline |
Creates a vertex list with 1 poly type and color information to boot.
Definition at line 579 of file gfxlib_struct.h.
|
inline |
Creates a vertex list with an arbitrary number of poly types and color.
Definition at line 589 of file gfxlib_struct.h.
|
virtual |
Definition at line 506 of file gfxlib_struct.cpp.
Specifies array pointers and loads the draw state of a given vlist for mass drawing.
Reimplemented in GFXSphereVertexList.
Definition at line 164 of file gfxlib_struct.cpp.
|
virtual |
Returns the array of vertices to be mutated.
Reimplemented in GFXSphereVertexList.
Definition at line 575 of file gfxlib_struct.cpp.
|
staticprotected |
Copies indexed colored vertices to dst vertex array.
|
staticprotected |
Copies nonindex colored vertices to dst vertex array.
|
protectedvirtual |
Reimplemented in GFXSphereVertexList.
Definition at line 312 of file gfxlib_struct.cpp.
|
virtual |
Draws a single copy of the mass-loaded vlist.
Reimplemented in GFXSphereVertexList.
Definition at line 306 of file gfxlib_struct.cpp.
void GFXVertexList::Draw | ( | enum POLYTYPE | poly, |
int | numV | ||
) |
Definition at line 264 of file gfxlib_struct.cpp.
void GFXVertexList::Draw | ( | enum POLYTYPE | poly, |
int | numV, | ||
unsigned char * | index | ||
) |
Definition at line 270 of file gfxlib_struct.cpp.
void GFXVertexList::Draw | ( | enum POLYTYPE | poly, |
int | numV, | ||
unsigned short * | index | ||
) |
Definition at line 279 of file gfxlib_struct.cpp.
void GFXVertexList::Draw | ( | enum POLYTYPE | poly, |
int | numV, | ||
unsigned int * | index | ||
) |
Definition at line 288 of file gfxlib_struct.cpp.
void GFXVertexList::DrawOnce | ( | ) |
Loads draw state and prepares to draw only once.
Definition at line 298 of file gfxlib_struct.cpp.
Reimplemented in GFXSphereVertexList.
Definition at line 250 of file gfxlib_struct.cpp.
|
virtual |
Ends mutation and refreshes display list.
Reimplemented in GFXSphereVertexList.
Definition at line 581 of file gfxlib_struct.cpp.
|
protected |
unsigned int GFXVertexList::GetIndex | ( | int | offset) | const |
Looks up the index in the appropriate short, char or int array.
int GFXVertexList::GetNumLists | ( | ) | const |
Definition at line 625 of file gfxlib_struct.cpp.
|
inline |
Definition at line 611 of file gfxlib_struct.h.
int * GFXVertexList::GetOffsets | ( | ) | const |
Definition at line 620 of file gfxlib_struct.cpp.
|
virtual |
returns a packed vertex list with number of polys and number of tries to passed in arguments. Useful for getting vertex info from a mesh
Reimplemented in GFXSphereVertexList.
POLYTYPE * GFXVertexList::GetPolyType | ( | ) | const |
Definition at line 615 of file gfxlib_struct.cpp.
|
protected |
Num vertices allocated.
bool GFXVertexList::hasColor | ( | ) | const |
|
staticprotected |
Copies indexed vertices to dst vertex array.
|
protected |
Init function (call from construtor)
void GFXVertexList::LoadDrawState | ( | ) |
Loads the draw state (what is active) of a given vlist for mass drawing.
|
virtual |
Definition at line 529 of file gfxlib_struct.cpp.
|
virtual |
Returns number of Quads in vertex list (counts quad strips)
|
virtual |
Returns number of Triangles in vertex list (counts tri strips)
void GFXVertexList::RefreshDisplayList | ( | ) |
Propagates modifications to the display list.
Definition at line 72 of file gfxlib_struct.cpp.
|
protected |
void GFXVertexList::UnMap | ( | ) |
Definition at line 556 of file gfxlib_struct.cpp.
|
staticprotected |
copies nonindexed vertices to dst vertex array
|
friend |
Definition at line 493 of file gfxlib_struct.h.
|
protected |
If vertex list has been mutated since last draw. Low 3 bits store the stride of the index list (if avail). another bit for if color is presnet.
Definition at line 531 of file gfxlib_struct.h.
|
protected |
|
protected |
Display list number if list is indeed active. 0 otherwise.
Definition at line 521 of file gfxlib_struct.h.
|
protected |
|
protected |
Array of modes that vertices will be drawn with.
Definition at line 518 of file gfxlib_struct.h.
|
protected |
number of different mode, drawn lists
Definition at line 524 of file gfxlib_struct.h.
|
protected |
Definition at line 498 of file gfxlib_struct.h.
|
protected |
number of vertices in each individual mode. 2 triangles 3 quads and 2 lines would be {6,12,4} as the offsets
Definition at line 529 of file gfxlib_struct.h.
|
protected |
Definition at line 519 of file gfxlib_struct.h.
|
protected |
Definition at line 522 of file gfxlib_struct.h.