# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CDriverUser Class Reference

UDriver implementation. More...

#include <driver_user.h>

Inheritance diagram for NL3D::CDriverUser:

NL3D::UDriver List of all members.

Public Methods

Object
 CDriverUser ()
virtual ~CDriverUser ()
Window / driver management.
virtual TModeList enumModes ()
 Enum All Fullscreen modes. More...

virtual void disableHardwareVertexProgram ()
virtual void disableHardwareVertexArrayAGP ()
virtual void disableHardwareTextureShader ()
virtual void setDisplay (const CMode &mode)
 create the window. More...

virtual void release ()
 Release the window. More...

virtual bool activate (void)
 Before rendering via a driver in a thread, must activate() (per thread). More...

virtual bool isActive ()
 Return true if driver is still active. Return false else. If he user close the window, must return false. More...

Buffers.
virtual void clearRGBABuffer (CRGBA col=CRGBA(255, 255, 255, 255))
 This clear only the RGBA back buffer. More...

virtual void clearZBuffer ()
 This clear only the RGBA back buffer. More...

virtual void clearBuffers (CRGBA col=CRGBA(255, 255, 255, 255))
 This clear the buffers (ALL the buffer :) ). More...

virtual void swapBuffers ()
 This swap the back and front buffer (ALL the buffer :) ). More...

Fog support.
virtual bool fogEnabled ()
virtual void enableFog (bool enable)
virtual void setupFog (float start, float end, CRGBA color)
 setup fog parameters. fog must enabled to see result. start and end are in [0,1] range. More...

Light support.
virtual void setLight (uint8 num, const ULight &light)
virtual void enableLight (uint8 num, bool enable=true)
virtual void setAmbientColor (CRGBA color)
Scene gestion.
virtual UScenecreateScene ()
 Create a new scene. More...

virtual void deleteScene (UScene *scene)
 Delete a scene. More...

Components gestion for Interface 2D/3D.
virtual UTextContextcreateTextContext (const std::string fontFileName, const std::string fontExFileName="")
 create a new TextContext, for a given font. More...

virtual void deleteTextContext (UTextContext *textContext)
 delete a TextContext. More...

virtual void setFontManagerMaxMemory (uint maxMem)
 Set the maxMemory used for the FontManager. More...

virtual std::string getFontManagerCacheInformation () const
 get cahce information. More...

virtual UTextureFilecreateTextureFile (const std::string &file)
 Create a new texture file, searching in CPath. More...

virtual void deleteTextureFile (UTextureFile *textfile)
 Delete a texture file. This one will be really deleted in memory when no material point to it. More...

virtual UTextureRawcreateTextureRaw ()
 Create a new Raw texture, to be filled by user. More...

virtual void deleteTextureRaw (UTextureRaw *textraw)
 Delete a Raw texture. This one will be really deleted in memory when no material point to it. More...

virtual UMaterialcreateMaterial ()
 Create a new Material, to be filled by user. More...

virtual void deleteMaterial (UMaterial *mat)
 Delete a Material. More...

Matrix context for Interface 2D/3D.
virtual void setScissor (const CScissor &)
 Set the active scissor for rendering. More...

virtual CScissor getScissor ()
virtual void setViewport (const CViewport &)
 Set the active viewport for rendering. More...

virtual CViewport getViewport ()
virtual void setFrustum (const CFrustum &frust)
 Set the active Frustum for rendering. More...

virtual CFrustum getFrustum ()
virtual void setViewMatrix (const CMatrix &mat)
 Set the active ViewMatrix for rendering. More...

virtual CMatrix getViewMatrix ()
virtual void setModelMatrix (const CMatrix &mat)
 Set the active ModelMatrix for rendering. More...

virtual CMatrix getModelMatrix ()
virtual void setMatrixMode2D (const CFrustum &frust)
 Tool function: Setup frustum/viewmatrix/modelmatrix for 2D. More...

virtual void setMatrixMode3D (UCamera &camera)
 Tool function: Setup frustum/viewmatrix/modelmatrix for 3D, using parameters of a UCamera. More...

Interface 2D/3D.
virtual void drawLine (const NLMISC::CLine &tri, UMaterial &mat)
 Draw the Line, taking color from material. More...

virtual void drawLine (const NLMISC::CLineColor &tri, UMaterial &mat)
 Draw the Line, taking color from primitive. More...

virtual void drawLine (const NLMISC::CLineUV &tri, UMaterial &mat)
 Draw the Line, taking color from material. With UV for texture. More...

virtual void drawLine (const NLMISC::CLineColorUV &tri, UMaterial &mat)
 Draw the Line, taking color from primitive. With UV for texture. More...

virtual void drawTriangle (const NLMISC::CTriangle &tri, UMaterial &mat)
 Draw the Triangle, taking color from material. More...

virtual void drawTriangle (const NLMISC::CTriangleColor &tri, UMaterial &mat)
 Draw the Triangle, taking color from primitive. More...

virtual void drawTriangle (const NLMISC::CTriangleUV &tri, UMaterial &mat)
 Draw the Triangle, taking color from material. With UV for texture. More...

virtual void drawTriangle (const NLMISC::CTriangleColorUV &tri, UMaterial &mat)
 Draw the Triangle, taking color from primitive. With UV for texture. More...

virtual void drawQuad (const NLMISC::CQuad &tri, UMaterial &mat)
 Draw the Quad, taking color from material. More...

virtual void drawQuad (const NLMISC::CQuadColor &tri, UMaterial &mat)
 Draw the Quad, taking color from primitive. More...

virtual void drawQuad (const NLMISC::CQuadUV &tri, UMaterial &mat)
 Draw the Quad, taking color from material. With UV for texture. More...

virtual void drawQuad (const NLMISC::CQuadColorUV &tri, UMaterial &mat)
 Draw the Quad, taking color from primitive. With UV for texture. More...

virtual void drawQuads (const std::vector< NLMISC::CQuadColorUV > &tri, UMaterial &mat)
virtual void drawQuads (const NLMISC::CQuadColorUV *quads, uint32 nbQuads, UMaterial &mat)
Tools for Interface 2D.
virtual void drawBitmap (float x, float y, float width, float height, class UTexture &texture, bool blend=true, CRGBA col=CRGBA(255, 255, 255, 255))
 Draw a bitmap 2D. Warning: this is slow... More...

virtual void drawLine (float x0, float y0, float x1, float y1, CRGBA col=CRGBA(255, 255, 255, 255))
 Draw a line in 2D. Warning: this is slow... More...

virtual void drawTriangle (float x0, float y0, float x1, float y1, float x2, float y2, CRGBA col)
 Draw a Triangle in 2D. Warning: this is slow... More...

virtual void drawQuad (float x0, float y0, float x1, float y1, CRGBA col)
 Draw a Quad in 2D. Warning: this is slow... More...

virtual void drawQuad (float xcenter, float ycenter, float radius, CRGBA col)
 Draw a Quad in 2D. Warning: this is slow... More...

virtual void drawWiredQuad (float x0, float y0, float x1, float y1, CRGBA col)
 Draw a Quad in 2D. Warning: this is slow... More...

virtual void drawWiredQuad (float xcenter, float ycenter, float radius, CRGBA col)
 Draw a Quad in 2D. Warning: this is slow... More...

Driver information/Queries
virtual uint32 getImplementationVersion () const
 Driver information/Queries. More...

virtual const char * getDriverInformation ()
 Get driver informations. More...

virtual const char * getVideocardInformation ()
 Get videocard informations. More...

virtual sint getNbTextureStages ()
 Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay(). More...

virtual void getWindowSize (uint32 &width, uint32 &height)
 Get the width and the height of the window. More...

virtual uint getWindowWidth ()
 Get the width of the window. More...

virtual uint getWindowHeight ()
 Get the height of the window. More...

virtual void getBuffer (CBitmap &bitmap)
 get the RGBA back buffer. More...

virtual void getZBuffer (std::vector< float > &zbuffer)
 get the ZBuffer (back buffer). More...

virtual void getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)
 get a part of the RGBA back buffer NB: 0,0 is the bottom left corner of the screen. More...

virtual void getZBufferPart (std::vector< float > &zbuffer, NLMISC::CRect &rect)
 get a part of the ZBuffer (back buffer). More...

virtual bool fillBuffer (CBitmap &bitmap)
 fill the RGBA back buffer. More...

Mouse / Keyboards / Game devices
virtual NLMISC::IMouseDeviceenableLowLevelMouse (bool enable)
 Enable / disable low level mouse. More...

virtual NLMISC::IKeyboardDeviceenableLowLevelKeyboard (bool enable)
 Enable / disable a low level keyboard. More...

virtual NLMISC::IInputDeviceManagergetLowLevelInputDeviceManager ()
 Check wether there is a low level device manager available, and get its interface. More...

virtual void showCursor (bool b)
 show cursor if b is true, or hide it if b is false. More...

virtual void setMousePos (float x, float y)
 x and y must be between 0.0 and 1.0. More...

virtual void setCapture (bool b)
 If true, capture the mouse to force it to stay under the window. More...

Misc.
virtual TMessageBoxId systemMessageBox (const char *message, const char *title, TMessageBoxType type=okType, TMessageBoxIcon icon=noIcon)
 Output a system message box and print a message with an icon. More...

virtual void setPolygonMode (TPolygonMode mode)
 Set the global polygon mode. More...

virtual U3dMouseListenercreate3dMouseListener ()
 Create a 3d mouse listener. More...

virtual void delete3dMouseListener (U3dMouseListener *listener)
 Delete a 3d mouse listener. More...

virtual TPolygonMode getPolygonMode ()
 Get the global polygon mode. More...

virtual void forceDXTCCompression (bool dxtcComp)
 if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed. More...

virtual void forceTextureResize (uint divisor)
 if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..) to be divided by Divisor (2, 4, 8...) Default is 1. More...

virtual bool setMonitorColorProperties (const CMonitorColorProperties &properties)
 Setup monitor color properties. More...

Shape Bank
virtual UShapeBankgetShapeBank ()
 Get the global shape bank. More...

Profiling.
virtual void profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut)
 Get the number of primitives rendered from the last swapBuffers() call. More...

virtual uint32 profileAllocatedTextureMemory ()
 Return the amount of Texture memory requested. More...

virtual uint32 profileSetupedMaterials () const
 Get the number of material setuped from the last swapBuffers() call. More...

virtual uint32 profileSetupedModelMatrix () const
 Get the number of matrix setuped from the last swapBuffers() call. More...

virtual void enableUsedTextureMemorySum (bool enable)
 Enable the sum of texture memory used since last swapBuffers() call. More...

virtual uint32 getUsedTextureMemory () const
 Return the amount of texture video memory used since last swapBuffers() call. More...

Async Texture loading mgt
virtual void setupAsyncTextureLod (uint baseLevel, uint maxLevel)
 setup the mipMap levels. More...

virtual void setupAsyncTextureMaxUploadPerFrame (uint maxup)
 Setup max texture upload in driver per updateAsyncTexture() call. More...

virtual void setupMaxTotalAsyncTextureSize (uint maxText)
 Setup max total texture size allowed. Default is 10Mo. More...

virtual void setupMaxHLSColoringPerFrame (uint maxCol)
 Setup max texture HLS Coloring per update() call (in bytes). Default to 20K. More...

virtual void updateAsyncTexture ()
 update the manager. More...

virtual uint getTotalAsyncTextureSizeAsked () const
 get the async texture Size asked (ie maybe bigger than MaxTotalTextureSize). More...

virtual uint getLastAsyncTextureSizeGot () const
 get what the system really allows. More...

virtual void loadHLSBank (const std::string &fileName)
 Load a .hlsBank, add it to the HLSManager of the AsyncTextureManager. More...

Accessor for CSeneUser.
IDrivergetDriver ()
void restoreMatrixContext ()

Protected Types

typedef CPtrSet< CTextureUserTTextureSet
typedef CPtrSet< CMaterialUserTMaterialSet
typedef CPtrSet< CTextContextUserTTextContextSet
typedef CPtrSet< CSceneUserTSceneSet

Protected Methods

void setupMatrixContext ()
CMaterialconvMat (UMaterial &mat)

Protected Attributes

IDriver_Driver
bool _WindowInit
CMatrixContext _CurrentMatrixContext
CFontManager _FontManager
TTextureSet _Textures
TMaterialSet _Materials
TTextContextSet _TextContexts
TSceneSet _Scenes
CShapeBankUser _ShapeBank
CMeshSkinManager _MeshSkinManager
CAsyncTextureManager _AsyncTextureManager
CLodCharacterManager _LodCharacterManager
CVertexBuffer _VBFlat
CVertexBuffer _VBColor
CVertexBuffer _VBUv
CVertexBuffer _VBColorUv
CPrimitiveBlock _PBLine
CPrimitiveBlock _PBTri
CPrimitiveBlock _PBQuad
CVertexBuffer _VBQuadsColUv
CMaterialUser _MatFlat
CMaterialUser _MatText

Static Protected Attributes

bool _StaticInit = false

Detailed Description

UDriver implementation.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 63 of file driver_user.h.


Member Typedef Documentation

typedef CPtrSet<CMaterialUser> NL3D::CDriverUser::TMaterialSet [protected]
 

Definition at line 84 of file driver_user.h.

typedef CPtrSet<CSceneUser> NL3D::CDriverUser::TSceneSet [protected]
 

Definition at line 86 of file driver_user.h.

typedef CPtrSet<CTextContextUser> NL3D::CDriverUser::TTextContextSet [protected]
 

Definition at line 85 of file driver_user.h.

typedef CPtrSet<CTextureUser> NL3D::CDriverUser::TTextureSet [protected]
 

Definition at line 83 of file driver_user.h.


Constructor & Destructor Documentation

NL3D::CDriverUser::CDriverUser  
 

Definition at line 114 of file driver_user.cpp.

References _Driver, _PBLine, _PBQuad, _PBTri, _StaticInit, _VBColor, _VBColorUv, _VBFlat, _VBQuadsColUv, _VBUv, _WindowInit, NL3D_MEM_DRIVER, nlassert, and NL3D::registerSerial3d.

NL3D::CDriverUser::~CDriverUser   [virtual]
 

Definition at line 163 of file driver_user.cpp.

References _Driver, NL3D_MEM_DRIVER, and release.


Member Function Documentation

bool NL3D::CDriverUser::activate void    [virtual]
 

Before rendering via a driver in a thread, must activate() (per thread).

Implements NL3D::UDriver.

Definition at line 273 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

Referenced by setDisplay.

void NL3D::CDriverUser::clearBuffers CRGBA    col = CRGBA(255, 255, 255, 255) [virtual]
 

This clear the buffers (ALL the buffer :) ).

Implements NL3D::UDriver.

Definition at line 873 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_CLEAR_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::clearRGBABuffer CRGBA    col = CRGBA(255, 255, 255, 255) [virtual]
 

This clear only the RGBA back buffer.

Implements NL3D::UDriver.

Definition at line 857 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_CLEAR_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::clearZBuffer   [virtual]
 

This clear only the RGBA back buffer.

Implements NL3D::UDriver.

Definition at line 865 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_CLEAR_DRIVER, and NL3D_MEM_DRIVER.

CMaterial & NL3D::CDriverUser::convMat UMaterial   mat [protected]
 

Definition at line 847 of file driver_user.cpp.

References NL3D_MEM_DRIVER.

Referenced by drawLine, drawQuad, drawQuads, and drawTriangle.

U3dMouseListener * NL3D::CDriverUser::create3dMouseListener   [virtual]
 

Create a 3d mouse listener.

Returns:
a 3d mouse listener.

Implements NL3D::UDriver.

Definition at line 960 of file driver_user.cpp.

References NL3D::UDriver::EventServer, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

UMaterial * NL3D::CDriverUser::createMaterial   [virtual]
 

Create a new Material, to be filled by user.

Implements NL3D::UDriver.

Definition at line 155 of file driver_user2.cpp.

References _Materials, and NL3D_MEM_DRIVER.

UScene * NL3D::CDriverUser::createScene   [virtual]
 

Create a new scene.

Implements NL3D::UDriver.

Definition at line 63 of file driver_user2.cpp.

References _AsyncTextureManager, _LodCharacterManager, _MeshSkinManager, _Scenes, _ShapeBank, and NL3D_MEM_DRIVER.

UTextContext * NL3D::CDriverUser::createTextContext const std::string    fontFileName,
const std::string    fontExFileName = ""
[virtual]
 

create a new TextContext, for a given font.

Implements NL3D::UDriver.

Definition at line 92 of file driver_user2.cpp.

References _FontManager, _TextContexts, and NL3D_MEM_DRIVER.

UTextureFile * NL3D::CDriverUser::createTextureFile const std::string &    file [virtual]
 

Create a new texture file, searching in CPath.

Parameters:
file  filename, local to CPath paths.

Implements NL3D::UDriver.

Definition at line 123 of file driver_user2.cpp.

References _Textures, file, and NL3D_MEM_DRIVER.

UTextureRaw * NL3D::CDriverUser::createTextureRaw   [virtual]
 

Create a new Raw texture, to be filled by user.

Implements NL3D::UDriver.

Definition at line 139 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, and nlstop.

void NL3D::CDriverUser::delete3dMouseListener U3dMouseListener   listener [virtual]
 

Delete a 3d mouse listener.

Parameters:
listener  a 3d mouse listener.

Implements NL3D::UDriver.

Definition at line 973 of file driver_user.cpp.

References NL3D::UDriver::EventServer, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::deleteMaterial UMaterial   mat [virtual]
 

Delete a Material.

Implements NL3D::UDriver.

Definition at line 162 of file driver_user2.cpp.

References _Materials, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::deleteScene UScene   scene [virtual]
 

Delete a scene.

Implements NL3D::UDriver.

Definition at line 79 of file driver_user2.cpp.

References _Scenes, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::deleteTextContext UTextContext   textContext [virtual]
 

delete a TextContext.

Implements NL3D::UDriver.

Definition at line 99 of file driver_user2.cpp.

References _TextContexts, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::deleteTextureFile UTextureFile   textfile [virtual]
 

Delete a texture file. This one will be really deleted in memory when no material point to it.

Implements NL3D::UDriver.

Definition at line 132 of file driver_user2.cpp.

References _Textures, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::deleteTextureRaw UTextureRaw   textraw [virtual]
 

Delete a Raw texture. This one will be really deleted in memory when no material point to it.

Implements NL3D::UDriver.

Definition at line 147 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, and nlstop.

void NL3D::CDriverUser::disableHardwareTextureShader   [virtual]
 

Implements NL3D::UDriver.

Definition at line 205 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::disableHardwareVertexArrayAGP   [virtual]
 

Implements NL3D::UDriver.

Definition at line 198 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::disableHardwareVertexProgram   [virtual]
 

Implements NL3D::UDriver.

Definition at line 191 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::drawBitmap float    x,
float    y,
float    width,
float    height,
class UTexture   texture,
bool    blend = true,
CRGBA    col = CRGBA(255, 255, 255, 255)
[virtual]
 

Draw a bitmap 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 722 of file driver_user.cpp.

References _MatText, NLMISC::blend, drawQuad, height, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, width, x, and y.

void NL3D::CDriverUser::drawLine float    x0,
float    y0,
float    x1,
float    y1,
CRGBA    col = CRGBA(255, 255, 255, 255)
[virtual]
 

Draw a line in 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 748 of file driver_user.cpp.

References _MatFlat, drawLine, NL3D_HAUTO_DRAW_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::drawLine const NLMISC::CLineColorUV   tri,
UMaterial   mat
[virtual]
 

Draw the Line, taking color from primitive. With UV for texture.

Implements NL3D::UDriver.

Definition at line 489 of file driver_user.cpp.

References _Driver, _PBLine, _VBColorUv, NLMISC::CLineColorUV::Color0, NLMISC::CLineColorUV::Color1, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CLineColorUV::Uv0, NLMISC::CLineColorUV::Uv1, NLMISC::CLine::V0, and NLMISC::CLine::V1.

void NL3D::CDriverUser::drawLine const NLMISC::CLineUV   tri,
UMaterial   mat
[virtual]
 

Draw the Line, taking color from material. With UV for texture.

Implements NL3D::UDriver.

Definition at line 472 of file driver_user.cpp.

References _Driver, _PBLine, _VBUv, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CLineUV::Uv0, NLMISC::CLineUV::Uv1, NLMISC::CLine::V0, and NLMISC::CLine::V1.

void NL3D::CDriverUser::drawLine const NLMISC::CLineColor   tri,
UMaterial   mat
[virtual]
 

Draw the Line, taking color from primitive.

Implements NL3D::UDriver.

Definition at line 455 of file driver_user.cpp.

References _Driver, _PBLine, _VBColor, NLMISC::CLineColor::Color0, NLMISC::CLineColor::Color1, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CLine::V0, and NLMISC::CLine::V1.

void NL3D::CDriverUser::drawLine const NLMISC::CLine   tri,
UMaterial   mat
[virtual]
 

Draw the Line, taking color from material.

NB: If you set a texture to your material, the primitives are textured, even if no Uvs are provided.
NB: All rendering are done in current viewport / current matrix context.

Implements NL3D::UDriver.

Definition at line 440 of file driver_user.cpp.

References _Driver, _PBLine, _VBFlat, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CLine::V0, and NLMISC::CLine::V1.

Referenced by drawLine, and drawWiredQuad.

void NL3D::CDriverUser::drawQuad float    xcenter,
float    ycenter,
float    radius,
CRGBA    col
[virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 796 of file driver_user.cpp.

References drawQuad, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::drawQuad float    x0,
float    y0,
float    x1,
float    y1,
CRGBA    col
[virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 779 of file driver_user.cpp.

References _MatFlat, drawQuad, NL3D_HAUTO_DRAW_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::drawQuad const NLMISC::CQuadColorUV   tri,
UMaterial   mat
[virtual]
 

Draw the Quad, taking color from primitive. With UV for texture.

Implements NL3D::UDriver.

Definition at line 649 of file driver_user.cpp.

References _Driver, _PBQuad, _VBColorUv, NLMISC::CQuadColorUV::Color0, NLMISC::CQuadColorUV::Color1, NLMISC::CQuadColorUV::Color2, NLMISC::CQuadColorUV::Color3, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CQuadColorUV::Uv0, NLMISC::CQuadColorUV::Uv1, NLMISC::CQuadColorUV::Uv2, NLMISC::CQuadColorUV::Uv3, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

void NL3D::CDriverUser::drawQuad const NLMISC::CQuadUV   tri,
UMaterial   mat
[virtual]
 

Draw the Quad, taking color from material. With UV for texture.

Implements NL3D::UDriver.

Definition at line 628 of file driver_user.cpp.

References _Driver, _PBQuad, _VBUv, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CQuadUV::Uv0, NLMISC::CQuadUV::Uv1, NLMISC::CQuadUV::Uv2, NLMISC::CQuadUV::Uv3, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

void NL3D::CDriverUser::drawQuad const NLMISC::CQuadColor   tri,
UMaterial   mat
[virtual]
 

Draw the Quad, taking color from primitive.

Implements NL3D::UDriver.

Definition at line 607 of file driver_user.cpp.

References _Driver, _PBQuad, _VBColor, NLMISC::CQuadColor::Color0, NLMISC::CQuadColor::Color1, NLMISC::CQuadColor::Color2, NLMISC::CQuadColor::Color3, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

void NL3D::CDriverUser::drawQuad const NLMISC::CQuad   tri,
UMaterial   mat
[virtual]
 

Draw the Quad, taking color from material.

Implements NL3D::UDriver.

Definition at line 590 of file driver_user.cpp.

References _Driver, _PBQuad, _VBFlat, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

Referenced by drawBitmap, and drawQuad.

void NL3D::CDriverUser::drawQuads const NLMISC::CQuadColorUV   quads,
uint32    nbQuads,
UMaterial   mat
[virtual]
 

Implements NL3D::UDriver.

Definition at line 683 of file driver_user.cpp.

References _Driver, _VBQuadsColUv, NLMISC::CQuadColorUV::Color0, NLMISC::CQuadColorUV::Color1, NLMISC::CQuadColorUV::Color2, NLMISC::CQuadColorUV::Color3, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CQuadColorUV::Uv0, NLMISC::CQuadColorUV::Uv1, NLMISC::CQuadColorUV::Uv2, NLMISC::CQuadColorUV::Uv3, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

void NL3D::CDriverUser::drawQuads const std::vector< NLMISC::CQuadColorUV > &    tri,
UMaterial   mat
[virtual]
 

Implements NL3D::UDriver.

Definition at line 674 of file driver_user.cpp.

References NL3D_MEM_DRIVER, and q.

void NL3D::CDriverUser::drawTriangle float    x0,
float    y0,
float    x1,
float    y1,
float    x2,
float    y2,
CRGBA    col
[virtual]
 

Draw a Triangle in 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 763 of file driver_user.cpp.

References _MatFlat, drawTriangle, NL3D_HAUTO_DRAW_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::drawTriangle const NLMISC::CTriangleColorUV   tri,
UMaterial   mat
[virtual]
 

Draw the Triangle, taking color from primitive. With UV for texture.

Implements NL3D::UDriver.

Definition at line 565 of file driver_user.cpp.

References _Driver, _PBTri, _VBColorUv, NLMISC::CTriangleColorUV::Color0, NLMISC::CTriangleColorUV::Color1, NLMISC::CTriangleColorUV::Color2, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CTriangleColorUV::Uv0, NLMISC::CTriangleColorUV::Uv1, NLMISC::CTriangleColorUV::Uv2, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

void NL3D::CDriverUser::drawTriangle const NLMISC::CTriangleUV   tri,
UMaterial   mat
[virtual]
 

Draw the Triangle, taking color from material. With UV for texture.

Implements NL3D::UDriver.

Definition at line 546 of file driver_user.cpp.

References _Driver, _PBTri, _VBUv, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CTriangleUV::Uv0, NLMISC::CTriangleUV::Uv1, NLMISC::CTriangleUV::Uv2, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

void NL3D::CDriverUser::drawTriangle const NLMISC::CTriangleColor   tri,
UMaterial   mat
[virtual]
 

Draw the Triangle, taking color from primitive.

Implements NL3D::UDriver.

Definition at line 527 of file driver_user.cpp.

References _Driver, _PBTri, _VBColor, NLMISC::CTriangleColor::Color0, NLMISC::CTriangleColor::Color1, NLMISC::CTriangleColor::Color2, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

void NL3D::CDriverUser::drawTriangle const NLMISC::CTriangle   tri,
UMaterial   mat
[virtual]
 

Draw the Triangle, taking color from material.

Implements NL3D::UDriver.

Definition at line 511 of file driver_user.cpp.

References _Driver, _PBTri, _VBFlat, convMat, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

Referenced by drawTriangle.

void NL3D::CDriverUser::drawWiredQuad float    xcenter,
float    ycenter,
float    radius,
CRGBA    col
[virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 817 of file driver_user.cpp.

References drawWiredQuad, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::drawWiredQuad float    x0,
float    y0,
float    x1,
float    y1,
CRGBA    col
[virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Implements NL3D::UDriver.

Definition at line 803 of file driver_user.cpp.

References drawLine, and NL3D_MEM_DRIVER.

Referenced by drawWiredQuad.

void NL3D::CDriverUser::enableFog bool    enable [virtual]
 

Implements NL3D::UDriver.

Definition at line 900 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::enableLight uint8    num,
bool    enable = true
[virtual]
 

Implements NL3D::UDriver.

Definition at line 927 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and num.

NLMISC::IKeyboardDevice * NL3D::CDriverUser::enableLowLevelKeyboard bool    enable [virtual]
 

Enable / disable a low level keyboard.

This returns a interface to some parameters when it is supported, or NULL otherwise. The interface pointer is valid as long as the low level keyboard is enabled. A call to disable the keyboard returns NULL, and restore the default keyboard behaviour.

Implements NL3D::UDriver.

Definition at line 1134 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

NLMISC::IMouseDevice * NL3D::CDriverUser::enableLowLevelMouse bool    enable [virtual]
 

Enable / disable low level mouse.

This allow to take advantage of some options (speed of the mouse, automatic wrapping) It returns a interface to these parameters when it is supported, or NULL otherwise The interface pointer is valid as long as the low level mouse is enabled. A call to disable the mouse returns NULL, and restore the default mouse behaviour NB : - In this mode the mouse cursor isn't drawn.

  • Calls to showCursor have no effects
  • Calls to setCapture have no effects

Implements NL3D::UDriver.

Definition at line 1127 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::enableUsedTextureMemorySum bool    enable [virtual]
 

Enable the sum of texture memory used since last swapBuffers() call.

To retrieve the memory used call getUsedTextureMemory().

Implements NL3D::UDriver.

Definition at line 214 of file driver_user2.cpp.

References _Driver, and NL3D_MEM_DRIVER.

UDriver::TModeList NL3D::CDriverUser::enumModes   [virtual]
 

Enum All Fullscreen modes.

Implements NL3D::UDriver.

Definition at line 173 of file driver_user.cpp.

References _Driver, NL3D::ModeList, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::UDriver::TModeList.

bool NL3D::CDriverUser::fillBuffer CBitmap &    bitmap [virtual]
 

fill the RGBA back buffer.

Parameters:
bitmap  will be written in the buffer. no-op if bad size.
Returns:
true if success

Implements NL3D::UDriver.

Definition at line 1112 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

bool NL3D::CDriverUser::fogEnabled   [virtual]
 

Implements NL3D::UDriver.

Definition at line 892 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::forceDXTCCompression bool    dxtcComp [virtual]
 

if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed.

Default is false. NB: this is done only on TextureFile, with format Automatic

Implements NL3D::UDriver.

Definition at line 1001 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::forceTextureResize uint    divisor [virtual]
 

if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..) to be divided by Divisor (2, 4, 8...) Default is 1.

NB: this is done only on TextureFile

Implements NL3D::UDriver.

Definition at line 1008 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::getBuffer CBitmap &    bitmap [virtual]
 

get the RGBA back buffer.

Parameters:
bitmap  the buffer will be written in this bitmap

Implements NL3D::UDriver.

Definition at line 1084 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::getBufferPart CBitmap &    bitmap,
NLMISC::CRect   rect
[virtual]
 

get a part of the RGBA back buffer NB: 0,0 is the bottom left corner of the screen.

Parameters:
bitmap  the buffer will be written in this bitmap
rect  the in/out (wanted/clipped) part of Color buffer to retrieve.

Implements NL3D::UDriver.

Definition at line 1098 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

IDriver* NL3D::CDriverUser::getDriver   [inline]
 

Definition at line 438 of file driver_user.h.

References _Driver, and NL3D_MEM_DRIVER.

Referenced by updateAsyncTexture.

const char * NL3D::CDriverUser::getDriverInformation   [virtual]
 

Get driver informations.

get the nel name of the driver (ex: "Opengl 1.2 NeL Driver")

Implements NL3D::UDriver.

Definition at line 1038 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

std::string NL3D::CDriverUser::getFontManagerCacheInformation   const [virtual]
 

get cahce information.

Implements NL3D::UDriver.

Definition at line 113 of file driver_user2.cpp.

References _FontManager, and NL3D_MEM_DRIVER.

CFrustum NL3D::CDriverUser::getFrustum   [virtual]
 

Implements NL3D::UDriver.

Definition at line 355 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CDriverUser::CMatrixContext::Frustum, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

uint32 NL3D::CDriverUser::getImplementationVersion   const [virtual]
 

Driver information/Queries.

Implements NL3D::UDriver.

Definition at line 1031 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

uint NL3D::CDriverUser::getLastAsyncTextureSizeGot   const [virtual]
 

get what the system really allows.

Implements NL3D::UDriver.

Definition at line 1206 of file driver_user.cpp.

References _AsyncTextureManager.

NLMISC::IInputDeviceManager * NL3D::CDriverUser::getLowLevelInputDeviceManager   [virtual]
 

Check wether there is a low level device manager available, and get its interface.

Return NULL if not available. From this interface you can deal with mouse and keyboard as above, but you can also manage game devices (joysticks, joypads ...)

Implements NL3D::UDriver.

Definition at line 1141 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

CMatrix NL3D::CDriverUser::getModelMatrix   [virtual]
 

Implements NL3D::UDriver.

Definition at line 389 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

sint NL3D::CDriverUser::getNbTextureStages   [virtual]
 

Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay().

Implements NL3D::UDriver.

Definition at line 1052 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

UDriver::TPolygonMode NL3D::CDriverUser::getPolygonMode   [virtual]
 

Get the global polygon mode.

Parameters:
polygon  mode choose in this driver.
See also:
setPolygonMode(), TPolygonMode

Implements NL3D::UDriver.

Definition at line 983 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and nlstop.

CScissor NL3D::CDriverUser::getScissor   [virtual]
 

Implements NL3D::UDriver.

Definition at line 321 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::CDriverUser::CMatrixContext::Scissor.

virtual UShapeBank* NL3D::CDriverUser::getShapeBank   [inline, virtual]
 

Get the global shape bank.

The shape bank handles all the shape caches.

See also:
UShapeBank

Implements NL3D::UDriver.

Definition at line 396 of file driver_user.h.

References _ShapeBank, and NL3D_MEM_DRIVER.

uint NL3D::CDriverUser::getTotalAsyncTextureSizeAsked   const [virtual]
 

get the async texture Size asked (ie maybe bigger than MaxTotalTextureSize).

Implements NL3D::UDriver.

Definition at line 1201 of file driver_user.cpp.

References _AsyncTextureManager.

uint32 NL3D::CDriverUser::getUsedTextureMemory   const [virtual]
 

Return the amount of texture video memory used since last swapBuffers() call.

Before use this method, you should enable the sum with enableUsedTextureMemorySum().

Implements NL3D::UDriver.

Definition at line 222 of file driver_user2.cpp.

References _Driver, and NL3D_MEM_DRIVER.

const char * NL3D::CDriverUser::getVideocardInformation   [virtual]
 

Get videocard informations.

get the official name of the driver

Implements NL3D::UDriver.

Definition at line 1045 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

CMatrix NL3D::CDriverUser::getViewMatrix   [virtual]
 

Implements NL3D::UDriver.

Definition at line 372 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::CDriverUser::CMatrixContext::ViewMatrix.

CViewport NL3D::CDriverUser::getViewport   [virtual]
 

Implements NL3D::UDriver.

Definition at line 338 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::CDriverUser::CMatrixContext::Viewport.

uint NL3D::CDriverUser::getWindowHeight   [virtual]
 

Get the height of the window.

Implements NL3D::UDriver.

Definition at line 1075 of file driver_user.cpp.

References _Driver, height, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and width.

void NL3D::CDriverUser::getWindowSize uint32   width,
uint32   height
[virtual]
 

Get the width and the height of the window.

Implements NL3D::UDriver.

Definition at line 1059 of file driver_user.cpp.

References _Driver, height, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and width.

uint NL3D::CDriverUser::getWindowWidth   [virtual]
 

Get the width of the window.

Implements NL3D::UDriver.

Definition at line 1066 of file driver_user.cpp.

References _Driver, height, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and width.

void NL3D::CDriverUser::getZBuffer std::vector< float > &    zbuffer [virtual]
 

get the ZBuffer (back buffer).

Parameters:
zbuffer  the returned array of Z. size of getWindowSize() .

Implements NL3D::UDriver.

Definition at line 1091 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::getZBufferPart std::vector< float > &    zbuffer,
NLMISC::CRect   rect
[virtual]
 

get a part of the ZBuffer (back buffer).

NB: 0,0 is the bottom left corner of the screen.

Parameters:
zbuffer  the returned array of Z. size of rec.Width*rec.Height.
rect  the in/out (wanted/clipped) part of ZBuffer to retrieve.

Implements NL3D::UDriver.

Definition at line 1105 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

bool NL3D::CDriverUser::isActive   [virtual]
 

Return true if driver is still active. Return false else. If he user close the window, must return false.

Implements NL3D::UDriver.

Definition at line 282 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::loadHLSBank const std::string &    fileName [virtual]
 

Load a .hlsBank, add it to the HLSManager of the AsyncTextureManager.

Use CPath::lookup. throw EPathNotFound if error

Implements NL3D::UDriver.

Definition at line 1218 of file driver_user.cpp.

References _AsyncTextureManager.

uint32 NL3D::CDriverUser::profileAllocatedTextureMemory   [virtual]
 

Return the amount of Texture memory requested.

taking mipmap, compression, texture format, etc... into account. NB: because of GeForce*, RGB888 is considered to be 32 bits. So it may be false for others cards :).

Implements NL3D::UDriver.

Definition at line 188 of file driver_user2.cpp.

References _Driver, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::profileRenderedPrimitives CPrimitiveProfile   pIn,
CPrimitiveProfile   pOut
[virtual]
 

Get the number of primitives rendered from the last swapBuffers() call.

Parameters:
pIn  the number of requested rendered primitive.
pOut  the number of effective rendered primitive. pOut==pIn if no multi-pass material is used (Lightmap, Specular ...).

Implements NL3D::UDriver.

Definition at line 179 of file driver_user2.cpp.

References _Driver, and NL3D_MEM_DRIVER.

uint32 NL3D::CDriverUser::profileSetupedMaterials   const [virtual]
 

Get the number of material setuped from the last swapBuffers() call.

Implements NL3D::UDriver.

Definition at line 197 of file driver_user2.cpp.

References _Driver, and NL3D_MEM_DRIVER.

uint32 NL3D::CDriverUser::profileSetupedModelMatrix   const [virtual]
 

Get the number of matrix setuped from the last swapBuffers() call.

Implements NL3D::UDriver.

Definition at line 206 of file driver_user2.cpp.

References _Driver, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::release   [virtual]
 

Release the window.

Implements NL3D::UDriver.

Definition at line 244 of file driver_user.cpp.

References _Driver, _Materials, _MatFlat, _MatText, _Scenes, _TextContexts, _Textures, _WindowInit, NL3D::UDriver::AsyncListener, NL3D::UDriver::EventServer, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NLMISC::CEventServer::removeEmitter, and NLMISC::CEventListenerAsync::removeFromServer.

Referenced by ~CDriverUser.

void NL3D::CDriverUser::restoreMatrixContext   [inline]
 

Definition at line 443 of file driver_user.h.

References NL3D_MEM_DRIVER, and setupMatrixContext.

void NL3D::CDriverUser::setAmbientColor CRGBA    color [virtual]
 

Implements NL3D::UDriver.

Definition at line 935 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::setCapture bool    b [virtual]
 

If true, capture the mouse to force it to stay under the window.

Implements NL3D::UDriver.

Definition at line 1162 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::setDisplay const CMode &    mode [virtual]
 

create the window.

Implements NL3D::UDriver.

Definition at line 214 of file driver_user.cpp.

References _CurrentMatrixContext, _Driver, _MatFlat, _MatText, _WindowInit, activate, NLMISC::CEventServer::addEmitter, NLMISC::CEventListenerAsync::addToServer, NL3D::UDriver::AsyncListener, NL3D::UDriver::EventServer, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, nlverify, NLMISC::CEventListenerAsync::reset, NL3D::CDriverUser::CMatrixContext::Scissor, NL3D::UDriver::setMatrixMode2D11, and NL3D::CDriverUser::CMatrixContext::Viewport.

void NL3D::CDriverUser::setFontManagerMaxMemory uint    maxMem [virtual]
 

Set the maxMemory used for the FontManager.

Implements NL3D::UDriver.

Definition at line 106 of file driver_user2.cpp.

References _FontManager, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::setFrustum const CFrustum   frust [virtual]
 

Set the active Frustum for rendering.

Implements NL3D::UDriver.

Definition at line 346 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CDriverUser::CMatrixContext::Frustum, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and setupMatrixContext.

Referenced by setMatrixMode3D.

void NL3D::CDriverUser::setLight uint8    num,
const ULight   light
[virtual]
 

Implements NL3D::UDriver.

Definition at line 918 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and num.

void NL3D::CDriverUser::setMatrixMode2D const CFrustum   frust [virtual]
 

Tool function: Setup frustum/viewmatrix/modelmatrix for 2D.

ModelMatrix is setup to identity. ViewMatrix is setup so that (x,y) of vectors maps to x,y screen!!!

Implements NL3D::UDriver.

Definition at line 400 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CDriverUser::CMatrixContext::Frustum, NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, setupMatrixContext, and NL3D::CDriverUser::CMatrixContext::ViewMatrix.

void NL3D::CDriverUser::setMatrixMode3D UCamera   camera [virtual]
 

Tool function: Setup frustum/viewmatrix/modelmatrix for 3D, using parameters of a UCamera.

ModelMatrix setuped to identity. ViewMatrix setuped to the inverse of camera 's LocalMatrix. Frustum setuped to UCamera frustum.

Implements NL3D::UDriver.

Definition at line 418 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, setFrustum, setModelMatrix, and setViewMatrix.

void NL3D::CDriverUser::setModelMatrix const CMatrix &    mat [virtual]
 

Set the active ModelMatrix for rendering.

NB: UScene ignore this function (use camera parameters instead).

Implements NL3D::UDriver.

Definition at line 380 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and setupMatrixContext.

Referenced by setMatrixMode3D.

bool NL3D::CDriverUser::setMonitorColorProperties const CMonitorColorProperties   properties [virtual]
 

Setup monitor color properties.

Return false if setup failed.

Implements NL3D::UDriver.

Definition at line 1015 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::setMousePos float    x,
float    y
[virtual]
 

x and y must be between 0.0 and 1.0.

Implements NL3D::UDriver.

Definition at line 1155 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, x, and y.

void NL3D::CDriverUser::setPolygonMode TPolygonMode    mode [virtual]
 

Set the global polygon mode.

Can be filled, line or point. The implementation driver must call IDriver::setPolygonMode and active this mode.

Parameters:
polygon  mode choose in this driver.
See also:
getPolygonMode(), TPolygonMode

Implements NL3D::UDriver.

Definition at line 945 of file driver_user.cpp.

References _Driver, NL3D::UDriver::Filled, NL3D::UDriver::Line, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, nlstop, and NL3D::UDriver::Point.

void NL3D::CDriverUser::setScissor const CScissor   [virtual]
 

Set the active scissor for rendering.

Default to fullscreen.

Implements NL3D::UDriver.

Definition at line 312 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NL3D::CDriverUser::CMatrixContext::Scissor, and setupMatrixContext.

void NL3D::CDriverUser::setupAsyncTextureLod uint    baseLevel,
uint    maxLevel
[virtual]
 

setup the mipMap levels.

\baseLevel When the texture is first added, it is loaded skipping the baseLevel first mipmap \maxLevel During time, furhter mipmap are loaded, according to instance position etc... maxLevel tells where to stop. If 0, the texture will finally be entirely uploaded. Default is 3,1.

Implements NL3D::UDriver.

Definition at line 1179 of file driver_user.cpp.

References _AsyncTextureManager.

void NL3D::CDriverUser::setupAsyncTextureMaxUploadPerFrame uint    maxup [virtual]
 

Setup max texture upload in driver per updateAsyncTexture() call.

Implements NL3D::UDriver.

Definition at line 1184 of file driver_user.cpp.

References _AsyncTextureManager.

void NL3D::CDriverUser::setupFog float    start,
float    end,
CRGBA    color
[virtual]
 

setup fog parameters. fog must enabled to see result. start and end are in [0,1] range.

Implements NL3D::UDriver.

Definition at line 908 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::setupMatrixContext   [protected]
 

Definition at line 300 of file driver_user.cpp.

References _CurrentMatrixContext, _Driver, NL3D::CDriverUser::CMatrixContext::Frustum, NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D_MEM_DRIVER, NL3D::CDriverUser::CMatrixContext::Scissor, NL3D::CDriverUser::CMatrixContext::ViewMatrix, and NL3D::CDriverUser::CMatrixContext::Viewport.

Referenced by restoreMatrixContext, setFrustum, setMatrixMode2D, setModelMatrix, setScissor, setViewMatrix, and setViewport.

void NL3D::CDriverUser::setupMaxHLSColoringPerFrame uint    maxCol [virtual]
 

Setup max texture HLS Coloring per update() call (in bytes). Default to 20K.

Implements NL3D::UDriver.

Definition at line 1212 of file driver_user.cpp.

References _AsyncTextureManager.

void NL3D::CDriverUser::setupMaxTotalAsyncTextureSize uint    maxText [virtual]
 

Setup max total texture size allowed. Default is 10Mo.

Implements NL3D::UDriver.

Definition at line 1196 of file driver_user.cpp.

References _AsyncTextureManager.

void NL3D::CDriverUser::setViewMatrix const CMatrix &    mat [virtual]
 

Set the active ViewMatrix for rendering.

NB: this is the view matrix, which is the inverse of camera matrix.

Implements NL3D::UDriver.

Definition at line 363 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, setupMatrixContext, and NL3D::CDriverUser::CMatrixContext::ViewMatrix.

Referenced by setMatrixMode3D.

void NL3D::CDriverUser::setViewport const CViewport   [virtual]
 

Set the active viewport for rendering.

Default to fullscreen.

Implements NL3D::UDriver.

Definition at line 329 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, setupMatrixContext, and NL3D::CDriverUser::CMatrixContext::Viewport.

void NL3D::CDriverUser::showCursor bool    b [virtual]
 

show cursor if b is true, or hide it if b is false.

Implements NL3D::UDriver.

Definition at line 1148 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

void NL3D::CDriverUser::swapBuffers   [virtual]
 

This swap the back and front buffer (ALL the buffer :) ).

Implements NL3D::UDriver.

Definition at line 882 of file driver_user.cpp.

References _Driver, NL3D_HAUTO_SWAP_DRIVER, and NL3D_MEM_DRIVER.

UDriver::TMessageBoxId NL3D::CDriverUser::systemMessageBox const char *    message,
const char *    title,
TMessageBoxType    type = okType,
TMessageBoxIcon    icon = noIcon
[virtual]
 

Output a system message box and print a message with an icon.

This method can be call even if the driver is not initialized. This method is used to return internal driver problem when string can't be displayed in the driver window. If the driver can't open a messageBox, it should not override this method and let the IDriver class manage it with the ASCII console.

Parameters:
message  This is the message to display in the message box.
title  This is the title of the message box.
type  This is the type of the message box, ie number of button and label of buttons.
icon  This is the icon of the message box should use like warning, error etc...

Implements NL3D::UDriver.

Definition at line 833 of file driver_user.cpp.

References _Driver, NL3D_MEM_DRIVER, and type.

void NL3D::CDriverUser::updateAsyncTexture   [virtual]
 

update the manager.

New loaded texture are uploaded. Instances are updated to know if all their pending textures have been uploaded.

Implements NL3D::UDriver.

Definition at line 1189 of file driver_user.cpp.

References _AsyncTextureManager, and getDriver.


Member Data Documentation

CAsyncTextureManager NL3D::CDriverUser::_AsyncTextureManager [protected]
 

Definition at line 95 of file driver_user.h.

Referenced by createScene, getLastAsyncTextureSizeGot, getTotalAsyncTextureSizeAsked, loadHLSBank, setupAsyncTextureLod, setupAsyncTextureMaxUploadPerFrame, setupMaxHLSColoringPerFrame, setupMaxTotalAsyncTextureSize, and updateAsyncTexture.

CMatrixContext NL3D::CDriverUser::_CurrentMatrixContext [protected]
 

Definition at line 80 of file driver_user.h.

Referenced by getFrustum, getModelMatrix, getScissor, getViewMatrix, getViewport, setDisplay, setFrustum, setMatrixMode2D, setModelMatrix, setScissor, setupMatrixContext, setViewMatrix, and setViewport.

IDriver* NL3D::CDriverUser::_Driver [protected]
 

Definition at line 78 of file driver_user.h.

Referenced by activate, CDriverUser, clearBuffers, clearRGBABuffer, clearZBuffer, disableHardwareTextureShader, disableHardwareVertexArrayAGP, disableHardwareVertexProgram, drawLine, drawQuad, drawQuads, drawTriangle, enableFog, enableLight, enableLowLevelKeyboard, enableLowLevelMouse, enableUsedTextureMemorySum, enumModes, fillBuffer, fogEnabled, forceDXTCCompression, forceTextureResize, getBuffer, getBufferPart, getDriver, getDriverInformation, getImplementationVersion, getLowLevelInputDeviceManager, getNbTextureStages, getPolygonMode, getUsedTextureMemory, getVideocardInformation, getWindowHeight, getWindowSize, getWindowWidth, getZBuffer, getZBufferPart, isActive, profileAllocatedTextureMemory, profileRenderedPrimitives, profileSetupedMaterials, profileSetupedModelMatrix, release, setAmbientColor, setCapture, setDisplay, setLight, setMonitorColorProperties, setMousePos, setPolygonMode, setupFog, setupMatrixContext, showCursor, swapBuffers, systemMessageBox, and ~CDriverUser.

CFontManager NL3D::CDriverUser::_FontManager [protected]
 

Definition at line 81 of file driver_user.h.

Referenced by createTextContext, getFontManagerCacheInformation, and setFontManagerMaxMemory.

CLodCharacterManager NL3D::CDriverUser::_LodCharacterManager [protected]
 

Definition at line 97 of file driver_user.h.

Referenced by createScene.

TMaterialSet NL3D::CDriverUser::_Materials [protected]
 

Definition at line 88 of file driver_user.h.

Referenced by createMaterial, deleteMaterial, and release.

CMaterialUser NL3D::CDriverUser::_MatFlat [protected]
 

Definition at line 108 of file driver_user.h.

Referenced by drawLine, drawQuad, drawTriangle, release, and setDisplay.

CMaterialUser NL3D::CDriverUser::_MatText [protected]
 

Definition at line 109 of file driver_user.h.

Referenced by drawBitmap, release, and setDisplay.

CMeshSkinManager NL3D::CDriverUser::_MeshSkinManager [protected]
 

Definition at line 93 of file driver_user.h.

Referenced by createScene.

CPrimitiveBlock NL3D::CDriverUser::_PBLine [protected]
 

Definition at line 104 of file driver_user.h.

Referenced by CDriverUser, and drawLine.

CPrimitiveBlock NL3D::CDriverUser::_PBQuad [protected]
 

Definition at line 104 of file driver_user.h.

Referenced by CDriverUser, and drawQuad.

CPrimitiveBlock NL3D::CDriverUser::_PBTri [protected]
 

Definition at line 104 of file driver_user.h.

Referenced by CDriverUser, and drawTriangle.

TSceneSet NL3D::CDriverUser::_Scenes [protected]
 

Definition at line 90 of file driver_user.h.

Referenced by createScene, deleteScene, and release.

CShapeBankUser NL3D::CDriverUser::_ShapeBank [protected]
 

Definition at line 91 of file driver_user.h.

Referenced by createScene, and getShapeBank.

bool NL3D::CDriverUser::_StaticInit = false [static, protected]
 

Definition at line 110 of file driver_user.cpp.

Referenced by CDriverUser.

TTextContextSet NL3D::CDriverUser::_TextContexts [protected]
 

Definition at line 89 of file driver_user.h.

Referenced by createTextContext, deleteTextContext, and release.

TTextureSet NL3D::CDriverUser::_Textures [protected]
 

Definition at line 87 of file driver_user.h.

Referenced by createTextureFile, deleteTextureFile, and release.

CVertexBuffer NL3D::CDriverUser::_VBColor [protected]
 

Definition at line 101 of file driver_user.h.

Referenced by CDriverUser, drawLine, drawQuad, and drawTriangle.

CVertexBuffer NL3D::CDriverUser::_VBColorUv [protected]
 

Definition at line 103 of file driver_user.h.

Referenced by CDriverUser, drawLine, drawQuad, and drawTriangle.

CVertexBuffer NL3D::CDriverUser::_VBFlat [protected]
 

Definition at line 100 of file driver_user.h.

Referenced by CDriverUser, drawLine, drawQuad, and drawTriangle.

CVertexBuffer NL3D::CDriverUser::_VBQuadsColUv [protected]
 

Definition at line 106 of file driver_user.h.

Referenced by CDriverUser, and drawQuads.

CVertexBuffer NL3D::CDriverUser::_VBUv [protected]
 

Definition at line 102 of file driver_user.h.

Referenced by CDriverUser, drawLine, drawQuad, and drawTriangle.

bool NL3D::CDriverUser::_WindowInit [protected]
 

Definition at line 79 of file driver_user.h.

Referenced by CDriverUser, release, and setDisplay.


The documentation for this class was generated from the following files: