PrimBuild Namespace Reference


Detailed Description

Primitive Builder.

A simple interface to put together lines and polygons quickly and easily - OpenGL style. This is basically a convenient way to fill a vertex buffer, then draw it.

There are two ways to use it. You can use the begin() and end() calls to have it draw immediately after calling end(). This is the "OpenGL" or "immediate" style of usage.

The other way to use this is to use the beginToBuffer() and endToBuffer() calls, which let you store the results of your intermediate calls for later use. This is much more efficient than using the immediate style.


Functions

void beginToBuffer (GFXPrimitiveType type, U32 maxVerts)
GFXVertexBufferendToBuffer (U32 &outNumPrims)
void begin (GFXPrimitiveType type, U32 maxVerts)
void end (bool useGenericShaders=true)
void vertex2f (F32 x, F32 y)
void vertex3f (F32 x, F32 y, F32 z)
void vertex2fv (const F32 *data)
void vertex2fv (const Point2F &pnt)
void vertex2fv (const Point2F *pnt)
void vertex3fv (const F32 *data)
void vertex3fv (const Point3F &pnt)
void vertex3fv (const Point3F *pnt)
void vertex2i (S32 x, S32 y)
void vertex3i (S32 x, S32 y, S32 z)
void color (const ColorI &)
void color (const ColorF &)
void color3i (U8 red, U8 green, U8 blue)
void color4i (U8 red, U8 green, U8 blue, U8 alpha)
void color3f (F32 red, F32 green, F32 blue)
void color4f (F32 red, F32 green, F32 blue, F32 alpha)
void colorWhite ()
void texCoord2f (F32 x, F32 y)
void shutdown ()

Variables

const ColorI _colWhite


Function Documentation

void PrimBuild::beginToBuffer ( GFXPrimitiveType  type,
U32  maxVerts 
)

GFXVertexBuffer* PrimBuild::endToBuffer ( U32 outNumPrims  ) 

void PrimBuild::begin ( GFXPrimitiveType  type,
U32  maxVerts 
)

void PrimBuild::end ( bool  useGenericShaders = true  ) 

void PrimBuild::vertex2f ( F32  x,
F32  y 
)

void PrimBuild::vertex3f ( F32  x,
F32  y,
F32  z 
)

void PrimBuild::vertex2fv ( const F32 data  ) 

void PrimBuild::vertex2fv ( const Point2F pnt  )  [inline]

void PrimBuild::vertex2fv ( const Point2F pnt  )  [inline]

void PrimBuild::vertex3fv ( const F32 data  ) 

void PrimBuild::vertex3fv ( const Point3F pnt  )  [inline]

void PrimBuild::vertex3fv ( const Point3F pnt  )  [inline]

void PrimBuild::vertex2i ( S32  x,
S32  y 
) [inline]

void PrimBuild::vertex3i ( S32  x,
S32  y,
S32  z 
) [inline]

void PrimBuild::color ( const ColorI  ) 

void PrimBuild::color ( const ColorF  ) 

void PrimBuild::color3i ( U8  red,
U8  green,
U8  blue 
)

void PrimBuild::color4i ( U8  red,
U8  green,
U8  blue,
U8  alpha 
)

void PrimBuild::color3f ( F32  red,
F32  green,
F32  blue 
)

void PrimBuild::color4f ( F32  red,
F32  green,
F32  blue,
F32  alpha 
)

void PrimBuild::colorWhite (  )  [inline]

void PrimBuild::texCoord2f ( F32  x,
F32  y 
)

void PrimBuild::shutdown (  ) 


Variable Documentation