torque Torque Game Engine Documentation
TGE Version 1.5.2

engine/dgl/dgl.h File Reference

#include "platform/platform.h"
#include "platform/platformGL.h"

Enumerations

enum  GFlipConstants {
  GFlip_None = 0,
  GFlip_X = BIT(0),
  GFlip_Y = BIT(1),
  GFlip_XY = GFlip_X | GFlip_Y
}
 Enumerations used for telling the bitmap drawing how/if to flip a bitmap. More...

Functions

void dglSetBitmapModulation (const ColorF &in_rColor)
 Sets the current color to modulate objects with, similar to glColor3fv().
void dglGetBitmapModulation (ColorF *color)
 Gets the current color modulation in float format [0,1].
void dglGetBitmapModulation (ColorI *color)
 Gets the current color modulation in integer format [0,256).
void dglClearBitmapModulation ()
 Sets current color modulation to white, so no modulation takes place.
void dglSetTextAnchorColor (const ColorF &)
 Sets the anchor color for text coloring, useful when mixing text colors.
void dglDrawBitmap (TextureObject *texObject, const Point2I &in_rAt, const U32 in_flip=GFlip_None)
 Draws a bitmap, starting from the lower left corner, going up and right.
void dglDrawBitmapStretch (TextureObject *texObject, const RectI &in_rStretch, const U32 in_flip=GFlip_None, F32 fSpin=0.0f, bool bSilhouette=false)
 Draws a bitmap that is stretched.
void dglDrawBitmapSR (TextureObject *texObject, const Point2I &in_rAt, const RectI &in_rSubRegion, const U32 in_flip=GFlip_None)
 Draws a sub region of a texture.
void dglDrawBitmapStretchSR (TextureObject *texObject, const RectI &in_rStretch, const RectI &in_rSubRegion, const U32 in_flip=GFlip_None, F32 fSpin=0.0f, bool bSilhouette=false)
 Draws a stretched sub region of a texture.
U32 dglDrawText (const GFont *font, const Point2I &ptDraw, const UTF16 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Draws text at a location in 2d gui coordinates Also supports color tags to modulate the given text.
U32 dglDrawText (const GFont *font, const Point2I &ptDraw, const UTF8 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawText.
U32 dglDrawTextN (const GFont *font, const Point2I &ptDraw, const UTF16 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Draws "n" number of characters from the string, in_string.
U32 dglDrawTextN (const GFont *font, const Point2I &ptDraw, const UTF8 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawTextN.
void dglDrawLine (S32 x1, S32 y1, S32 x2, S32 y2, const ColorI &color)
 draws a line from x1,y1 to x2,y2 in the specified color
void dglDrawLine (const Point2I &startPt, const Point2I &endPt, const ColorI &color)
 draws a line from startPt to endPt in specified color
void dglDrawRect (const Point2I &upperL, const Point2I &lowerR, const ColorI &color)
 draws a wireframe rectangle from upperL to lowerR in specified color
void dglDrawRect (const RectI &rect, const ColorI &color)
 draws a wireframe rectangle in "rect" in specified color
void dglDrawRectFill (const Point2I &upperL, const Point2I &lowerR, const ColorI &color)
 draws an UNTEXTURED filled rectangle from upperL to lowerR in specified color
void dglDrawRectFill (const RectI &rect, const ColorI &color)
 draws an UNTEXTURED filled rectangle in "rect" in specified color
void dglDraw2DSquare (const Point2F &screenPoint, F32 width, F32 spinAngle)
 draws a square, with center point "screenPoint", width of "width" on an angle of "spinAngle" in 2d
void dglDrawBillboard (const Point3F &position, F32 width, F32 spinAngle)
 draws a square, with center point "position", width of "width" on an angle of "spinAngle" in 3d
void dglWireCube (const Point3F &extent, const Point3F &center)
 Draws a wireframe cube around "center" with size "extent".
void dglSolidCube (const Point3F &extent, const Point3F &enter)
 Draws a solid cube around "center" with size "extent".
void dglLoadMatrix (const MatrixF *m)
 loads matrix "m" into the current matrix mode
void dglMultMatrix (const MatrixF *m)
 multiplies the current transformation matrix by matrix "m"
void dglGetModelview (MatrixF *m)
 returns the current modelview matrix
void dglGetProjection (MatrixF *m)
 returns the current projection matrix
F32 dglGetPixelScale ()
 Returns the pixel scale, namely:.
F32 dglGetWorldToScreenScale ()
 The scale factor of a world unit to a screen unit.
F32 dglProjectRadius (F32 dist, F32 radius)
 Returns the screen length of a line of distance "radius" that is "dist" units away from the camera that is perpendicular to the line of sight, namely:.
void dglSetViewport (const RectI &aViewPort)
 sets the viewport for the window
void dglGetViewport (RectI *outViewport)
 gets the current viewport of the window
void dglSetFrustum (F64 left, F64 right, F64 bottom, F64 top, F64 nearDist, F64 farDist, bool ortho=false)
 Sets the viewing frustrum.
void dglGetFrustum (F64 *left, F64 *right, F64 *bottom, F64 *top, F64 *nearDist, F64 *farDist)
 Returns the parameters for the current viewing frustrum.
bool dglIsOrtho ()
 returns whether or not the coordinate system is orthographic (if it is not projected)
void dglSetClipRect (const RectI &clipRect)
 Sets up an orthographical viewport and clipping region.
const RectIdglGetClipRect ()
 Gets the last clip rect specified by a call to dglSetClipRect.
bool dglPointToScreen (const Point3F &point3D, Point3F &screenPoint)
 Projects a point on the screen in 3d space into a point on the screen.
bool dglIsInCanonicalState ()
 Checks to see if all states are "canonical".
void dglSetCanonicalState ()
 Sets states to a "canonical" state.
void dglGetTransformState (S32 *mvDepth, S32 *pDepth, S32 *t0Depth, F32 *t0Matrix, S32 *t1Depth, F32 *t1Matrix, S32 *vp)
 Gets the current state of all transformation matrices.
bool dglCheckState (const S32 mvDepth, const S32 pDepth, const S32 t0Depth, const F32 *t0Matrix, const S32 t1Depth, const F32 *t1Matrix, const S32 *vp)
 Checks to see that the given information matches the current transform state.

Variables

signed int gFSAASamples
 Number of full screen anti-aliasting samples.


Enumeration Type Documentation

Enumerations used for telling the bitmap drawing how/if to flip a bitmap.

See also:
dglDrawBitmap

dglDrawBitmapStretch

dglDrawBitmapSR

dglDrawBitmapStretchSR

Enumerator:
GFlip_None 
GFlip_X 
GFlip_Y 
GFlip_XY 


Function Documentation

void dglSetTextAnchorColor ( const ColorF  ) 

Sets the anchor color for text coloring, useful when mixing text colors.

bool dglPointToScreen ( const Point3F point3D,
Point3F screenPoint 
)

Projects a point on the screen in 3d space into a point on the screen.

Returns:
true if the point is on the screen, false if not and screenPoint will be (0,0,0)

bool dglIsInCanonicalState (  ) 

Checks to see if all states are "canonical".

See also:
dglSetCanonicalState

void dglSetCanonicalState (  ) 

Sets states to a "canonical" state.

Note:
a "canonical" state is described as:
BLEND disabled

TEXTURE_2D disabled on both texture units.

ActiveTexture set to 0

LIGHTING off

winding : clockwise ?

cullface : disabled

void dglGetTransformState ( S32 mvDepth,
S32 pDepth,
S32 t0Depth,
F32 t0Matrix,
S32 t1Depth,
F32 t1Matrix,
S32 vp 
)

Gets the current state of all transformation matrices.

Parameters:
mvDepth Number of "pushes" made to the modelview matrix without balancing "pops"
pDepth Number of "pushes" made to the projection matrix without balancing "pops"
t0Depth Number of "pushes" made to the texture 0 matrix without balancing "pops"
t0Matrix The current texture 0 matrix, should be a 4-element array
t1Depth Number of "pushes" made to the texture 1 matrix without balancing "pops"
t1Matrix The current texture 1 matrix, should be a 4-element array
vp The current viewport, should be a 4-element array
See also:
dglCheckState

bool dglCheckState ( const S32  mvDepth,
const S32  pDepth,
const S32  t0Depth,
const F32 t0Matrix,
const S32  t1Depth,
const F32 t1Matrix,
const S32 vp 
)

Checks to see that the given information matches the current transform state.

See also:
dglGetTransformState


Variable Documentation

signed int gFSAASamples

Number of full screen anti-aliasting samples.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen