NL3D::CDriverUser Class Reference

#include <driver_user.h>

Inheritance diagram for NL3D::CDriverUser:

NL3D::UDriver

Detailed Description

UDriver implementation.
Author:
Lionel Berenguier

Nevrax France

Date:
2001

Definition at line 63 of file driver_user.h.

Public Types

enum  TMessageBoxIcon {
  noIcon = 0, handIcon, questionIcon, exclamationIcon,
  asteriskIcon, warningIcon, errorIcon, informationIcon,
  stopIcon, iconCount
}
enum  TMessageBoxId {
  okId = 0, yesId, noId, abortId,
  retryId, cancelId, ignoreId, idCount
}
 Message Box enums. More...

enum  TMessageBoxType {
  okType = 0, okCancelType, yesNoType, abortRetryIgnoreType,
  yesNoCancelType, retryCancelType, typeCount
}
typedef std::vector< CMode > TModeList
enum  TPolygonMode { Filled = 0, Line, Point }
 Polygon Mode. More...


Public Member Functions

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

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

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

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

virtual TModeList enumModes ()
 Enum All Fullscreen modes.

virtual void * getDisplay ()
 Return an OS dependent window handle. Under Win32, it is a HWND.

virtual bool getModes (std::vector< CMode > &modes)
 Before rendering via a driver in a thread, must activate() (per thread).

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

virtual void release ()
 Release the window.

virtual bool setDisplay (const CMode &mode, bool show)
 create the window.

virtual bool setMode (const CMode &mode)
 Before rendering via a driver in a thread, must activate() (per thread).

Object
 CDriverUser (uint windowIcon=0)
virtual ~CDriverUser ()
Buffers.
virtual void clearBuffers (CRGBA col=CRGBA(255, 255, 255, 255))
 This clear the buffers (ALL the buffer :) ).

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

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

virtual uint getSwapVBLInterval ()
 This clear the buffers (ALL the buffer :) ).

virtual void setSwapVBLInterval (uint interval)
 This clear the buffers (ALL the buffer :) ).

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

Misc.
virtual U3dMouseListenercreate3dMouseListener ()
virtual void delete3dMouseListener (U3dMouseListener *listener)
virtual void forceDXTCCompression (bool dxtcComp)
virtual void forceTextureResize (uint divisor)
virtual TPolygonMode getPolygonMode ()
virtual bool setMonitorColorProperties (const CMonitorColorProperties &properties)
virtual void setPolygonMode (TPolygonMode mode)
virtual TMessageBoxId systemMessageBox (const char *message, const char *title, TMessageBoxType type=okType, TMessageBoxIcon icon=noIcon)
Components gestion for Interface 2D/3D.
virtual UMaterialcreateMaterial ()
 Create a new Material, to be filled by user.

virtual UTextContextcreateTextContext (const std::string fontFileName, const std::string fontExFileName="")
 create a new TextContext, for a given font.

virtual UTextureFilecreateTextureFile (const std::string &file)
virtual UTextureRawcreateTextureRaw ()
 Create a new Raw texture, to be filled by user.

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

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

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

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

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

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

Scene gestion.
virtual UScenecreateScene (bool bSmallScene)
 Create a new scene.

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

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...

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...

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

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

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...

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

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

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

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

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

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

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

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

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

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

virtual void drawQuads (const NLMISC::CQuadColorUV2 *quads, uint32 nbQuads, UMaterial &mat)
 Draw the Line, taking color from primitive. With UV for texture.

virtual void drawQuads (const NLMISC::CQuadColorUV *quads, uint32 nbQuads, UMaterial &mat)
 Draw the Line, taking color from primitive. With UV for texture.

virtual void drawQuads (const std::vector< NLMISC::CQuadColorUV2 > &quad, UMaterial &mat)
 Draw the Line, taking color from primitive. With UV for texture.

virtual void drawQuads (const std::vector< NLMISC::CQuadColorUV > &quad, UMaterial &mat)
 Draw the Line, taking color from primitive. With UV for texture.

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

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

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

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

Fog support.
virtual void enableFog (bool enable)
virtual bool fogEnabled ()
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.

Light support.
virtual void enableLight (uint8 num, bool enable=true)
virtual void setAmbientColor (CRGBA color)
virtual void setLight (uint8 num, const ULight &light)
Mouse / Keyboards / Game devices
virtual NLMISC::IKeyboardDeviceenableLowLevelKeyboard (bool enable)
virtual NLMISC::IMouseDeviceenableLowLevelMouse (bool enable, bool exclusive)
virtual uint getDoubleClickDelay (bool hardwareMouse)
virtual NLMISC::IInputDeviceManagergetLowLevelInputDeviceManager ()
virtual void setCapture (bool b)
 If true, capture the mouse to force it to stay under the window.

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

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

Profiling.
virtual void enableUsedTextureMemorySum (bool enable)
virtual void endProfileVBHardLock (std::vector< std::string > &result)
virtual uint32 getUsedTextureMemory () const
virtual uint32 profileAllocatedTextureMemory ()
virtual void profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut)
virtual uint32 profileSetupedMaterials () const
virtual uint32 profileSetupedModelMatrix () const
virtual void profileVBHardAllocation (std::vector< std::string > &result)
virtual void startProfileVBHardLock ()
Driver information/Queries
virtual bool fillBuffer (CBitmap &bitmap)
virtual uint32 getAvailableVertexAGPMemory ()
virtual uint32 getAvailableVertexVRAMMemory ()
virtual void getBuffer (CBitmap &bitmap)
virtual void getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)
virtual const char * getDriverInformation ()
virtual uint32 getImplementationVersion () const
 Driver information/Queries.

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

virtual const char * getVideocardInformation ()
virtual uint getWindowHeight ()
 Get the height of the window.

virtual void getWindowPos (uint32 &x, uint32 &y)
 Get the x and y coord of the windows always (0,0) in fullscreen.

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

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

virtual void getZBuffer (std::vector< float > &zbuffer)
virtual void getZBufferPart (std::vector< float > &zbuffer, NLMISC::CRect &rect)
Accessor for CSeneUser.
IDrivergetDriver ()
void restoreMatrixContext ()
void restoreMatrixContextMatrixOnly ()
Matrix context for Interface 2D/3D.
virtual CFrustum getFrustum ()
virtual CMatrix getModelMatrix ()
virtual CScissor getScissor ()
virtual CMatrix getViewMatrix ()
virtual CViewport getViewport ()
virtual void setFrustum (const CFrustum &frust)
virtual void setMatrixMode2D (const CFrustum &frust)
virtual void setMatrixMode3D (UCamera &camera)
virtual void setModelMatrix (const CMatrix &mat)
virtual void setScissor (const CScissor &)
virtual void setViewMatrix (const CMatrix &mat)
virtual void setViewport (const CViewport &)
Async Texture loading mgt
virtual uint getLastAsyncTextureSizeGot () const
 get what the system really allows

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

virtual void loadHLSBank (const std::string &fileName)
virtual void setupAsyncTextureLod (uint baseLevel, uint maxLevel)
virtual void setupAsyncTextureMaxUploadPerFrame (uint maxup)
 Setup max texture upload in driver per updateAsyncTexture() call.

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

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

virtual void updateAsyncTexture ()
Shape Bank
virtual UShapeBankgetShapeBank ()
Matrix context for Interface 2D/3D.
void setMatrixMode2D11 ()
 Tool function: same as setMatrixMode2D(), using a CFrustum(0,1,0,1,-1,1,false).

void setMatrixMode2D43 ()
 Tool function: same as setMatrixMode2D(), using a CFrustum(0,4/3,0,1,-1,1,false).


Static Public Member Functions

UDrivercreateDriver (uint windowIcon=0)
void purgeMemory ()

Data Fields

NLMISC::CEventListenerAsync AsyncListener
 The AsyncListener of this driver. Init after setDisplay()!!

NLMISC::CEventServer EventServer
 The EventServer of this driver. Init after setDisplay()!!


Protected Types

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

Protected Member Functions

CMaterialconvMat (UMaterial &mat)
void setupMatrixContext ()

Protected Attributes

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

Static Protected Attributes

bool _StaticInit = false


Member Typedef Documentation

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

Definition at line 84 of file driver_user.h.

typedef std::vector<CMode> NL3D::UDriver::TModeList [inherited]
 

Definition at line 126 of file u_driver.h.

Referenced by enumModes().

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.


Member Enumeration Documentation

enum NL3D::UDriver::TMessageBoxIcon [inherited]
 

Enumeration values:
noIcon 
handIcon 
questionIcon 
exclamationIcon 
asteriskIcon 
warningIcon 
errorIcon 
informationIcon 
stopIcon 
iconCount 

Definition at line 132 of file u_driver.h.

enum NL3D::UDriver::TMessageBoxId [inherited]
 

Message Box enums.

Enumeration values:
okId 
yesId 
noId 
abortId 
retryId 
cancelId 
ignoreId 
idCount 

Definition at line 130 of file u_driver.h.

enum NL3D::UDriver::TMessageBoxType [inherited]
 

Enumeration values:
okType 
okCancelType 
yesNoType 
abortRetryIgnoreType 
yesNoCancelType 
retryCancelType 
typeCount 

Definition at line 131 of file u_driver.h.

enum NL3D::UDriver::TPolygonMode [inherited]
 

Polygon Mode.

Enumeration values:
Filled 
Line 
Point 

Definition at line 135 of file u_driver.h.

00135 { Filled=0, Line, Point };


Constructor & Destructor Documentation

NL3D::CDriverUser::CDriverUser uint  windowIcon = 0  ) 
 

Definition at line 127 of file driver_user.cpp.

References NL3D::CShapeBankUser::_DriverUser, _PBLine, _PBQuad, _PBTri, _ShapeBank, _StaticInit, _VBColor, _VBColorUv, _VBFlat, _VBQuadsColUv, _VBQuadsColUv2, _VBUv, _WindowInit, NL3D::IDriver::init(), NL3D_MEM_DRIVER, nlassert, NL3D::registerSerial3d(), NL3D::CPrimitiveBlock::setLine(), NL3D::CPrimitiveBlock::setNumLine(), NL3D::CPrimitiveBlock::setNumQuad(), NL3D::CPrimitiveBlock::setNumTri(), NL3D::CVertexBuffer::setNumVertices(), NL3D::CPrimitiveBlock::setQuad(), NL3D::CPrimitiveBlock::setTri(), NL3D::CVertexBuffer::setVertexFormat(), and uint.

00128 {
00129         NL3D_MEM_DRIVER
00130 
00131         // The enum of IDriver and UDriver MUST be the same!!!
00132         nlassert((uint)IDriver::idCount == (uint)UDriver::idCount);
00133         nlassert((uint)IDriver::typeCount == (uint)UDriver::typeCount);
00134         nlassert((uint)IDriver::iconCount == (uint)UDriver::iconCount);
00135 
00136 
00137         // Static Initialisation.
00138         if(!_StaticInit)
00139         {
00140                 _StaticInit= true;
00141                 // Register basic serial.
00142                 NL3D::registerSerial3d();
00143 
00144                 // Register basic csene.
00145                 CScene::registerBasics();
00146         }
00147 
00148         // Create/Init Driver.
00149         _Driver= CDRU::createGlDriver();
00150         nlassert(_Driver);
00151         _Driver->init (windowIcon);
00152 
00153         _WindowInit= false;
00154 
00155         // Init of VBuffers/PBs for 2D/3D interface.
00156         _VBFlat.setVertexFormat(CVertexBuffer::PositionFlag);
00157         _VBColor.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag);
00158         _VBUv.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
00159         _VBColorUv.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag | CVertexBuffer::TexCoord0Flag);
00160         _VBQuadsColUv.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag | CVertexBuffer::TexCoord0Flag);
00161         _VBQuadsColUv2.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag | CVertexBuffer::TexCoord0Flag | CVertexBuffer::TexCoord1Flag);
00162         // max is quad.
00163         _VBFlat.setNumVertices(4);
00164         _VBColor.setNumVertices(4);
00165         _VBUv.setNumVertices(4);
00166         _VBColorUv.setNumVertices(4); 
00167 
00168         _PBLine.setNumLine(1);
00169         _PBLine.setLine(0, 0, 1);
00170         _PBTri.setNumTri(1);
00171         _PBTri.setTri(0, 0, 1, 2);
00172         _PBQuad.setNumQuad(1);
00173         _PBQuad.setQuad(0, 0, 1, 2, 3);
00174 
00175         _ShapeBank._DriverUser = this;
00176 
00177 }

NL3D::CDriverUser::~CDriverUser  )  [virtual]
 

Definition at line 179 of file driver_user.cpp.

References NL3D_MEM_DRIVER, and release().

00180 {
00181         NL3D_MEM_DRIVER
00182         release();
00183 
00184         delete _Driver;
00185         _Driver= NULL;
00186 }


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 314 of file driver_user.cpp.

References NL3D::IDriver::activate(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

Referenced by setDisplay().

00315 {
00316         NL3D_MEM_DRIVER
00317         NL3D_HAUTO_UI_DRIVER;
00318 
00319         return _Driver->activate();
00320 }

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 1004 of file driver_user.cpp.

References NL3D::IDriver::clear2D(), NL3D::IDriver::clearZBuffer(), NL3D_HAUTO_CLEAR_DRIVER, and NL3D_MEM_DRIVER.

01005 {
01006         NL3D_MEM_DRIVER
01007         NL3D_HAUTO_CLEAR_DRIVER;
01008 
01009         _Driver->clear2D(col);
01010         _Driver->clearZBuffer();
01011 }

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 988 of file driver_user.cpp.

References NL3D::IDriver::clear2D(), NL3D_HAUTO_CLEAR_DRIVER, and NL3D_MEM_DRIVER.

00989 {
00990         NL3D_MEM_DRIVER
00991         NL3D_HAUTO_CLEAR_DRIVER;
00992 
00993         _Driver->clear2D(col);
00994 }

void NL3D::CDriverUser::clearZBuffer  )  [virtual]
 

This clear only the RGBA back buffer.

Implements NL3D::UDriver.

Definition at line 996 of file driver_user.cpp.

References NL3D::IDriver::clearZBuffer(), NL3D_HAUTO_CLEAR_DRIVER, and NL3D_MEM_DRIVER.

00997 {
00998         NL3D_MEM_DRIVER
00999         NL3D_HAUTO_CLEAR_DRIVER;
01000 
01001         _Driver->clearZBuffer();
01002 }

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

Definition at line 978 of file driver_user.cpp.

References NL3D_MEM_DRIVER.

Referenced by drawLine(), drawQuad(), drawQuads(), and drawTriangle().

00979 {
00980         NL3D_MEM_DRIVER
00981 
00982         CMaterialUser   *pmat= (CMaterialUser*)&mat;
00983         return pmat->_Material;
00984 }

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

Create a 3d mouse listener

Returns:
a 3d mouse listener.

Implements NL3D::UDriver.

Definition at line 1091 of file driver_user.cpp.

References NL3D::CEvent3dMouseListener::addToServer(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01092 {
01093         NL3D_MEM_DRIVER
01094         NL3D_HAUTO_UI_DRIVER;
01095 
01096         // Alloc the listener
01097         CEvent3dMouseListener *listener=new CEvent3dMouseListener();
01098 
01099         // register it
01100         listener->addToServer (EventServer);
01101 
01102         return listener;
01103 }

UDriver * NL3D::UDriver::createDriver uint  windowIcon = 0  )  [static, inherited]
 

This is the static function which build a UDriver, the root for all 3D functions.

Definition at line 98 of file driver_user.cpp.

References NL3D_MEM_DRIVER, and uint.

00099 {
00100         NL3D_MEM_DRIVER
00101         return new CDriverUser (windowIcon);
00102 }

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

Create a new Material, to be filled by user.

Implements NL3D::UDriver.

Definition at line 150 of file driver_user2.cpp.

References _Materials, NL3D::CPtrSet< T >::insert(), and NL3D_MEM_DRIVER.

00151 {
00152         NL3D_MEM_DRIVER
00153 
00154         return _Materials.insert(new CMaterialUser);
00155 }

UScene * NL3D::CDriverUser::createScene bool  bSmallScene  )  [virtual]
 

Create a new scene.

Implements NL3D::UDriver.

Definition at line 63 of file driver_user2.cpp.

References _AsyncTextureManager, _LodCharacterManager, _MeshSkinManager, _Scenes, _ShadowMeshSkinManager, NL3D::CShapeBankUser::_ShapeBank, _ShapeBank, NL3D::CPtrSet< T >::insert(), and NL3D_MEM_DRIVER.

00064 {
00065         NL3D_MEM_DRIVER
00066 
00067         CSceneUser *pSU = new CSceneUser(this, bSmallScene);
00068 
00069         // set the shape bank
00070         pSU->getScene().setShapeBank( &_ShapeBank._ShapeBank );
00071         // set the MeshSkin Vertex Streams
00072         pSU->getScene().getRenderTrav().setMeshSkinManager(&_MeshSkinManager);
00073         pSU->getScene().getRenderTrav().setShadowMeshSkinManager(&_ShadowMeshSkinManager);
00074         // set the AsyncTextureManager
00075         pSU->getScene().setAsyncTextureManager(&_AsyncTextureManager);
00076         // set the lodManager
00077         pSU->getScene().setLodCharacterManager(&_LodCharacterManager);
00078         return _Scenes.insert(pSU);
00079 }

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 89 of file driver_user2.cpp.

References _FontManager, _TextContexts, NL3D::CPtrSet< T >::insert(), and NL3D_MEM_DRIVER.

00090 {
00091         NL3D_MEM_DRIVER
00092 
00093         return _TextContexts.insert(new CTextContextUser(fontFileName, fontExFileName, this, &_FontManager));
00094 }

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 118 of file driver_user2.cpp.

References _Textures, file, NL3D::CPtrSet< T >::insert(), and NL3D_MEM_DRIVER.

00119 {
00120         NL3D_MEM_DRIVER
00121 
00122         CTextureFileUser        *text= new CTextureFileUser(file);
00123         _Textures.insert(text);
00124         return text;
00125 }

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

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

Implements NL3D::UDriver.

Definition at line 134 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, and nlstop.

00135 {
00136         NL3D_MEM_DRIVER
00137         nlstop; // Not implemented!!
00138 
00139         return NULL;
00140 }

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

Delete a 3d mouse listener

Parameters:
listener a 3d mouse listener.

Implements NL3D::UDriver.

Definition at line 1104 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01105 {
01106         NL3D_MEM_DRIVER
01107         NL3D_HAUTO_UI_DRIVER;
01108 
01109         // Unregister
01110         ((CEvent3dMouseListener*)listener)->removeFromServer (EventServer);
01111 
01112         delete (CEvent3dMouseListener*)listener;
01113 }

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

Delete a Material.

Implements NL3D::UDriver.

Definition at line 157 of file driver_user2.cpp.

References _Materials, NL3D::CPtrSet< T >::erase(), and NL3D_MEM_DRIVER.

00158 {
00159         NL3D_MEM_DRIVER
00160 
00161         _Materials.erase( (CMaterialUser*)umat, "deleteMaterial: Bad material");
00162 }

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

Delete a scene.

Implements NL3D::UDriver.

Definition at line 81 of file driver_user2.cpp.

References _Scenes, NL3D::CPtrSet< T >::erase(), and NL3D_MEM_DRIVER.

00082 {
00083         NL3D_MEM_DRIVER
00084 
00085         _Scenes.erase((CSceneUser*)scene, "deleteScene(): Bad scene ptr");
00086 }

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

delete a TextContext.

Implements NL3D::UDriver.

Definition at line 96 of file driver_user2.cpp.

References _TextContexts, NL3D::CPtrSet< T >::erase(), and NL3D_MEM_DRIVER.

00097 {
00098         NL3D_MEM_DRIVER
00099 
00100         _TextContexts.erase((CTextContextUser*)textContext, "deleteTextContext: Bad TextContext");
00101 }

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 127 of file driver_user2.cpp.

References _Textures, NL3D::CPtrSet< T >::erase(), and NL3D_MEM_DRIVER.

00128 {
00129         NL3D_MEM_DRIVER
00130 
00131         _Textures.erase(dynamic_cast<CTextureFileUser*>(textfile), "deleteTextureFile: Bad textfile");
00132 }

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 142 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, and nlstop.

00143 {
00144         NL3D_MEM_DRIVER
00145         nlstop; // Not implemented!!
00146 
00147         delete textraw;
00148 }

void NL3D::CDriverUser::disableHardwareTextureShader  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 221 of file driver_user.cpp.

References NL3D::IDriver::disableHardwareTextureShader(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

00222 {
00223         NL3D_MEM_DRIVER
00224         NL3D_HAUTO_UI_DRIVER;
00225 
00226         _Driver->disableHardwareTextureShader();
00227 }

void NL3D::CDriverUser::disableHardwareVertexArrayAGP  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 214 of file driver_user.cpp.

References NL3D::IDriver::disableHardwareVertexArrayAGP(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

00215 {
00216         NL3D_MEM_DRIVER
00217         NL3D_HAUTO_UI_DRIVER;
00218 
00219         _Driver->disableHardwareVertexArrayAGP();
00220 }

void NL3D::CDriverUser::disableHardwareVertexProgram  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 207 of file driver_user.cpp.

References NL3D::IDriver::disableHardwareVertexProgram(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

00208 {
00209         NL3D_MEM_DRIVER
00210         NL3D_HAUTO_UI_DRIVER;
00211 
00212         _Driver->disableHardwareVertexProgram();
00213 }

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...

For all those function, setMatrixMode2D*() should have been called (else strange results!!).

Implements NL3D::UDriver.

Definition at line 850 of file driver_user.cpp.

References _MatText, drawQuad(), height, NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CVector::set(), NL3D::CMaterialUser::setBlend(), NL3D::CMaterialUser::setColor(), NL3D::CMaterialUser::setTexture(), NLMISC::CUV::U, NLMISC::CQuadUV::Uv0, NLMISC::CQuadUV::Uv1, NLMISC::CQuadUV::Uv2, NLMISC::CQuadUV::Uv3, NLMISC::CUV::V, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, NLMISC::CQuad::V3, width, x, and y.

00851 {
00852         NL3D_MEM_DRIVER
00853         NL3D_HAUTO_DRAW_DRIVER;
00854 
00855         _MatText.setTexture(&texture);
00856         _MatText.setColor(col);
00857         _MatText.setBlend(blend);
00858 
00859         CQuadUV         quad;
00860         quad.V0.set(x,y,0);
00861         quad.V1.set(x+width,y,0);
00862         quad.V2.set(x+width,y+height,0);
00863         quad.V3.set(x,y+height,0);
00864         quad.Uv0.U= 0.f;
00865         quad.Uv0.V= 1.f;
00866         quad.Uv1.U= 1.f;
00867         quad.Uv1.V= 1.f;
00868         quad.Uv2.U= 1.f;
00869         quad.Uv2.V= 0.f;
00870         quad.Uv3.U= 0.f;
00871         quad.Uv3.V= 0.f;
00872 
00873         drawQuad(quad, _MatText);
00874 }

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 876 of file driver_user.cpp.

References _MatFlat, drawLine(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::CMaterialUser::setBlend(), and NL3D::CMaterialUser::setColor().

00877 {
00878         NL3D_MEM_DRIVER
00879         NL3D_HAUTO_DRAW_DRIVER;
00880 
00881         _MatFlat.setColor(col);
00882         _MatFlat.setBlend(true);
00883 
00884         CLine           line;
00885         line.V0.set(x0,y0,0);
00886         line.V1.set(x1,y1,0);
00887 
00888         drawLine(line, _MatFlat);
00889 }

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 553 of file driver_user.cpp.

References _PBLine, _VBColorUv, NL3D::IDriver::activeVertexBuffer(), NLMISC::CLineColorUV::Color0, NLMISC::CLineColorUV::Color1, convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setColor(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CLineColorUV::Uv0, NLMISC::CLineColorUV::Uv1, NLMISC::CLine::V0, and NLMISC::CLine::V1.

00554 {
00555         NL3D_MEM_DRIVER
00556         NL3D_HAUTO_DRAW_DRIVER;
00557 
00558         CVertexBuffer           &vb= _VBColorUv;
00559         CPrimitiveBlock         &pb= _PBLine;
00560 
00561         vb.setVertexCoord (0, shp.V0);
00562         vb.setVertexCoord (1, shp.V1);
00563         vb.setColor(0, shp.Color0);
00564         vb.setColor(1, shp.Color1);
00565         vb.setTexCoord (0, 0, shp.Uv0);
00566         vb.setTexCoord (1, 0, shp.Uv1);
00567         
00568         _Driver->activeVertexBuffer(vb);
00569         _Driver->render(pb, convMat(mat));
00570 }

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 536 of file driver_user.cpp.

References _PBLine, _VBUv, NL3D::IDriver::activeVertexBuffer(), convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CLineUV::Uv0, NLMISC::CLineUV::Uv1, NLMISC::CLine::V0, and NLMISC::CLine::V1.

00537 {
00538         NL3D_MEM_DRIVER
00539         NL3D_HAUTO_DRAW_DRIVER;
00540 
00541         CVertexBuffer           &vb= _VBUv;
00542         CPrimitiveBlock         &pb= _PBLine;
00543 
00544         vb.setVertexCoord (0, shp.V0);
00545         vb.setVertexCoord (1, shp.V1);
00546         vb.setTexCoord (0, 0, shp.Uv0);
00547         vb.setTexCoord (1, 0, shp.Uv1);
00548         
00549         _Driver->activeVertexBuffer(vb);
00550         _Driver->render(pb, convMat(mat));
00551 }

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

Draw the Line, taking color from primitive.

Implements NL3D::UDriver.

Definition at line 519 of file driver_user.cpp.

References _PBLine, _VBColor, NL3D::IDriver::activeVertexBuffer(), NLMISC::CLineColor::Color0, NLMISC::CLineColor::Color1, convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setColor(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CLine::V0, and NLMISC::CLine::V1.

00520 {
00521         NL3D_MEM_DRIVER
00522         NL3D_HAUTO_DRAW_DRIVER;
00523 
00524         CVertexBuffer           &vb= _VBColor;
00525         CPrimitiveBlock         &pb= _PBLine;
00526 
00527         vb.setVertexCoord (0, shp.V0);
00528         vb.setVertexCoord (1, shp.V1);
00529         vb.setColor(0, shp.Color0);
00530         vb.setColor(1, shp.Color1);
00531         
00532         _Driver->activeVertexBuffer(vb);
00533         _Driver->render(pb, convMat(mat));
00534 }

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

Draw the Line, taking color from material.

All of those render primitives are unlit! You must use UScene to render lighted meshes. 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 504 of file driver_user.cpp.

References _PBLine, _VBFlat, NL3D::IDriver::activeVertexBuffer(), convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CLine::V0, and NLMISC::CLine::V1.

Referenced by drawLine(), and drawWiredQuad().

00505 {
00506         NL3D_MEM_DRIVER
00507         NL3D_HAUTO_DRAW_DRIVER;
00508 
00509         CVertexBuffer           &vb= _VBFlat;
00510         CPrimitiveBlock         &pb= _PBLine;
00511 
00512         vb.setVertexCoord (0, shp.V0);
00513         vb.setVertexCoord (1, shp.V1);
00514         
00515         _Driver->activeVertexBuffer(vb);
00516         _Driver->render(pb, convMat(mat));
00517 }

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 924 of file driver_user.cpp.

References drawQuad(), NL3D_HAUTO_DRAW_DRIVER, and NL3D_MEM_DRIVER.

00925 {
00926         NL3D_MEM_DRIVER
00927         NL3D_HAUTO_DRAW_DRIVER;
00928 
00929         drawQuad(xcenter-radius, ycenter-radius, xcenter+radius, ycenter+radius, col);
00930 }

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 907 of file driver_user.cpp.

References _MatFlat, drawQuad(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CVector::set(), NL3D::CMaterialUser::setBlend(), NL3D::CMaterialUser::setColor(), NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

00908 {
00909         NL3D_MEM_DRIVER
00910         NL3D_HAUTO_DRAW_DRIVER;
00911 
00912         _MatFlat.setColor(col);
00913         _MatFlat.setBlend(true);
00914 
00915         CQuad           quad;
00916         quad.V0.set(x0,y0,0);
00917         quad.V1.set(x1,y0,0);
00918         quad.V2.set(x1,y1,0);
00919         quad.V3.set(x0,y1,0);
00920 
00921         drawQuad(quad, _MatFlat);
00922 }

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 713 of file driver_user.cpp.

References _PBQuad, _VBColorUv, NL3D::IDriver::activeVertexBuffer(), NLMISC::CQuadColorUV::Color0, NLMISC::CQuadColorUV::Color1, NLMISC::CQuadColorUV::Color2, NLMISC::CQuadColorUV::Color3, convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setColor(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CVertexBuffer::setVertexCoord(), 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.

00714 {
00715         NL3D_MEM_DRIVER
00716         NL3D_HAUTO_DRAW_DRIVER;
00717 
00718         CVertexBuffer           &vb= _VBColorUv;
00719         CPrimitiveBlock         &pb= _PBQuad;
00720 
00721         vb.setVertexCoord (0, shp.V0);
00722         vb.setVertexCoord (1, shp.V1);
00723         vb.setVertexCoord (2, shp.V2);
00724         vb.setVertexCoord (3, shp.V3);
00725         vb.setColor(0, shp.Color0);
00726         vb.setColor(1, shp.Color1);
00727         vb.setColor(2, shp.Color2);
00728         vb.setColor(3, shp.Color3);
00729         vb.setTexCoord (0, 0, shp.Uv0);
00730         vb.setTexCoord (1, 0, shp.Uv1);
00731         vb.setTexCoord (2, 0, shp.Uv2);
00732         vb.setTexCoord (3, 0, shp.Uv3);
00733         
00734         _Driver->activeVertexBuffer(vb);
00735         _Driver->render(pb, convMat(mat));
00736 }

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 692 of file driver_user.cpp.

References _PBQuad, _VBUv, NL3D::IDriver::activeVertexBuffer(), convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CVertexBuffer::setVertexCoord(), 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.

00693 {
00694         NL3D_MEM_DRIVER
00695         NL3D_HAUTO_DRAW_DRIVER;
00696 
00697         CVertexBuffer           &vb= _VBUv;
00698         CPrimitiveBlock         &pb= _PBQuad;
00699 
00700         vb.setVertexCoord (0, shp.V0);
00701         vb.setVertexCoord (1, shp.V1);
00702         vb.setVertexCoord (2, shp.V2);
00703         vb.setVertexCoord (3, shp.V3);
00704         vb.setTexCoord (0, 0, shp.Uv0);
00705         vb.setTexCoord (1, 0, shp.Uv1);
00706         vb.setTexCoord (2, 0, shp.Uv2);
00707         vb.setTexCoord (3, 0, shp.Uv3);
00708         
00709         _Driver->activeVertexBuffer(vb);
00710         _Driver->render(pb, convMat(mat));
00711 }

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

Draw the Quad, taking color from primitive.

Implements NL3D::UDriver.

Definition at line 671 of file driver_user.cpp.

References _PBQuad, _VBColor, NL3D::IDriver::activeVertexBuffer(), NLMISC::CQuadColor::Color0, NLMISC::CQuadColor::Color1, NLMISC::CQuadColor::Color2, NLMISC::CQuadColor::Color3, convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setColor(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

00672 {
00673         NL3D_MEM_DRIVER
00674         NL3D_HAUTO_DRAW_DRIVER;
00675 
00676         CVertexBuffer           &vb= _VBColor;
00677         CPrimitiveBlock         &pb= _PBQuad;
00678 
00679         vb.setVertexCoord (0, shp.V0);
00680         vb.setVertexCoord (1, shp.V1);
00681         vb.setVertexCoord (2, shp.V2);
00682         vb.setVertexCoord (3, shp.V3);
00683         vb.setColor(0, shp.Color0);
00684         vb.setColor(1, shp.Color1);
00685         vb.setColor(2, shp.Color2);
00686         vb.setColor(3, shp.Color3);
00687         
00688         _Driver->activeVertexBuffer(vb);
00689         _Driver->render(pb, convMat(mat));
00690 }

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

Draw the Quad, taking color from material.

Implements NL3D::UDriver.

Definition at line 654 of file driver_user.cpp.

References _PBQuad, _VBFlat, NL3D::IDriver::activeVertexBuffer(), convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

Referenced by drawBitmap(), and drawQuad().

00655 {
00656         NL3D_MEM_DRIVER
00657         NL3D_HAUTO_DRAW_DRIVER;
00658 
00659         CVertexBuffer           &vb= _VBFlat;
00660         CPrimitiveBlock         &pb= _PBQuad;
00661 
00662         vb.setVertexCoord (0, shp.V0);
00663         vb.setVertexCoord (1, shp.V1);
00664         vb.setVertexCoord (2, shp.V2);
00665         vb.setVertexCoord (3, shp.V3);
00666         
00667         _Driver->activeVertexBuffer(vb);
00668         _Driver->render(pb, convMat(mat));
00669 }

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

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

Implements NL3D::UDriver.

Definition at line 798 of file driver_user.cpp.

References _VBQuadsColUv2, NL3D::IDriver::activeVertexBuffer(), NLMISC::CQuadColorUV::Color0, NLMISC::CQuadColorUV::Color1, NLMISC::CQuadColorUV::Color2, NLMISC::CQuadColorUV::Color3, convMat(), NL3D::CVertexBuffer::getColorOff(), NL3D::CVertexBuffer::getTexCoordOff(), NL3D::CVertexBuffer::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexSize(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::renderQuads(), NL3D::CVertexBuffer::setNumVertices(), uint32, uint8, NLMISC::CQuadColorUV::Uv0, NLMISC::CQuadColorUV2::Uv02, NLMISC::CQuadColorUV::Uv1, NLMISC::CQuadColorUV2::Uv12, NLMISC::CQuadColorUV::Uv2, NLMISC::CQuadColorUV2::Uv22, NLMISC::CQuadColorUV::Uv3, NLMISC::CQuadColorUV2::Uv32, NLMISC::CQuad::V0, NLMISC::CQuad::V1, NLMISC::CQuad::V2, and NLMISC::CQuad::V3.

00799 {
00800         NL3D_MEM_DRIVER
00801         NL3D_HAUTO_DRAW_DRIVER;
00802 
00803         CVertexBuffer           &vb = _VBQuadsColUv2;
00804 
00805         vb.setNumVertices (4*nbQuads);
00806         uint8   *dstPtr= (uint8*)vb.getVertexCoordPointer();
00807         uint32  colorOfs= vb.getColorOff();
00808         uint32  uvOfs0= vb.getTexCoordOff(0);
00809         uint32  uvOfs1= vb.getTexCoordOff(1);
00810         uint32  vSize= vb.getVertexSize();
00811         
00812         for (uint32 i = 0; i < nbQuads; ++i)
00813         {
00814                 const NLMISC::CQuadColorUV2 &qcuv = quads[i];
00815                 *(CVector*)(dstPtr+0)= qcuv.V0;
00816                 *(CUV*)(dstPtr+uvOfs0)= qcuv.Uv0;
00817                 *(CUV*)(dstPtr+uvOfs1)= qcuv.Uv02;
00818                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color0;
00819                 dstPtr+= vSize;
00820                 *(CVector*)(dstPtr+0)= qcuv.V1;
00821                 *(CUV*)(dstPtr+uvOfs0)= qcuv.Uv1;
00822                 *(CUV*)(dstPtr+uvOfs1)= qcuv.Uv12;
00823                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color1;
00824                 dstPtr+= vSize;
00825                 *(CVector*)(dstPtr+0)= qcuv.V2;
00826                 *(CUV*)(dstPtr+uvOfs0)= qcuv.Uv2;
00827                 *(CUV*)(dstPtr+uvOfs1)= qcuv.Uv22;
00828                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color2;
00829                 dstPtr+= vSize;
00830                 *(CVector*)(dstPtr+0)= qcuv.V3;
00831                 *(CUV*)(dstPtr+uvOfs0)= qcuv.Uv3;
00832                 *(CUV*)(dstPtr+uvOfs1)= qcuv.Uv32;
00833                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color3;
00834                 dstPtr+= vSize;
00835         }
00836         
00837         _Driver->activeVertexBuffer(vb);
00838         _Driver->renderQuads(convMat(mat), 0, nbQuads);
00839 }

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

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

Implements NL3D::UDriver.

Definition at line 758 of file driver_user.cpp.

References _VBQuadsColUv, NL3D::IDriver::activeVertexBuffer(), NLMISC::CQuadColorUV::Color0, NLMISC::CQuadColorUV::Color1, NLMISC::CQuadColorUV::Color2, NLMISC::CQuadColorUV::Color3, convMat(), NL3D::CVertexBuffer::getColorOff(), NL3D::CVertexBuffer::getTexCoordOff(), NL3D::CVertexBuffer::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexSize(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::renderQuads(), NL3D::CVertexBuffer::setNumVertices(), uint32, uint8, 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.

00759 {
00760         NL3D_MEM_DRIVER
00761         NL3D_HAUTO_DRAW_DRIVER;
00762 
00763         CVertexBuffer           &vb = _VBQuadsColUv;
00764 
00765         vb.setNumVertices (4*nbQuads);
00766         uint8   *dstPtr= (uint8*)vb.getVertexCoordPointer();
00767         uint32  colorOfs= vb.getColorOff();
00768         uint32  uvOfs= vb.getTexCoordOff();
00769         uint32  vSize= vb.getVertexSize();
00770         
00771         for (uint32 i = 0; i < nbQuads; ++i)
00772         {
00773                 const NLMISC::CQuadColorUV &qcuv = quads[i];
00774                 *(CVector*)(dstPtr+0)= qcuv.V0;
00775                 *(CUV*)(dstPtr+uvOfs)= qcuv.Uv0;
00776                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color0;
00777                 dstPtr+= vSize;
00778                 *(CVector*)(dstPtr+0)= qcuv.V1;
00779                 *(CUV*)(dstPtr+uvOfs)= qcuv.Uv1;
00780                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color1;
00781                 dstPtr+= vSize;
00782                 *(CVector*)(dstPtr+0)= qcuv.V2;
00783                 *(CUV*)(dstPtr+uvOfs)= qcuv.Uv2;
00784                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color2;
00785                 dstPtr+= vSize;
00786                 *(CVector*)(dstPtr+0)= qcuv.V3;
00787                 *(CUV*)(dstPtr+uvOfs)= qcuv.Uv3;
00788                 *(CRGBA*)(dstPtr+colorOfs)= qcuv.Color3;
00789                 dstPtr+= vSize;
00790         }
00791         
00792         _Driver->activeVertexBuffer(vb);
00793         _Driver->renderQuads(convMat(mat), 0, nbQuads);
00794 }

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

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

Implements NL3D::UDriver.

Definition at line 748 of file driver_user.cpp.

References drawQuads(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, and q.

00749 {
00750         NL3D_MEM_DRIVER
00751         NL3D_HAUTO_DRAW_DRIVER;
00752         
00753         const CQuadColorUV2 *qptr = &(q[0]);
00754         drawQuads(qptr , q.size(), mat);
00755 }

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

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

Implements NL3D::UDriver.

Definition at line 738 of file driver_user.cpp.

References NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, and q.

Referenced by drawQuads().

00739 {
00740         NL3D_MEM_DRIVER
00741         NL3D_HAUTO_DRAW_DRIVER;
00742         
00743         const CQuadColorUV *qptr = &(q[0]);
00744         drawQuads(qptr , q.size(), mat);
00745 }

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 891 of file driver_user.cpp.

References _MatFlat, drawTriangle(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NLMISC::CVector::set(), NL3D::CMaterialUser::setBlend(), NL3D::CMaterialUser::setColor(), NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

00892 {
00893         NL3D_MEM_DRIVER
00894         NL3D_HAUTO_DRAW_DRIVER;
00895 
00896         _MatFlat.setColor(col);
00897         _MatFlat.setBlend(true);
00898 
00899         CTriangle               tri;
00900         tri.V0.set(x0,y0,0);
00901         tri.V1.set(x1,y1,0);
00902         tri.V2.set(x2,y2,0);
00903 
00904         drawTriangle(tri, _MatFlat);
00905 }

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 629 of file driver_user.cpp.

References _PBTri, _VBColorUv, NL3D::IDriver::activeVertexBuffer(), NLMISC::CTriangleColorUV::Color0, NLMISC::CTriangleColorUV::Color1, NLMISC::CTriangleColorUV::Color2, convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setColor(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CTriangleColorUV::Uv0, NLMISC::CTriangleColorUV::Uv1, NLMISC::CTriangleColorUV::Uv2, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

00630 {
00631         NL3D_MEM_DRIVER
00632         NL3D_HAUTO_DRAW_DRIVER;
00633 
00634         CVertexBuffer           &vb= _VBColorUv;
00635         CPrimitiveBlock         &pb= _PBTri;
00636 
00637         vb.setVertexCoord (0, shp.V0);
00638         vb.setVertexCoord (1, shp.V1);
00639         vb.setVertexCoord (2, shp.V2);
00640         vb.setColor(0, shp.Color0);
00641         vb.setColor(1, shp.Color1);
00642         vb.setColor(2, shp.Color2);
00643         vb.setTexCoord (0, 0, shp.Uv0);
00644         vb.setTexCoord (1, 0, shp.Uv1);
00645         vb.setTexCoord (2, 0, shp.Uv2);
00646         
00647         _Driver->activeVertexBuffer(vb);
00648         _Driver->render(pb, convMat(mat));
00649 }

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 610 of file driver_user.cpp.

References _PBTri, _VBUv, NL3D::IDriver::activeVertexBuffer(), convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setTexCoord(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CTriangleUV::Uv0, NLMISC::CTriangleUV::Uv1, NLMISC::CTriangleUV::Uv2, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

00611 {
00612         NL3D_MEM_DRIVER
00613         NL3D_HAUTO_DRAW_DRIVER;
00614 
00615         CVertexBuffer           &vb= _VBUv;
00616         CPrimitiveBlock         &pb= _PBTri;
00617 
00618         vb.setVertexCoord (0, shp.V0);
00619         vb.setVertexCoord (1, shp.V1);
00620         vb.setVertexCoord (2, shp.V2);
00621         vb.setTexCoord (0, 0, shp.Uv0);
00622         vb.setTexCoord (1, 0, shp.Uv1);
00623         vb.setTexCoord (2, 0, shp.Uv2);
00624         
00625         _Driver->activeVertexBuffer(vb);
00626         _Driver->render(pb, convMat(mat));
00627 }

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

Draw the Triangle, taking color from primitive.

Implements NL3D::UDriver.

Definition at line 591 of file driver_user.cpp.

References _PBTri, _VBColor, NL3D::IDriver::activeVertexBuffer(), NLMISC::CTriangleColor::Color0, NLMISC::CTriangleColor::Color1, NLMISC::CTriangleColor::Color2, convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setColor(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

00592 {
00593         NL3D_MEM_DRIVER
00594         NL3D_HAUTO_DRAW_DRIVER;
00595 
00596         CVertexBuffer           &vb= _VBColor;
00597         CPrimitiveBlock         &pb= _PBTri;
00598 
00599         vb.setVertexCoord (0, shp.V0);
00600         vb.setVertexCoord (1, shp.V1);
00601         vb.setVertexCoord (2, shp.V2);
00602         vb.setColor(0, shp.Color0);
00603         vb.setColor(1, shp.Color1);
00604         vb.setColor(2, shp.Color2);
00605         
00606         _Driver->activeVertexBuffer(vb);
00607         _Driver->render(pb, convMat(mat));
00608 }

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

Draw the Triangle, taking color from material.

Implements NL3D::UDriver.

Definition at line 575 of file driver_user.cpp.

References _PBTri, _VBFlat, NL3D::IDriver::activeVertexBuffer(), convMat(), NL3D_HAUTO_DRAW_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::render(), NL3D::CVertexBuffer::setVertexCoord(), NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.

Referenced by drawTriangle().

00576 {
00577         NL3D_MEM_DRIVER
00578         NL3D_HAUTO_DRAW_DRIVER;
00579 
00580         CVertexBuffer           &vb= _VBFlat;
00581         CPrimitiveBlock         &pb= _PBTri;
00582 
00583         vb.setVertexCoord (0, shp.V0);
00584         vb.setVertexCoord (1, shp.V1);
00585         vb.setVertexCoord (2, shp.V2);
00586         
00587         _Driver->activeVertexBuffer(vb);
00588         _Driver->render(pb, convMat(mat));
00589 }

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 947 of file driver_user.cpp.

References drawWiredQuad(), NL3D_HAUTO_DRAW_DRIVER, and NL3D_MEM_DRIVER.

00948 {
00949         NL3D_MEM_DRIVER
00950         NL3D_HAUTO_DRAW_DRIVER;
00951         
00952         drawWiredQuad(xcenter-radius, ycenter-radius, xcenter+radius, ycenter+radius, col);
00953 }

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 932 of file driver_user.cpp.

References drawLine(), NL3D_HAUTO_DRAW_DRIVER, and NL3D_MEM_DRIVER.

Referenced by drawWiredQuad().

00933 {
00934         NL3D_MEM_DRIVER
00935         NL3D_HAUTO_DRAW_DRIVER;
00936         
00937         // v-left
00938         drawLine(x0,y0,x0,y1,col);      
00939         // v-right
00940         drawLine(x1,y0,x1,y1,col);      
00941         // h-up
00942         drawLine(x0,y1,x1,y1,col);      
00943         // h-bottom
00944         drawLine(x0,y0,x1,y0,col);      
00945 }

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

Implements NL3D::UDriver.

Definition at line 1031 of file driver_user.cpp.

References NL3D::IDriver::enableFog(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01032 {
01033         NL3D_MEM_DRIVER
01034         NL3D_HAUTO_UI_DRIVER;
01035 
01036         _Driver->enableFog(enable);
01037 }

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

Implements NL3D::UDriver.

Definition at line 1058 of file driver_user.cpp.

References NL3D::IDriver::enableLight(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, num, and uint8.

01059 {
01060         NL3D_MEM_DRIVER
01061         NL3D_HAUTO_UI_DRIVER;
01062 
01063         _Driver->enableLight (num, enable);
01064 }

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 1280 of file driver_user.cpp.

References NL3D::IDriver::enableLowLevelKeyboard(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01281 {
01282         NL3D_MEM_DRIVER
01283         NL3D_HAUTO_UI_DRIVER;
01284 
01285         return _Driver->enableLowLevelKeyboard(enable);
01286 }

NLMISC::IMouseDevice * NL3D::CDriverUser::enableLowLevelMouse bool  enable,
bool  exclusive
[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 1273 of file driver_user.cpp.

References NL3D::IDriver::enableLowLevelMouse(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01274 {
01275         NL3D_MEM_DRIVER
01276         NL3D_HAUTO_UI_DRIVER;
01277 
01278         return _Driver->enableLowLevelMouse(enable, exclusive);
01279 }

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 209 of file driver_user2.cpp.

References NL3D::IDriver::enableUsedTextureMemorySum(), and NL3D_MEM_DRIVER.

00210 {
00211         NL3D_MEM_DRIVER
00212         _Driver->enableUsedTextureMemorySum (enable);
00213 }

void NL3D::CDriverUser::endProfileVBHardLock std::vector< std::string > &  result  )  [virtual]
 

If the driver support it, stop profile VBHard locks, and "print" result No-Op if already profiling NB: The results are the Locks in Chronogical time (since last swapBuffers). Since multiple frame are summed, an "*" is marked againts the VBHard name to show if it was not always this one (ptr test and not name test) in the chronogical order. NB: if the driver does not support VBHard or VBHard profiling (like ATI VBHard), result is empty. NB: ???? string is displayed if the VBHard has no name or if was just deleted.

Implements NL3D::UDriver.

Definition at line 231 of file driver_user2.cpp.

References NL3D::IDriver::endProfileVBHardLock().

00232 {
00233         _Driver->endProfileVBHardLock(result);
00234 }

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

Enum All Fullscreen modes.

Implements NL3D::UDriver.

Definition at line 189 of file driver_user.cpp.

References NL3D::IDriver::enumModes(), NL3D::ModeList, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, sint, and NL3D::UDriver::TModeList.

00190 {
00191         NL3D_HAUTO_UI_DRIVER;
00192         NL3D_MEM_DRIVER
00193 
00194         ModeList        dlist;
00195         TModeList       retlist;
00196 
00197         dlist= _Driver->enumModes();
00198         for(sint i=0;i<(sint)dlist.size();i++)
00199         {
00200                 retlist.push_back(CMode(dlist[i].Width, dlist[i].Height, dlist[i].Depth, dlist[i].Windowed));
00201         }
00202 
00203         return retlist;
00204 }

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 1258 of file driver_user.cpp.

References NL3D::IDriver::fillBuffer(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01259 {
01260         NL3D_MEM_DRIVER
01261         NL3D_HAUTO_UI_DRIVER;
01262 
01263         return _Driver->fillBuffer(bitmap);
01264 }

bool NL3D::CDriverUser::fogEnabled  )  [virtual]
 

Implements NL3D::UDriver.

Definition at line 1023 of file driver_user.cpp.

References NL3D::IDriver::fogEnabled(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01024 {
01025         NL3D_MEM_DRIVER
01026         NL3D_HAUTO_UI_DRIVER;
01027 
01028         return _Driver->fogEnabled();
01029 }

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 1132 of file driver_user.cpp.

References NL3D::IDriver::forceDXTCCompression(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01133 {
01134         NL3D_MEM_DRIVER
01135         NL3D_HAUTO_UI_DRIVER;
01136 
01137         _Driver->forceDXTCCompression(dxtcComp);
01138 }

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 1139 of file driver_user.cpp.

References NL3D::IDriver::forceTextureResize(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and uint.

01140 {
01141         NL3D_MEM_DRIVER
01142         NL3D_HAUTO_UI_DRIVER;
01143 
01144         _Driver->forceTextureResize(divisor);
01145 }

uint32 NL3D::CDriverUser::getAvailableVertexAGPMemory  )  [virtual]
 

Return the amount of AGP memory allocated by initVertexArrayRange() to store vertices.

Implements NL3D::UDriver.

Definition at line 1222 of file driver_user.cpp.

References NL3D::IDriver::getAvailableVertexAGPMemory(), and uint32.

01223 {
01224         return _Driver->getAvailableVertexAGPMemory ();
01225 }

uint32 NL3D::CDriverUser::getAvailableVertexVRAMMemory  )  [virtual]
 

Return the amount of video memory allocated by initVertexArrayRange() to store vertices.

Implements NL3D::UDriver.

Definition at line 1226 of file driver_user.cpp.

References NL3D::IDriver::getAvailableVertexVRAMMemory(), and uint32.

01227 {
01228         return _Driver->getAvailableVertexVRAMMemory ();
01229 }       

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 1230 of file driver_user.cpp.

References NL3D::IDriver::getBuffer(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01231 {
01232         NL3D_MEM_DRIVER
01233         NL3D_HAUTO_UI_DRIVER;
01234 
01235         _Driver->getBuffer (bitmap) ;
01236 }

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 1244 of file driver_user.cpp.

References NL3D::IDriver::getBufferPart(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01245 {
01246         NL3D_MEM_DRIVER
01247         NL3D_HAUTO_UI_DRIVER;
01248 
01249         _Driver->getBufferPart (bitmap, rect) ;
01250 }

void * NL3D::CDriverUser::getDisplay  )  [virtual]
 

Return an OS dependent window handle. Under Win32, it is a HWND.

Implements NL3D::UDriver.

Definition at line 333 of file driver_user.cpp.

References NL3D::IDriver::getDisplay(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

00334 {
00335         NL3D_MEM_DRIVER
00336         NL3D_HAUTO_UI_DRIVER;
00337 
00338         return _Driver->getDisplay ();
00339 }

uint NL3D::CDriverUser::getDoubleClickDelay bool  hardwareMouse  )  [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 1288 of file driver_user.cpp.

References NL3D::IDriver::getDoubleClickDelay(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and uint.

01289 {
01290         NL3D_MEM_DRIVER
01291         NL3D_HAUTO_UI_DRIVER;
01292         return _Driver->getDoubleClickDelay(hardwareMouse);
01293 }

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

Definition at line 462 of file driver_user.h.

References NL3D_MEM_DRIVER.

Referenced by NL3D::CSceneUser::CSceneUser(), NL3D::CShapeBankUser::preLoadShapesFromBNP(), NL3D::CShapeBankUser::preLoadShapesFromDirectory(), and updateAsyncTexture().

00463         {
00464                 NL3D_MEM_DRIVER
00465                 return _Driver;
00466         }

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 1169 of file driver_user.cpp.

References NL3D::IDriver::getDriverInformation(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01170 {
01171         NL3D_MEM_DRIVER
01172         NL3D_HAUTO_UI_DRIVER;
01173 
01174         return _Driver->getDriverInformation();
01175 }

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

get cahce information.

Implements NL3D::UDriver.

Definition at line 110 of file driver_user2.cpp.

References _FontManager, NL3D::CFontManager::getCacheInformation(), and NL3D_MEM_DRIVER.

00111 {
00112         NL3D_MEM_DRIVER
00113 
00114         return _FontManager.getCacheInformation();
00115 }

CFrustum NL3D::CDriverUser::getFrustum  )  [virtual]
 

Implements NL3D::UDriver.

Definition at line 419 of file driver_user.cpp.

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

00420 {
00421         NL3D_MEM_DRIVER
00422         NL3D_HAUTO_UI_DRIVER;
00423 
00424         return _CurrentMatrixContext.Frustum;
00425 }

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

Driver information/Queries.

Implements NL3D::UDriver.

Definition at line 1162 of file driver_user.cpp.

References NL3D::IDriver::getImplementationVersion(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and uint32.

01163 {
01164         NL3D_MEM_DRIVER
01165         NL3D_HAUTO_UI_DRIVER;
01166 
01167         return _Driver->getImplementationVersion ();
01168 }

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

get what the system really allows

Implements NL3D::UDriver.

Definition at line 1375 of file driver_user.cpp.

References _AsyncTextureManager, NL3D::CAsyncTextureManager::getLastTextureSizeGot(), NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, and uint.

01376 {
01377         NL3D_MEM_DRIVER
01378         NL3D_HAUTO_TEX_DRIVER;
01379         
01380         return _AsyncTextureManager.getLastTextureSizeGot();
01381 }

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 1295 of file driver_user.cpp.

References NL3D::IDriver::getLowLevelInputDeviceManager(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01296 {
01297         NL3D_MEM_DRIVER
01298         NL3D_HAUTO_UI_DRIVER;
01299 
01300         return _Driver->getLowLevelInputDeviceManager();
01301 }

CMatrix NL3D::CDriverUser::getModelMatrix  )  [virtual]
 

Implements NL3D::UDriver.

Definition at line 453 of file driver_user.cpp.

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

00454 {
00455         NL3D_MEM_DRIVER
00456         NL3D_HAUTO_UI_DRIVER;
00457 
00458         return _CurrentMatrixContext.ModelMatrix;
00459 }

bool NL3D::CDriverUser::getModes std::vector< CMode > &  modes  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 274 of file driver_user.cpp.

References NL3D::IDriver::getModes(), res, and uint.

00275 {
00276         std::vector<GfxMode> vTmp;
00277         bool res = _Driver->getModes(vTmp);
00278         modes.clear();
00279         for (uint i = 0; i < vTmp.size(); ++i)
00280                 modes.push_back(CMode(vTmp[i].Width, vTmp[i].Height, vTmp[i].Depth, vTmp[i].Windowed, vTmp[i].Frequency));
00281         return res;
00282 }

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 1183 of file driver_user.cpp.

References NL3D::IDriver::getNbTextureStages(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and sint.

01184 {
01185         NL3D_MEM_DRIVER
01186         NL3D_HAUTO_UI_DRIVER;
01187 
01188         return _Driver->getNbTextureStages();
01189 }

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 1114 of file driver_user.cpp.

References NL3D::IDriver::getPolygonMode(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and nlstop.

01115 {
01116         NL3D_MEM_DRIVER
01117         NL3D_HAUTO_UI_DRIVER;
01118 
01119         IDriver::TPolygonMode   dmode;
01120         UDriver::TPolygonMode   umode=UDriver::Filled;
01121         dmode= _Driver->getPolygonMode();
01122         switch(dmode)
01123         {
01124                 case IDriver::Filled:   umode= UDriver::Filled; break;
01125                 case IDriver::Line:             umode= UDriver::Line; break;
01126                 case IDriver::Point:    umode= UDriver::Point; break;
01127                 default: nlstop;
01128         };
01129 
01130         return umode;
01131 }

CScissor NL3D::CDriverUser::getScissor  )  [virtual]
 

Implements NL3D::UDriver.

Definition at line 385 of file driver_user.cpp.

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

00386 {
00387         NL3D_MEM_DRIVER
00388         NL3D_HAUTO_UI_DRIVER;
00389 
00390         return _CurrentMatrixContext.Scissor;
00391 }

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 414 of file driver_user.h.

References _ShapeBank, and NL3D_MEM_DRIVER.

00415         {
00416                 NL3D_MEM_DRIVER
00417                 return &_ShapeBank;
00418         }

uint NL3D::CDriverUser::getSwapVBLInterval  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 1429 of file driver_user.cpp.

References NL3D::IDriver::getSwapVBLInterval(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and uint.

01430 {
01431         NL3D_MEM_DRIVER
01432         NL3D_HAUTO_UI_DRIVER
01433 
01434         return _Driver->getSwapVBLInterval();
01435 }

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

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

Implements NL3D::UDriver.

Definition at line 1367 of file driver_user.cpp.

References _AsyncTextureManager, NL3D::CAsyncTextureManager::getTotalTextureSizeAsked(), NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, and uint.

01368 {
01369         NL3D_MEM_DRIVER
01370         NL3D_HAUTO_TEX_DRIVER;
01371         
01372         return _AsyncTextureManager.getTotalTextureSizeAsked();
01373 }

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 217 of file driver_user2.cpp.

References NL3D::IDriver::getUsedTextureMemory(), NL3D_MEM_DRIVER, and uint32.

00218 {
00219         NL3D_MEM_DRIVER
00220         return _Driver->getUsedTextureMemory ();
00221 }

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

Get videocard informations. get the official name of the driver

Implements NL3D::UDriver.

Definition at line 1176 of file driver_user.cpp.

References NL3D::IDriver::getVideocardInformation(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01177 {
01178         NL3D_MEM_DRIVER
01179         NL3D_HAUTO_UI_DRIVER;
01180 
01181         return _Driver->getVideocardInformation ();
01182 }

CMatrix NL3D::CDriverUser::getViewMatrix  )  [virtual]
 

Implements NL3D::UDriver.

Definition at line 436 of file driver_user.cpp.

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

00437 {
00438         NL3D_MEM_DRIVER
00439         NL3D_HAUTO_UI_DRIVER;
00440 
00441         return _CurrentMatrixContext.ViewMatrix;
00442 }

CViewport NL3D::CDriverUser::getViewport  )  [virtual]
 

Implements NL3D::UDriver.

Definition at line 402 of file driver_user.cpp.

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

00403 {
00404         NL3D_MEM_DRIVER
00405         NL3D_HAUTO_UI_DRIVER;
00406 
00407         return _CurrentMatrixContext.Viewport;
00408 }

uint NL3D::CDriverUser::getWindowHeight  )  [virtual]
 

Get the height of the window.

Implements NL3D::UDriver.

Definition at line 1206 of file driver_user.cpp.

References NL3D::IDriver::getWindowSize(), height, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, uint, uint32, and width.

01207 {
01208         NL3D_MEM_DRIVER
01209         NL3D_HAUTO_UI_DRIVER;
01210 
01211         uint32 width, height;
01212         _Driver->getWindowSize (width, height);
01213         return height;
01214 }

void NL3D::CDriverUser::getWindowPos uint32 x,
uint32 y
[virtual]
 

Get the x and y coord of the windows always (0,0) in fullscreen.

Implements NL3D::UDriver.

Definition at line 1215 of file driver_user.cpp.

References NL3D::IDriver::getWindowPos(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, uint32, x, and y.

01216 {
01217         NL3D_MEM_DRIVER
01218         NL3D_HAUTO_UI_DRIVER;
01219         
01220         _Driver->getWindowPos (x, y);
01221 }

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

Get the width and the height of the window.

Implements NL3D::UDriver.

Definition at line 1190 of file driver_user.cpp.

References NL3D::IDriver::getWindowSize(), height, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, uint32, and width.

01191 {
01192         NL3D_MEM_DRIVER
01193         NL3D_HAUTO_UI_DRIVER;
01194 
01195         _Driver->getWindowSize (width, height);
01196 }

uint NL3D::CDriverUser::getWindowWidth  )  [virtual]
 

Get the width of the window.

Implements NL3D::UDriver.

Definition at line 1197 of file driver_user.cpp.

References NL3D::IDriver::getWindowSize(), height, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, uint, uint32, and width.

01198 {
01199         NL3D_MEM_DRIVER
01200         NL3D_HAUTO_UI_DRIVER;
01201 
01202         uint32 width, height;
01203         _Driver->getWindowSize (width, height);
01204         return width;
01205 }

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 1237 of file driver_user.cpp.

References NL3D::IDriver::getZBuffer(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01238 {
01239         NL3D_MEM_DRIVER
01240         NL3D_HAUTO_UI_DRIVER;
01241 
01242         _Driver->getZBuffer (zbuffer) ;
01243 }

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 1251 of file driver_user.cpp.

References NL3D::IDriver::getZBufferPart(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

01252 {
01253         NL3D_MEM_DRIVER
01254         NL3D_HAUTO_UI_DRIVER;
01255 
01256         _Driver->getZBufferPart (zbuffer, rect) ;
01257 }

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 323 of file driver_user.cpp.

References NL3D::IDriver::isActive(), NL3D_HAUTO_UI_DRIVER, and NL3D_MEM_DRIVER.

00324 {
00325         NL3D_MEM_DRIVER
00326         NL3D_HAUTO_UI_DRIVER;
00327 
00328         return _Driver->isActive();
00329 }

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 1393 of file driver_user.cpp.

References _AsyncTextureManager, NL3D::CHLSTextureManager::addBank(), NL3D::CAsyncTextureManager::HLSManager, NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, NLMISC::CIFile::open(), and NLMISC::IStream::serial().

01394 {
01395         NL3D_MEM_DRIVER
01396         NL3D_HAUTO_TEX_DRIVER;
01397         
01398         // load it.
01399         CHLSTextureBank                 *hlsBank= new CHLSTextureBank;
01400         try
01401         {
01402                 std::string     path= CPath::lookup(fileName);
01403                 CIFile  fIn;
01404                 if(!fIn.open(path))
01405                         throw EPathNotFound(path);
01406                 fIn.serial(*hlsBank);
01407         }
01408         catch(Exception &)
01409         {
01410                 delete hlsBank;
01411                 throw;
01412         }
01413 
01414         // add it to the manager.
01415         _AsyncTextureManager.HLSManager.addBank(hlsBank);
01416 }

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 183 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, NL3D::IDriver::profileAllocatedTextureMemory(), and uint32.

00184 {
00185         NL3D_MEM_DRIVER
00186 
00187         return _Driver->profileAllocatedTextureMemory();
00188 }

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 174 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, and NL3D::IDriver::profileRenderedPrimitives().

00175 {
00176         NL3D_MEM_DRIVER
00177 
00178         _Driver->profileRenderedPrimitives(pIn, pOut);
00179 }

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

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

Implements NL3D::UDriver.

Definition at line 192 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, NL3D::IDriver::profileSetupedMaterials(), and uint32.

00193 {
00194         NL3D_MEM_DRIVER
00195 
00196         return _Driver->profileSetupedMaterials();
00197 }

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

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

Implements NL3D::UDriver.

Definition at line 201 of file driver_user2.cpp.

References NL3D_MEM_DRIVER, NL3D::IDriver::profileSetupedModelMatrix(), and uint32.

00202 {
00203         NL3D_MEM_DRIVER
00204         return _Driver->profileSetupedModelMatrix();
00205 }

void NL3D::CDriverUser::profileVBHardAllocation std::vector< std::string > &  result  )  [virtual]
 

display VBhards allocated

Implements NL3D::UDriver.

Definition at line 237 of file driver_user2.cpp.

References NL3D::IDriver::profileVBHardAllocation().

00238 {
00239         _Driver->profileVBHardAllocation(result);
00240 }

void NL3D::UDriver::purgeMemory  )  [static, inherited]
 

Purge static memory

Definition at line 106 of file driver_user.cpp.

References NL3D::GetWaterPoolManager(), NL3D_MEM_DRIVER, and NL3D::CWaterPoolManager::reset().

00107 {
00108         NL3D_MEM_DRIVER
00109         CPointLight::purge ();
00110         GetWaterPoolManager().reset();
00111         contReset(CLandscapeGlobals::PassTriArray);
00112 }

void NL3D::CDriverUser::release  )  [virtual]
 

Release the window.

Implements NL3D::UDriver.

Definition at line 285 of file driver_user.cpp.

References _Materials, _MatFlat, _MatText, _Scenes, _TextContexts, _Textures, _WindowInit, NL3D::CPtrSet< T >::clear(), NL3D::IDriver::getEventEmitter(), NL3D::CMaterialUser::initUnlit(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::release(), NLMISC::CEventServer::removeEmitter(), and NLMISC::CEventListenerAsync::removeFromServer().

Referenced by ~CDriverUser().

00286 {
00287         NL3D_MEM_DRIVER
00288         NL3D_HAUTO_UI_DRIVER;
00289 
00290         if(!_WindowInit)
00291                 return;
00292 
00293         // 2D Material.
00294         _MatFlat.initUnlit();
00295         _MatText.initUnlit();
00296 
00297         // delete Texture, mat ... list.
00298         _Textures.clear();
00299         _Materials.clear();
00300         _TextContexts.clear();
00301         _Scenes.clear();
00302 
00303         // release event.
00304         AsyncListener.removeFromServer(EventServer);
00305         EventServer.removeEmitter(_Driver->getEventEmitter());
00306 
00307         // release window.
00308         _Driver->release();
00309         _WindowInit= false;
00310 }

void NL3D::CDriverUser::restoreMatrixContext  )  [inline]
 

Definition at line 467 of file driver_user.h.

References NL3D_MEM_DRIVER, and setupMatrixContext().

Referenced by NL3D::CTextContextUser::printAt(), NL3D::CTextContextUser::printfAt(), NL3D::CSceneUser::render(), and NL3D::CTextContextUser::render3D().

00468         {
00469                 NL3D_MEM_DRIVER
00470                 setupMatrixContext();
00471         }

void NL3D::CDriverUser::restoreMatrixContextMatrixOnly  ) 
 

Definition at line 351 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CFrustum::Bottom, NL3D::CFrustum::Far, NL3D::CDriverUser::CMatrixContext::Frustum, NL3D::CFrustum::Left, NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D::CFrustum::Near, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NL3D::CFrustum::Perspective, NL3D::CFrustum::Right, NL3D::IDriver::setFrustum(), NL3D::IDriver::setupModelMatrix(), NL3D::IDriver::setupViewMatrix(), NL3D::CFrustum::Top, and NL3D::CDriverUser::CMatrixContext::ViewMatrix.

Referenced by NL3D::CTextContextUser::flushRenderBuffer().

00352 {
00353         NL3D_MEM_DRIVER
00354         NL3D_HAUTO_UI_DRIVER;
00355         
00356         CFrustum        &f= _CurrentMatrixContext.Frustum;
00357         _Driver->setFrustum(f.Left, f.Right, f.Bottom, f.Top, f.Near, f.Far, f.Perspective);
00358         _Driver->setupViewMatrix(_CurrentMatrixContext.ViewMatrix);
00359         _Driver->setupModelMatrix(_CurrentMatrixContext.ModelMatrix);
00360 }

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

Implements NL3D::UDriver.

Definition at line 1066 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::IDriver::setAmbientColor().

01067 {
01068         NL3D_MEM_DRIVER
01069         NL3D_HAUTO_UI_DRIVER;
01070 
01071         _Driver->setAmbientColor (color);
01072 }

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 1316 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::IDriver::setCapture().

01317 {
01318         NL3D_MEM_DRIVER
01319         NL3D_HAUTO_UI_DRIVER;
01320 
01321         _Driver->setCapture (b);
01322 }

bool NL3D::CDriverUser::setDisplay const CMode &  mode,
bool  show
[virtual]
 

create the window.

Implements NL3D::UDriver.

Definition at line 230 of file driver_user.cpp.

References _CurrentMatrixContext, _MatFlat, _MatText, _WindowInit, activate(), NLMISC::CEventServer::addEmitter(), NLMISC::CEventListenerAsync::addToServer(), NL3D::IDriver::getEventEmitter(), NL3D::CScissor::initFullScreen(), NL3D::CViewport::initFullScreen(), NL3D::CMaterialUser::initUnlit(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, nlverify, NLMISC::CEventListenerAsync::reset(), NL3D::CDriverUser::CMatrixContext::Scissor, NL3D::IDriver::setDisplay(), NL3D::UDriver::setMatrixMode2D11(), NL3D::CMaterialUser::setZFunc(), NL3D::CMaterialUser::setZWrite(), and NL3D::CDriverUser::CMatrixContext::Viewport.

00231 {
00232         NL3D_MEM_DRIVER
00233         NL3D_HAUTO_UI_DRIVER;
00234 
00235         // window init.
00236         if (_Driver->setDisplay(NULL, GfxMode(mode.Width, mode.Height, mode.Depth, mode.Windowed, false, mode.Frequency), show))
00237         {
00238                 // Always true
00239                 nlverify (activate());
00240 
00241                 _WindowInit= true;
00242 
00243                 // Event init.
00244                 AsyncListener.reset ();
00245                 EventServer.addEmitter(_Driver->getEventEmitter());
00246                 AsyncListener.addToServer(EventServer);
00247 
00248                 // Matrix Context (2D).
00249                 _CurrentMatrixContext.Viewport.initFullScreen();
00250                 _CurrentMatrixContext.Scissor.initFullScreen();
00251                 setMatrixMode2D11();
00252 
00253                 // 2D Material.
00254                 _MatFlat.initUnlit();
00255                 _MatFlat.setZFunc(UMaterial::always);
00256                 _MatFlat.setZWrite(false);
00257                 _MatText.initUnlit();
00258                 _MatText.setZFunc(UMaterial::always);
00259                 _MatText.setZWrite(false);
00260 
00261                 // Done
00262                 return true;
00263         }
00264         return false;
00265 }

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

Set the maxMemory used for the FontManager.

Implements NL3D::UDriver.

Definition at line 103 of file driver_user2.cpp.

References _FontManager, NL3D_MEM_DRIVER, NL3D::CFontManager::setMaxMemory(), and uint.

00104 {
00105         NL3D_MEM_DRIVER
00106 
00107         _FontManager.setMaxMemory(maxMem);
00108 }

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

Set the active Frustum for rendering.

Implements NL3D::UDriver.

Definition at line 410 of file driver_user.cpp.

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

Referenced by setMatrixMode3D().

00411 {
00412         NL3D_MEM_DRIVER
00413         NL3D_HAUTO_UI_DRIVER;
00414 
00415         _CurrentMatrixContext.Frustum= frust;
00416         setupMatrixContext();
00417 }

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

Implements NL3D::UDriver.

Definition at line 1049 of file driver_user.cpp.

References NL3D::CLightUser::_Light, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, num, NL3D::IDriver::setLight(), and uint8.

01050 {
01051         NL3D_MEM_DRIVER
01052         NL3D_HAUTO_UI_DRIVER;
01053 
01054         CLightUser      *plight= (CLightUser*)&light;
01055         _Driver->setLight (num, plight->_Light);
01056 }

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 464 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CDriverUser::CMatrixContext::Frustum, NLMISC::CMatrix::identity(), NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NLMISC::CMatrix::setRot(), setupMatrixContext(), and NL3D::CDriverUser::CMatrixContext::ViewMatrix.

00465 {
00466         NL3D_MEM_DRIVER
00467         NL3D_HAUTO_UI_DRIVER;
00468 
00469         _CurrentMatrixContext.Frustum= frust;
00470         // We still work in NL3D coordinates, so must convert y to z.
00471         CVector         I(1,0,0);
00472         CVector         J(0,0,1);
00473         CVector         K(0,-1,0);
00474 
00475         _CurrentMatrixContext.ViewMatrix.identity();
00476         _CurrentMatrixContext.ViewMatrix.setRot(I,J,K, true);
00477         _CurrentMatrixContext.ModelMatrix.identity();
00478 
00479         setupMatrixContext();
00480 }

void NL3D::UDriver::setMatrixMode2D11  )  [inherited]
 

Tool function: same as setMatrixMode2D(), using a CFrustum(0,1,0,1,-1,1,false).

Definition at line 84 of file driver_user.cpp.

References NL3D_MEM_DRIVER, and NL3D::UDriver::setMatrixMode2D().

Referenced by setDisplay().

00085 {
00086         NL3D_MEM_DRIVER
00087         setMatrixMode2D(CFrustum(0.0f,1.0f,0.0f,1.0f,-1.0f,1.0f,false));
00088 }

void NL3D::UDriver::setMatrixMode2D43  )  [inherited]
 

Tool function: same as setMatrixMode2D(), using a CFrustum(0,4/3,0,1,-1,1,false).

Definition at line 90 of file driver_user.cpp.

References NL3D_MEM_DRIVER, and NL3D::UDriver::setMatrixMode2D().

00091 {
00092         NL3D_MEM_DRIVER
00093         setMatrixMode2D(CFrustum(0.0f,4.0f/3.0f,0.0f,1.0f,-1.0f,1.0f,false));
00094 }

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 482 of file driver_user.cpp.

References NL3D::UCamera::getFrustum(), NL3D::UTransformable::getMatrix(), NLMISC::CMatrix::invert(), NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, setFrustum(), setModelMatrix(), and setViewMatrix().

00483 {
00484         NL3D_MEM_DRIVER
00485         NL3D_HAUTO_UI_DRIVER;
00486 
00487         // Retrieve the matrix and frustum from the camera.
00488         CMatrix         viewMat;
00489         viewMat= camera.getMatrix();
00490         viewMat.invert();
00491         setViewMatrix(viewMat);
00492         setModelMatrix(CMatrix::Identity);
00493         setFrustum(camera.getFrustum());
00494 }

bool NL3D::CDriverUser::setMode const CMode &  mode  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 268 of file driver_user.cpp.

References NL3D::IDriver::setMode().

00269 {
00270         return _Driver->setMode(GfxMode(mode.Width, mode.Height, mode.Depth, mode.Windowed, false, mode.Frequency));
00271 }

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 444 of file driver_user.cpp.

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

Referenced by setMatrixMode3D().

00445 {
00446         NL3D_MEM_DRIVER
00447         NL3D_HAUTO_UI_DRIVER;
00448 
00449         _CurrentMatrixContext.ModelMatrix= mat;
00450         setupMatrixContext();
00451 }

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

Setup monitor color properties.

Return false if setup failed.

Implements NL3D::UDriver.

Definition at line 1146 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::IDriver::setMonitorColorProperties().

01147 {
01148         NL3D_MEM_DRIVER
01149         NL3D_HAUTO_UI_DRIVER;
01150 
01151         return _Driver->setMonitorColorProperties (properties);
01152 }

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 1309 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::setMousePos(), x, and y.

01310 {
01311         NL3D_MEM_DRIVER
01312         NL3D_HAUTO_UI_DRIVER;
01313 
01314         _Driver->setMousePos (x, y);
01315 }

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 1076 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, nlstop, and NL3D::IDriver::setPolygonMode().

01077 {
01078         NL3D_MEM_DRIVER
01079         NL3D_HAUTO_UI_DRIVER;
01080 
01081         IDriver::TPolygonMode   dmode=IDriver::Filled;
01082         switch(mode)
01083         {
01084                 case Filled:    dmode= IDriver::Filled; break;
01085                 case Line:              dmode= IDriver::Line; break;
01086                 case Point:             dmode= IDriver::Point; break;
01087                 default: nlstop;
01088         };
01089         _Driver->setPolygonMode (dmode);
01090 }

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

Set the active scissor for rendering. Default to fullscreen.

Implements NL3D::UDriver.

Definition at line 376 of file driver_user.cpp.

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

00377 {
00378         NL3D_MEM_DRIVER
00379         NL3D_HAUTO_UI_DRIVER;
00380 
00381         _CurrentMatrixContext.Scissor= sc;
00382         setupMatrixContext();
00383 }

void NL3D::CDriverUser::setSwapVBLInterval uint  interval  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 1420 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NL3D::IDriver::setSwapVBLInterval(), and uint.

01421 {
01422         NL3D_MEM_DRIVER
01423         NL3D_HAUTO_UI_DRIVER
01424 
01425         _Driver->setSwapVBLInterval(interval);
01426 }

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

setup the mipMap levels. When the texture is first added, it is loaded skipping the baseLevel first mipmap 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 1333 of file driver_user.cpp.

References _AsyncTextureManager, NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, NL3D::CAsyncTextureManager::setupLod(), and uint.

01334 {
01335         NL3D_MEM_DRIVER
01336         NL3D_HAUTO_TEX_DRIVER;
01337 
01338         _AsyncTextureManager.setupLod(baseLevel, maxLevel);
01339 }

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

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

Implements NL3D::UDriver.

Definition at line 1341 of file driver_user.cpp.

References _AsyncTextureManager, NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, NL3D::CAsyncTextureManager::setupMaxUploadPerFrame(), and uint.

01342 {
01343         NL3D_MEM_DRIVER
01344         NL3D_HAUTO_TEX_DRIVER;
01345         
01346         _AsyncTextureManager.setupMaxUploadPerFrame(maxup);
01347 }

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 1039 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::IDriver::setupFog().

01040 {
01041         NL3D_MEM_DRIVER
01042         NL3D_HAUTO_UI_DRIVER;
01043 
01044         _Driver->setupFog(start, end, color);
01045 }

void NL3D::CDriverUser::setupMatrixContext  )  [protected]
 

Definition at line 363 of file driver_user.cpp.

References _CurrentMatrixContext, NL3D::CFrustum::Bottom, NL3D::CFrustum::Far, NL3D::CDriverUser::CMatrixContext::Frustum, NL3D::CFrustum::Left, NL3D::CDriverUser::CMatrixContext::ModelMatrix, NL3D::CFrustum::Near, NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, NL3D::CFrustum::Perspective, NL3D::CFrustum::Right, NL3D::CDriverUser::CMatrixContext::Scissor, NL3D::IDriver::setFrustum(), NL3D::IDriver::setupModelMatrix(), NL3D::IDriver::setupScissor(), NL3D::IDriver::setupViewMatrix(), NL3D::IDriver::setupViewport(), NL3D::CFrustum::Top, NL3D::CDriverUser::CMatrixContext::ViewMatrix, and NL3D::CDriverUser::CMatrixContext::Viewport.

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

00364 {
00365         NL3D_MEM_DRIVER
00366         NL3D_HAUTO_UI_DRIVER;
00367         
00368         _Driver->setupScissor(_CurrentMatrixContext.Scissor);
00369         _Driver->setupViewport(_CurrentMatrixContext.Viewport);
00370         CFrustum        &f= _CurrentMatrixContext.Frustum;
00371         _Driver->setFrustum(f.Left, f.Right, f.Bottom, f.Top, f.Near, f.Far, f.Perspective);
00372         _Driver->setupViewMatrix(_CurrentMatrixContext.ViewMatrix);
00373         _Driver->setupModelMatrix(_CurrentMatrixContext.ModelMatrix);
00374 }

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 1384 of file driver_user.cpp.

References _AsyncTextureManager, NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, NL3D::CAsyncTextureManager::setupMaxHLSColoringPerFrame(), and uint.

01385 {
01386         NL3D_MEM_DRIVER
01387         NL3D_HAUTO_TEX_DRIVER;
01388         
01389         _AsyncTextureManager.setupMaxHLSColoringPerFrame(maxCol);
01390 }

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

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

Implements NL3D::UDriver.

Definition at line 1359 of file driver_user.cpp.

References _AsyncTextureManager, NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, NL3D::CAsyncTextureManager::setupMaxTotalTextureSize(), and uint.

01360 {
01361         NL3D_MEM_DRIVER
01362         NL3D_HAUTO_TEX_DRIVER;
01363         
01364         _AsyncTextureManager.setupMaxTotalTextureSize(maxText);
01365 }

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 427 of file driver_user.cpp.

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

Referenced by setMatrixMode3D().

00428 {
00429         NL3D_MEM_DRIVER
00430         NL3D_HAUTO_UI_DRIVER;
00431 
00432         _CurrentMatrixContext.ViewMatrix= mat;
00433         setupMatrixContext();
00434 }

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

Set the active viewport for rendering. Default to fullscreen.

Implements NL3D::UDriver.

Definition at line 393 of file driver_user.cpp.

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

00394 {
00395         NL3D_MEM_DRIVER
00396         NL3D_HAUTO_UI_DRIVER;
00397 
00398         _CurrentMatrixContext.Viewport= vp;
00399         setupMatrixContext();
00400 }

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 1302 of file driver_user.cpp.

References NL3D_HAUTO_UI_DRIVER, NL3D_MEM_DRIVER, and NL3D::IDriver::showCursor().

01303 {
01304         NL3D_MEM_DRIVER
01305         NL3D_HAUTO_UI_DRIVER;
01306 
01307         _Driver->showCursor(b);
01308 }

void NL3D::CDriverUser::startProfileVBHardLock  )  [virtual]
 

If the driver support it, enable profile VBHard locks. No-Op if already profiling

Implements NL3D::UDriver.

Definition at line 225 of file driver_user2.cpp.

References NL3D::IDriver::startProfileVBHardLock().

00226 {
00227         _Driver->startProfileVBHardLock();
00228 }

void NL3D::CDriverUser::swapBuffers  )  [virtual]
 

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

Implements NL3D::UDriver.

Definition at line 1013 of file driver_user.cpp.

References NL3D_HAUTO_SWAP_DRIVER, NL3D_MEM_DRIVER, and NL3D::IDriver::swapBuffers().

01014 {
01015         NL3D_MEM_DRIVER
01016         NL3D_HAUTO_SWAP_DRIVER;
01017 
01018         _Driver->swapBuffers();
01019 }

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 964 of file driver_user.cpp.

References NL3D_MEM_DRIVER, NL3D::IDriver::systemMessageBox(), type, and uint32.

00965 {
00966         NL3D_MEM_DRIVER
00967 
00968         IDriver::TMessageBoxId          dret;
00969         IDriver::TMessageBoxType        dtype= (IDriver::TMessageBoxType)(uint32)type;
00970         IDriver::TMessageBoxIcon        dicon= (IDriver::TMessageBoxIcon)(uint32)icon;
00971         dret= _Driver->systemMessageBox (message, title, dtype, dicon);
00972 
00973         return (UDriver::TMessageBoxId)(uint32)dret;
00974 }

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 1349 of file driver_user.cpp.

References _AsyncTextureManager, getDriver(), NL3D_HAUTO_TEX_DRIVER, NL3D_MEM_DRIVER, and NL3D::CAsyncTextureManager::update().

01350 {
01351         NL3D_MEM_DRIVER
01352         NL3D_HAUTO_TEX_DRIVER;
01353         
01354         _AsyncTextureManager.update(getDriver());
01355 }


Field Documentation

CAsyncTextureManager NL3D::CDriverUser::_AsyncTextureManager [protected]
 

Definition at line 97 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(), restoreMatrixContextMatrixOnly(), setDisplay(), setFrustum(), setMatrixMode2D(), setModelMatrix(), setScissor(), setupMatrixContext(), setViewMatrix(), and setViewport().

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

Definition at line 78 of file driver_user.h.

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 99 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 111 of file driver_user.h.

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

CMaterialUser NL3D::CDriverUser::_MatText [protected]
 

Definition at line 112 of file driver_user.h.

Referenced by drawBitmap(), release(), and setDisplay().

CVertexStreamManager NL3D::CDriverUser::_MeshSkinManager [protected]
 

Definition at line 93 of file driver_user.h.

Referenced by createScene().

CPrimitiveBlock NL3D::CDriverUser::_PBLine [protected]
 

Definition at line 106 of file driver_user.h.

Referenced by CDriverUser(), and drawLine().

CPrimitiveBlock NL3D::CDriverUser::_PBQuad [protected]
 

Definition at line 106 of file driver_user.h.

Referenced by CDriverUser(), and drawQuad().

CPrimitiveBlock NL3D::CDriverUser::_PBTri [protected]
 

Definition at line 106 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().

CVertexStreamManager NL3D::CDriverUser::_ShadowMeshSkinManager [protected]
 

Definition at line 95 of file driver_user.h.

Referenced by createScene().

CShapeBankUser NL3D::CDriverUser::_ShapeBank [protected]
 

Definition at line 91 of file driver_user.h.

Referenced by CDriverUser(), createScene(), and getShapeBank().

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

Definition at line 123 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 103 of file driver_user.h.

Referenced by CDriverUser(), drawLine(), drawQuad(), and drawTriangle().

CVertexBuffer NL3D::CDriverUser::_VBColorUv [protected]
 

Definition at line 105 of file driver_user.h.

Referenced by CDriverUser(), drawLine(), drawQuad(), and drawTriangle().

CVertexBuffer NL3D::CDriverUser::_VBFlat [protected]
 

Definition at line 102 of file driver_user.h.

Referenced by CDriverUser(), drawLine(), drawQuad(), and drawTriangle().

CVertexBuffer NL3D::CDriverUser::_VBQuadsColUv [protected]
 

Definition at line 108 of file driver_user.h.

Referenced by CDriverUser(), and drawQuads().

CVertexBuffer NL3D::CDriverUser::_VBQuadsColUv2 [protected]
 

Definition at line 109 of file driver_user.h.

Referenced by CDriverUser(), and drawQuads().

CVertexBuffer NL3D::CDriverUser::_VBUv [protected]
 

Definition at line 104 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().

NLMISC::CEventListenerAsync NL3D::UDriver::AsyncListener [inherited]
 

The AsyncListener of this driver. Init after setDisplay()!!

Definition at line 142 of file u_driver.h.

NLMISC::CEventServer NL3D::UDriver::EventServer [inherited]
 

The EventServer of this driver. Init after setDisplay()!!

Definition at line 140 of file u_driver.h.


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 06:46:22 2004 for NeL by doxygen 1.3.6