JNR
|
Virtual interface for the Engine graphics renderer. More...
#include <laRenderer.h>
Public Member Functions | |
laRenderer () | |
Default constructor for the renderer. | |
virtual laPoint3 | getCameraAngles ()=0 |
laFont * | font (char *strName) |
Get a font renderer. | |
virtual void | trianglesDraw (laPoint3 *ar_v, laPoint2 *ar_tv, laPoint3 *ar_n, unsigned nvert)=0 |
virtual void | drawRect (const laPoint3 &pos, const laPoint3 &sz, const laPoint2 &uv, const laPoint2 &uv_sz, double an1=0, double an2=0, M_BOOL bAlignX=M_TRUE)=0 |
virtual void | drawLine (const laPoint3 &a, const laPoint3 &b)=0 |
virtual void | drawEllipse2 (laPoint3 a, laPoint3 b, double z=0, bool flat=true, bool lighten=true)=0 |
Rendering mode | |
virtual void | modeInterface ()=0 |
Switch to interface rendering (2D projection mode) | |
virtual void | modeWorld (const laPoint3 &pos, const laPoint3 &ang=laPoint3())=0 |
Switch to "world rendering" (3D projection mode) | |
virtual void | commit ()=0 |
Display renderer output. | |
Rendering flags | |
virtual void | modeDepthBuffer (M_BOOL bOn)=0 |
Enable/disable depth buffer. | |
virtual void | modeTexture (M_BOOL bOn)=0 |
Enable/disable texturing. | |
virtual void | modeLight (M_BOOL bOn)=0 |
Enable/disable lighting. | |
virtual void | modeFog (M_BOOL bOn)=0 |
Enable/disable fox. | |
virtual void | modeBlend (M_BOOL bOn)=0 |
Enable/disable alpha blending (opacity) | |
virtual double | modeBlendFilter (const double &dMinVisisbleAlpha)=0 |
Set a "blend filter" (cutting out elements with opacity lower than dMinVisisbleAlpha) | |
virtual void | modeOutline (const laOutline &outline) |
Set outline parameters. | |
Performance profiler window | |
virtual void | modeProfiler (M_BOOL bOn) |
Show/hide profiler window. | |
M_BOOL | isProfilerOn () |
Query profiler window status. | |
Detail texture | |
virtual void | vtex (laTexture *pTex=NULL, double scale=0.2)=0 |
virtual void | vtexOffset (laPoint3 ofs) |
Set detail texture offset. | |
Lighting parameters | |
virtual void | lightMakeProjector (unsigned nLight, const laPoint3 &pos, const laPoint3 &dir, const double &angle=360)=0 |
virtual void | lightMakeSunlight (unsigned nLight, const laPoint3 &pos)=0 |
virtual void | lightAmbient (unsigned nLight, const laColor &rgb)=0 |
virtual void | lightDiffuse (unsigned nLight, const laColor &rgb)=0 |
virtual void | lightSpecular (unsigned nLight, const laColor &rgb)=0 |
virtual void | lightAttenuation (unsigned nLight, double a)=0 |
virtual void | lightSetCount (unsigned n)=0 |
Fog parameters | |
virtual void | fogColor (const laColor &rgb)=0 |
virtual void | fogRange (const double &start, const double &end)=0 |
virtual M_BOOL | getFogMode ()=0 |
Material parameters | |
virtual void | styleSet (const laColor &diffuse, const laColor &specular=laColor(255, 255, 255, 255))=0 |
virtual void | styleShininess (unsigned s)=0 |
virtual void | styleLine (double dWidth)=0 |
virtual unsigned | styleShaderLoad (char *strShaderName)=0 |
virtual void | styleShader (unsigned ShaderID)=0 |
virtual void | styleBackground (const laColor &bg) |
Gemoetry Transformations | |
virtual void | transTranslate (const laPoint3 &pos)=0 |
virtual void | transRotate (const double &ang, const laPoint3 &axis)=0 |
virtual void | transScale (const laPoint3 &sz)=0 |
virtual void | transPush ()=0 |
virtual void | transPop ()=0 |
Preparing and rendering "compilations" (for quick rendering of static objects ) | |
virtual unsigned | compiledActivate (M_BOOL bOn)=0 |
virtual void | compiledDraw (unsigned nID)=0 |
Rendering "Volatile Quads" (used by the paricle system and the GUI) | |
unsigned | vquadsCount () const |
Current nuber of quads. | |
void | vquadsAllocate (unsigned nMaxQuads) |
Allocate memory for VQ (This is slow, so it should be called a minimal number ot times e.g. at initialization) | |
laPoint3 * | vquadsData (unsigned nQuad, unsigned nCount=1) |
Get a pointer to VQ vertex data. | |
laPoint2 * | vquadsTexCoord (unsigned nQuad, unsigned nCount=1) |
Get a pointer to VQ texture coordinates. | |
laColor * | vquadsCol (unsigned nQuad, unsigned nCount=1) |
Get a pointer to VQ color data. | |
virtual void | vquadsDraw (unsigned nQuads, laPoint2 *ar_uv=NULL, laColor *ar_color=NULL, M_BOOL bBillboards=M_FALSE, M_BOOL bUseColorArrays=M_FALSE)=0 |
Draw an array of VQ, starting with the psecified pointers (or the first VQ if null) | |
virtual void | vquadsDrawSingle (laPoint2 *ar_uv=NULL)=0 |
Draw a single VQ (Note this is slower than drawing an array of VQ and should be avoided) | |
void | vquadsMakeBillboards (unsigned nQuads, laPoint3 *ar_pos, double *ar_size) |
Use camera data to create an array of camera-facing VQ (handy for particle effects) | |
void | vquadsMakeXYRect (unsigned nIndex, const laPoint3 &pos, const laPoint3 &sz, const laPoint2 &uv, const laPoint2 &uv_sz) |
Makes a quad aligned to the XY plane; (handy for GUI rendering ) | |
Static Public Attributes | |
static M_BOOL | _bDbgEnable = M_FALSE |
static double | _dDbgOfsX = 0 |
static double | _dDbgOfsY = 0 |
Protected Attributes | |
M_BOOL | _bShowProfiler |
laFontManager | _fontman |
Font manager pointer. | |
laColor | _rgbBg |
Background clear color. | |
laOutline | _outline |
Active object outline. | |
Detail texture to be applied | |
class laTexture * | _pVarTex |
double | _dDetailTex_Scale |
laPoint3 | _ptVarTexOffset |
unsigned | _nW |
\ Camera-related varaibles | |
unsigned | _nH |
Viewport width and height (in pixels) | |
laPoint2 | _ptCamAng |
Camera angle along vertical axis. | |
laPoint2 | _ptCamAngX_sc |
laPoint2 | _ptCamAngY_sc |
Precomputed sin/cos of camera angle. | |
Static Protected Attributes | |
static laPoint3 * | _arQuadData = NULL |
Internal variablse for storing "Volatile Quads" (used by the particle system and the GUI) More... | |
static laPoint2 * | _arQuadUV = NULL |
Quad texture coordinates. | |
static laColor * | _arQuadRGB = NULL |
Quad colors. | |
static unsigned | _nMaxQuads |
Abstract functions for creating and discarding the renderer ( to be defined by children ) | |
class | laSystemIntegrator |
virtual void | create ()=0 |
virtual void | discard ()=0 |
Internals for loading and using textures | |
class | laTexture |
virtual laTexture | texLoad (std::string strFile, laTextureParams params)=0 |
virtual void | texUse (laTexture *pTex)=0 |
Virtual interface for the Engine graphics renderer.
Abstract Renderer Interface.
Abstract base class for specific rendering implementations (e[1]. OpenGL, DirectX based).
Definition at line 98 of file laRenderer.h.
|
staticprotected |
Internal variablse for storing "Volatile Quads" (used by the particle system and the GUI)
Quad vertex coordinates
Definition at line 134 of file laRenderer.h.
Referenced by vquadsAllocate().