#include <driver.h>
Inheritance diagram for NL3D::IDriver:
Vertex program interface | |
enum | TMatrix { ModelView = 0, Projection, ModelViewProjection, NumMatrix } |
enum | TTransform { Identity = 0, Inverse, Transpose, InverseTranspose, NumTransform } |
virtual bool | activeVertexProgram (CVertexProgram *program)=0 |
virtual void | enableVertexProgramDoubleSidedColor (bool doubleSided)=0 |
virtual bool | isVertexProgramEmulated () const=0 |
virtual bool | isVertexProgramSupported () const=0 |
virtual void | setConstant (uint index, uint num, const double *src)=0 |
setup several 4 double csts taken from the given tab | |
virtual void | setConstant (uint index, uint num, const float *src)=0 |
setup several 4 float csts taken from the given tab | |
virtual void | setConstant (uint index, const NLMISC::CVectorD &value)=0 |
virtual void | setConstant (uint index, const NLMISC::CVector &value)=0 |
virtual void | setConstant (uint index, double, double, double, double)=0 |
virtual void | setConstant (uint index, float, float, float, float)=0 |
virtual void | setConstantMatrix (uint index, TMatrix matrix, TTransform transform)=0 |
virtual bool | supportCloudRenderSinglePass () const=0 |
virtual bool | supportVertexProgramDoubleSidedColor () const=0 |
Check if the driver support double sided colors vertex programs. | |
Public Types | |
enum | TMatrixCount { MaxModelMatrix = 16 } |
enum | TMessageBoxIcon { noIcon = 0, handIcon, questionIcon, exclamationIcon, asteriskIcon, warningIcon, errorIcon, informationIcon, stopIcon, iconCount } |
enum | TMessageBoxId { okId = 0, yesId, noId, abortId, retryId, cancelId, ignoreId, idCount } |
enum | TMessageBoxType { okType = 0, okCancelType, yesNoType, abortRetryIgnoreType, yesNoCancelType, retryCancelType, typeCount } |
enum | TPolygonMode { Filled = 0, Line, Point } |
enum | TVBHardType { VBHardAGP = 0, VBHardVRAM, CountVBHard } |
Public Member Functions | |
virtual bool | activate (void)=0 |
Before rendering via a driver in a thread, must activate() (per thread). | |
virtual bool | activeVertexBuffer (CVertexBuffer &VB, uint first, uint end)=0 |
virtual bool | activeVertexBuffer (CVertexBuffer &VB)=0 |
virtual void | activeVertexBufferHard (IVertexBufferHard *VB)=0 |
virtual bool | clear2D (CRGBA rgba)=0 |
virtual bool | clearZBuffer (float zval=1)=0 |
virtual void | copyFrameBufferToTexture (ITexture *tex, uint32 level, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height)=0 |
virtual IVertexBufferHard * | createVertexBufferHard (uint16 vertexFormat, const uint8 *typeArray, uint32 numVertices, TVBHardType vbType, const uint8 *uvRouting)=0 |
virtual void | deleteVertexBufferHard (IVertexBufferHard *VB)=0 |
virtual void | enableLight (uint8 num, bool enable=true)=0 |
virtual void | endSpecularBatch ()=0 |
virtual ModeList | enumModes ()=0 |
virtual bool | fillBuffer (CBitmap &bitmap)=0 |
virtual void | forceDXTCCompression (bool dxtcComp)=0 |
virtual void | forceNormalize (bool normalize)=0 |
virtual void | forceTextureResize (uint divisor)=0 |
virtual uint32 | getAvailableVertexAGPMemory ()=0 |
virtual uint32 | getAvailableVertexVRAMMemory ()=0 |
virtual uint8 | getBitPerPixel ()=0 |
Return the depth of the driver after init(). | |
virtual void | getBuffer (CBitmap &bitmap)=0 |
virtual void | getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)=0 |
virtual void * | getDisplay ()=0 |
virtual const char * | getDriverInformation ()=0 |
virtual NLMISC::IEventEmitter * | getEventEmitter (void)=0 |
virtual uint32 | getImplementationVersion () const=0 |
virtual uint | getMaxLight () const=0 |
virtual uint | getMaxVerticesByVertexBufferHard () const=0 |
virtual bool | getModes (std::vector< GfxMode > &modes)=0 |
virtual sint | getNbTextureStages () const=0 |
Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay(). | |
TPolygonMode | getPolygonMode () |
const sint & | getRefCount () const |
virtual uint | getSwapVBLInterval ()=0 |
get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL | |
virtual uint | getTextureHandle (const ITexture &tex)=0 |
virtual const char * | getVideocardInformation ()=0 |
virtual CMatrix | getViewMatrix (void) const=0 |
virtual void | getViewport (CViewport &viewport)=0 |
virtual void | getWindowPos (uint32 &x, uint32 &y)=0 |
Get the position of the window always (0,0) in fullscreen. | |
virtual emptyProc | getWindowProc ()=0 |
virtual void | getWindowSize (uint32 &width, uint32 &height)=0 |
Get the width and the height of the window. | |
virtual void | getZBuffer (std::vector< float > &zbuffer)=0 |
virtual void | getZBufferPart (std::vector< float > &zbuffer, NLMISC::CRect &rect)=0 |
IDriver (void) | |
virtual bool | init (uint windowIcon=0)=0 |
virtual bool | initVertexArrayRange (uint agpMem, uint vramMem=0)=0 |
bool | invalidateShareTexture (ITexture &) |
virtual bool | isActive ()=0 |
Return true if driver is still active. Return false else. If he user close the window, must return false. | |
virtual bool | isForceNormalize () const=0 |
virtual bool | isTextureExist (const ITexture &tex)=0 |
virtual void | mapTextureStageToUV (uint stage, uint uv)=0 |
virtual void | multiplyModelMatrix (const CMatrix &mtx)=0 |
virtual bool | release (void) |
Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers). | |
virtual bool | render (CPrimitiveBlock &PB, CMaterial &Mat)=0 |
virtual void | renderOrientedQuads (CMaterial &Mat, uint32 startIndex, uint32 numQuads)=0 |
virtual void | renderPoints (CMaterial &Mat, uint32 numPoints)=0 |
virtual void | renderQuads (CMaterial &Mat, uint32 startIndex, uint32 numQuads)=0 |
virtual void | renderSimpleTriangles (uint32 *tri, uint32 ntris)=0 |
virtual void | renderTriangles (CMaterial &Mat, uint32 *tri, uint32 ntris)=0 |
virtual void | setAmbientColor (CRGBA color)=0 |
virtual void | setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)=0 |
Set the color mask filter through where the operation done will pass. | |
virtual bool | setDisplay (void *wnd, const GfxMode &mode, bool show=true)=0 throw (EBadDisplay) |
virtual void | setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true)=0 |
virtual void | setLight (uint8 num, const CLight &light)=0 |
virtual bool | setMode (const GfxMode &mode)=0 |
virtual bool | setMonitorColorProperties (const CMonitorColorProperties &properties)=0 |
virtual void | setPerPixelLightingLight (CRGBA diffuse, CRGBA specular, float shininess)=0 |
virtual void | setPolygonMode (TPolygonMode mode) |
virtual void | setSwapVBLInterval (uint interval)=0 |
virtual bool | setupMaterial (CMaterial &mat)=0 |
virtual void | setupModelMatrix (const CMatrix &mtx)=0 |
virtual void | setupScissor (const class CScissor &scissor)=0 |
virtual bool | setupTexture (ITexture &tex)=0 |
virtual bool | setupTextureEx (ITexture &tex, bool bUpload, bool &bAllUploaded, bool bMustRecreateSharedTexture=false)=0 |
virtual void | setupViewMatrix (const CMatrix &mtx)=0 |
virtual void | setupViewMatrixEx (const CMatrix &mtx, const CVector &cameraPos)=0 |
virtual void | setupViewport (const class CViewport &viewport)=0 |
virtual bool | slowUnlockVertexBufferHard () const=0 |
virtual void | startSpecularBatch ()=0 |
virtual bool | supportPerPixelLighting (bool specular) const=0 |
virtual bool | supportVertexBufferHard () const=0 |
virtual bool | swapBuffers (void)=0 |
Swap the back and front buffers. | |
virtual void | swapTextureHandle (ITexture &tex0, ITexture &tex1)=0 |
virtual TMessageBoxId | systemMessageBox (const char *message, const char *title, TMessageBoxType type=okType, TMessageBoxIcon icon=noIcon) |
virtual bool | uploadTexture (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap)=0 |
virtual bool | uploadTextureCube (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap, uint8 nNumFace)=0 |
virtual | ~IDriver (void) |
Material multipass. | |
virtual sint | beginMaterialMultiPass ()=0 |
init multipass for _CurrentMaterial. return number of pass required to render this material. | |
virtual void | endMaterialMultiPass ()=0 |
end multipass for this material. | |
virtual void | setupMaterialPass (uint pass)=0 |
active the ith pass of this material. | |
Disable Hardware Feature | |
virtual void | disableHardwareTextureShader ()=0 |
virtual void | disableHardwareVertexArrayAGP ()=0 |
virtual void | disableHardwareVertexProgram ()=0 |
Fog support. | |
virtual void | enableFog (bool enable)=0 |
virtual bool | fogEnabled ()=0 |
virtual CRGBA | getFogColor () const=0 |
virtual float | getFogEnd () const=0 |
virtual float | getFogStart () const=0 |
Get. | |
virtual void | setupFog (float start, float end, CRGBA color)=0 |
setup fog parameters. fog must enabled to see result. start and end are in [0,1] range. | |
Mouse / Keyboard / Game devices | |
virtual NLMISC::IKeyboardDevice * | enableLowLevelKeyboard (bool enable)=0 |
virtual NLMISC::IMouseDevice * | enableLowLevelMouse (bool enable, bool exclusive)=0 |
virtual uint | getDoubleClickDelay (bool hardwareMouse)=0 |
virtual NLMISC::IInputDeviceManager * | getLowLevelInputDeviceManager ()=0 |
virtual void | setCapture (bool b)=0 |
virtual void | setMousePos (float x, float y)=0 |
x and y must be between 0.0 and 1.0 | |
virtual void | showCursor (bool b)=0 |
show cursor if b is true, or hide it if b is false | |
Misc | |
virtual void | enablePolygonSmoothing (bool smooth)=0 |
virtual void | finish ()=0 |
virtual NLMISC::CRGBA | getBlendConstantColor () const=0 |
virtual bool | isPolygonSmoothingEnabled () const=0 |
see enablePolygonSmoothing() | |
virtual void | setBlendConstantColor (NLMISC::CRGBA col)=0 |
virtual bool | supportBlendConstantColor () const=0 |
Profiling. | |
virtual void | enableUsedTextureMemorySum (bool enable=true)=0 |
virtual void | endProfileVBHardLock (std::vector< std::string > &result)=0 |
virtual uint32 | getUsedTextureMemory () const=0 |
virtual uint32 | profileAllocatedTextureMemory ()=0 |
virtual void | profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut)=0 |
virtual uint32 | profileSetupedMaterials () const=0 |
virtual uint32 | profileSetupedModelMatrix () const=0 |
virtual void | profileVBHardAllocation (std::vector< std::string > &result)=0 |
virtual void | startProfileVBHardLock ()=0 |
EMBM support. If texture shaders are present, this is not available, must use them instead. | |
EMBM is a color op of CMaterial. NB : EMBM is the equivalent of the CMaterial::OffsetTexture addressing mode. However, it is both a texture adressing mode and a color op. NB : EMBM may not be supported by all stages. | |
virtual bool | isEMBMSupportedAtStage (uint stage) const=0 |
virtual void | setEMBMMatrix (const uint stage, const float mat[4])=0 |
virtual bool | supportEMBM () const=0 |
Texture addressing modes aka textures/pixels shaders | |
virtual bool | isTextureAddrModeSupported (CMaterial::TTexAddressingMode mode) const=0 |
test wether a texture addressing mode is supported | |
virtual bool | isWaterShaderSupported () const=0 |
test wether a texture addressing mode is supported | |
virtual void | setMatrix2DForTextureOffsetAddrMode (const uint stage, const float mat[4])=0 |
virtual bool | supportTextureShaders () const=0 |
test wether the device supports some form of texture shader. (could be limited to DX6 EMBM for example) | |
Static Public Member Functions | |
void | getTextureShareName (const ITexture &tex, std::string &output) |
Data Fields | |
sint | crefs |
CPtrInfo * | pinfo |
Static Public Attributes | |
const uint32 | InterfaceVersion = 0x4e |
Version of the driver interface. To increment when the interface change. | |
CPtrInfo | NullPtrInfo |
Protected Member Functions | |
void | removeShaderPtr (ItShaderPtrList shaderIt) |
void | removeTextureDrvInfoPtr (ItTexDrvInfoPtrMap texDrvInfoIt) |
void | removeTextureDrvSharePtr (ItTexDrvSharePtrList texDrvShareIt) |
void | removeVBDrvInfoPtr (ItVBDrvInfoPtrList vbDrvInfoIt) |
remove ptr from the lists in the driver. | |
void | removeVtxPrgDrvInfoPtr (ItVtxPrgDrvInfoPtrList vtxPrgDrvInfoIt) |
Protected Attributes | |
TPolygonMode | _PolygonMode |
TShaderPtrList | _Shaders |
CSynchronized< TTexDrvInfoPtrMap > | _SyncTexDrvInfos |
TTexDrvSharePtrList | _TexDrvShares |
TVBDrvInfoPtrList | _VBDrvInfos |
TVtxPrgDrvInfoPtrList | _VtxPrgDrvInfos |
Friends | |
struct | CPtrInfo |
class | CTextureDrvShare |
class | IShader |
class | ITextureDrvInfos |
class | IVBDrvInfos |
class | IVertexProgramDrvInfos |
|
Definition at line 825 of file driver.h.
00826 { 00827 ModelView= 0, 00828 Projection, 00829 ModelViewProjection, 00830 NumMatrix 00831 }; |
|
Driver Max matrix count. Kept for backward compatibility. Suppose any Hardware VertexProgram can handle only 16 matrix Definition at line 148 of file driver.h.
00148 { MaxModelMatrix= 16 }; |
|
Definition at line 133 of file driver.h.
00133 { noIcon=0, handIcon, questionIcon, exclamationIcon, asteriskIcon, warningIcon, errorIcon, informationIcon, stopIcon, iconCount }; |
|
Definition at line 131 of file driver.h.
|
|
Definition at line 132 of file driver.h.
00132 { okType=0, okCancelType, yesNoType, abortRetryIgnoreType, yesNoCancelType, retryCancelType, typeCount }; |
|
Driver's polygon modes.
Definition at line 140 of file driver.h. Referenced by getPolygonMode().
|
|
Definition at line 833 of file driver.h.
00834 { 00835 Identity=0, 00836 Inverse, 00837 Transpose, 00838 InverseTranspose, 00839 NumTransform 00840 }; |
|
Driver VertexBufferHard type.
Definition at line 155 of file driver.h.
00155 { VBHardAGP=0, VBHardVRAM, CountVBHard }; |
|
Definition at line 49 of file driver.cpp. References _PolygonMode, and Filled.
00049 : _SyncTexDrvInfos( "IDriver::_SyncTexDrvInfos" ) 00050 { 00051 _PolygonMode= Filled; 00052 } |
|
Definition at line 55 of file driver.cpp. References _Shaders, _SyncTexDrvInfos, _TexDrvShares, _VBDrvInfos, _VtxPrgDrvInfos, and nlassert.
00056 { 00057 // Must clean up everything before closing driver. 00058 // Must doing this in release(), so assert here if not done... 00059 { 00060 CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos); 00061 TTexDrvInfoPtrMap &rTexDrvInfos = access.value(); 00062 nlassert( rTexDrvInfos.size() == 0 ); 00063 } 00064 00065 nlassert(_TexDrvShares.size()==0); 00066 nlassert(_Shaders.size()==0); 00067 nlassert(_VBDrvInfos.size()==0); 00068 nlassert(_VtxPrgDrvInfos.size()==0); 00069 } |
|
Before rendering via a driver in a thread, must activate() (per thread).
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::activate(). |
|
active a current VB, for future render(). This method suppose that only vertices in given range will be used in future render(). This could be usefull for DX or OpenGL driver. Undefined results if primitives in render() use vertices not in this range. NB: please make sure you have setuped / unsetuped the current vertex program BEFORE activate the vertex buffer.
Implemented in NL3D::CDriverGL. |
|
|
active a current VB Hard, for future render(). NB: please make sure you have setuped / unsetuped the current vertex program BEFORE activate the vertex buffer.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshMRMGeom::beginMesh(), NL3D::CMeshGeom::beginMesh(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshGeom::renderSkin(), and NL3D::CMeshVPPerPixelLight::setupForMaterial(). |
|
Activate / disactivate a vertex program
Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPWindTree::beginMBRInstance(), NL3D::CMeshVPWindTree::beginMBRMesh(), NL3D::CWaterModel::doSimpleRender(), NL3D::CMeshVPPerPixelLight::enable(), NL3D::CMeshVPWindTree::end(), NL3D::CMeshVPWindTree::endMBRMesh(), NL3D::CVegetableManager::exitRenderStateForBlendLayerModel(), NL3D::CVegetableManager::render(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CVegetableManager::setupRenderStateForBlendLayerModel(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender(). |
|
init multipass for _CurrentMaterial. return number of pass required to render this material. NB: setupMaterial() must be called before thoses methods. NB: This is intended to be use with the rendering of simple primitives. NB: Other render calls performs the needed setup automatically Implemented in NL3D::CDriverGL. Referenced by NL3D::CWaterModel::traverseRender(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::clearBuffers(), NL3D::CDriverUser::clearRGBABuffer(), and NL3D::CShadowMapManager::renderGenerate(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::clearBuffers(), and NL3D::CDriverUser::clearZBuffer(). |
|
Copy a portion of the FrameBuffer into a texture. The texture must have been right sized before the call. This mark the texture as valid, but doesn't copy data to system memory. This also mean that regenerating texture datas will erase what has been copied before in the device memory. This doesn't work with compressed textures. Ideally, the FrameBuffer should have the same format than the texture.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::copyScreenToBlurTexture(), NL3D::CDeform2d::doDeform(), NL3D::CCloud::genBill(), NL3D::CCloud::generate(), NL3D::CCloud::light(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CShadowMapManager::renderGenerate(), and NL3D::CCloud::reset(). |
|
create a IVertexBufferHard. delete it with deleteVertexBufferHard. NB: user should (must) keep a CRefPtr<> on this ptr, because if driver is deleted (for any reason) the pointer will be no longer valid. NB: return NULL if driver do not support the requested VertexBufferHard.Reason for failures are:
|
|
delete a IVertexBufferHard. NB: VertexBufferHard are automatically deleted at IDriver::release(); Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::disableHardwareTextureShader(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::disableHardwareVertexArrayAGP(). |
|
Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::disableHardwareVertexProgram(). |
|
|
Enable / disable light. You must call setLight() if you active the ligth.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CRenderTrav::changeLightSetup(), NL3D::CDriverUser::enableLight(), and NL3D::CRenderTrav::resetLightSetup(). |
|
Enable / disable a low level keyboard. Such a keyboard can only send KeyDown and KeyUp event. It just consider the keyboard as a gamepad with lots of buttons... 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 Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::enableLowLevelKeyboard(). |
|
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.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::enableLowLevelMouse(). |
|
Use AntiAliasing For polygons (GL_POLYGON_SMOOTH like, not the FSAA). See GL_POLYGON_SMOOTH help, and GL_SRC_ALPHA_SATURATE OpenGL doc (not yet implemented now since used only for alpha part in ShadowMap gen) Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::renderGenerate(). |
|
Enable the sum of texture memory used since last swapBuffers() call. To retrieve the memory used call getUsedTextureMemory(). Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::enableUsedTextureMemorySum(). |
|
Activate VertexProgram 2Sided Color mode. In 2Sided mode, the BackFace (if material 2Sided enabled) read the result from o[BFC0], and not o[COL0]. default is false. you should reset to false after use. NB: no-op if not supporte by driver Implemented in NL3D::CDriverGL. |
|
end multipass for this material.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CWaterModel::traverseRender(). |
|
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. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::endProfileVBHardLock(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CSkeletonModel::renderSkinList(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::enumModes(). |
|
fill the RGBA back buffer
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::fillBuffer(). |
|
force the driver to flush all command. glFinish() in opengl. Interesting only for debug and profiling purpose. Implemented in NL3D::CDriverGL. |
|
|
if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed. Do this only during upload if ITexture::allowDegradation() is true and if ITexture::UploadFormat is "Automatic" and if bitmap format is RGBA. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::forceDXTCCompression(). |
|
Force input normal to be normalized by the driver. default is false. NB: driver force the normalisation himself if:
Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshMRMGeom::beginMesh(), NL3D::CMeshMRMGeom::endMesh(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), and NL3D::CSkeletonModel::renderSkins(). |
|
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 Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::forceTextureResize(). |
|
Return the amount of AGP memory allocated by initVertexArrayRange() to store vertices. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getAvailableVertexAGPMemory(). |
|
Return the amount of video memory allocated by initVertexArrayRange() to store vertices. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getAvailableVertexVRAMMemory(). |
|
Return the depth of the driver after init().
Implemented in NL3D::CDriverGL. |
|
see supportBlendConstantColor(). Get the current Blend Constant Color. Implemented in NL3D::CDriverGL. |
|
get the RGBA back buffer
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getBuffer(). |
|
get a part of the RGBA back buffer NB: 0,0 is the bottom left corner of the screen.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getBufferPart(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getDisplay(). |
|
Get the delay in ms for mouse double clicks. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getDoubleClickDelay(). |
|
Get driver informations. get the nel name of the driver (ex: "Opengl 1.2 NeL Driver") Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getDriverInformation(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::release(), and NL3D::CDriverUser::setDisplay(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::renderProject(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::renderProject(). |
|
Get.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::renderProject(). |
|
Get the driver version. Not the same than interface version. Incremented at each implementation change.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getImplementationVersion(). |
|
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 device (joysticks, joypads ...) Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getLowLevelInputDeviceManager(). |
|
return the number of light supported by driver. typically 8.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CRenderTrav::resetLightSetup(). |
|
return How many vertices VertexBufferHard support Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getModes(). |
|
Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay().
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getNbTextureStages(). |
|
Get the global polygon mode.
Definition at line 817 of file driver.h. References _PolygonMode, and TPolygonMode. Referenced by NL3D::CDriverUser::getPolygonMode().
00818 { 00819 return _PolygonMode; 00820 } |
|
Definition at line 70 of file smart_ptr.h. References NLMISC::CRefCount::crefs, and sint.
00071 { 00072 return crefs; 00073 } |
|
get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getSwapVBLInterval(). |
|
Advanced usage. Get the texture Handle. Usefull for texture sorting for instance NB: if the texture is not setuped in the driver, 0 is returned. NB: if implementation does not support it, 0 may be returned. OpenGL ones return the Texture ID. NB: unlike isTextureExist(), this method is not thread safe. Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), and NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(). |
|
Get the driver share texture name Definition at line 277 of file driver.cpp. References NL3D::ITexture::getShareName(), NL3D::ITexture::getUploadFormat(), NL3D::ITexture::mipMapOn(), NLMISC::smprintf(), NLMISC::strlwr(), and uint32. Referenced by invalidateShareTexture(), NL3D::CDriverGL::isTextureExist(), and NL3D::CDriverGL::setupTextureEx().
00278 { 00279 // Create the shared Name. 00280 output= strlwr(tex.getShareName()); 00281 00282 // append format Id of the texture. 00283 static char fmt[256]; 00284 smprintf(fmt, 256, "@Fmt:%d", (uint32)tex.getUploadFormat()); 00285 output+= fmt; 00286 00287 // append mipmap info 00288 if(tex.mipMapOn()) 00289 output+= "@MMp:On"; 00290 else 00291 output+= "@MMp:Off"; 00292 } |
|
Return the amount of texture video memory used since last swapBuffers() call. Before use this method, you should enable the sum with enableUsedTextureMemorySum(). Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getUsedTextureMemory(). |
|
Get videocard informations. get the official name of the driver Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getVideocardInformation(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CInstanceGroup::displayDebugClusters(), and NL3D::CPSUtil::print(). |
|
Get the current viewport Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::renderGenerate(), and NL3D::CFlareModel::traverseRender(). |
|
Get the position of the window always (0,0) in fullscreen.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getWindowPos(). |
|
Implemented in NL3D::CDriverGL. |
|
|
get the ZBuffer (back buffer).
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getZBuffer(). |
|
get a part of the ZBuffer (back buffer). NB: 0,0 is the bottom left corner of the screen.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::getZBufferPart(), and NL3D::CFlareModel::traverseRender(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::CDriverUser(). |
|
Allocate the initial VertexArray Memory. (no-op if !supportVertexBufferHard()). VertexArrayRange is first reseted, so any VBhard created before will be deleted. NB: call it after setDisplay(). But setDisplay() by default call initVertexArrayRange(16Mo, 0); so this is not necessary. NB: If allocation fails, mem/=2, and retry, until mem < 500K.
Implemented in NL3D::CDriverGL. |
|
Invalidate shared texture Definition at line 243 of file driver.cpp. References _SyncTexDrvInfos, _TexDrvShares, and getTextureShareName().
00244 { 00245 // Create the shared Name. 00246 std::string name; 00247 getTextureShareName (texture, name); 00248 00249 // Look for the driver info for this share name 00250 CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos); 00251 TTexDrvInfoPtrMap &rTexDrvInfos = access.value(); 00252 TTexDrvInfoPtrMap::iterator iteDrvInfo = rTexDrvInfos.find (name); 00253 if (iteDrvInfo != rTexDrvInfos.end()) 00254 { 00255 // Now parse all shared info 00256 TTexDrvSharePtrList::iterator shareIte = _TexDrvShares.begin (); 00257 while (shareIte != _TexDrvShares.end ()) 00258 { 00259 // Good one ? 00260 if ((*shareIte)->DrvTexture == iteDrvInfo->second) 00261 { 00262 // Remove this one 00263 TTexDrvSharePtrList::iterator toRemove = shareIte; 00264 shareIte++; 00265 delete (*toRemove); 00266 } 00267 else 00268 shareIte++; 00269 } 00270 00271 // Ok 00272 return true; 00273 } 00274 return false; 00275 } |
|
Return true if driver is still active. Return false else. If he user close the window, must return false.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::isActive(). |
|
Implemented in NL3D::CDriverGL. |
|
return the forceNormalize() state. Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPWindTree::beginMBRInstance(), NL3D::CMeshMRMGeom::beginMesh(), NL3D::CMeshVPPerPixelLight::enable(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), and NL3D::CSkeletonModel::renderSkins(). |
|
Implemented in NL3D::CDriverGL. |
|
test wether a texture addressing mode is supported
Implemented in NL3D::CDriverGL. Referenced by NL3D::CPSMultiTexturedParticle::enumTexs(), and NL3D::CPSMultiTexturedParticle::setupMaterial(). |
|
is the texture is set up in the driver NB: this method is thread safe. Implemented in NL3D::CDriverGL. Referenced by NL3D::CShapeBank::processWaitingShapes(), and NL3D::CAsyncFileManager3D::CMeshLoad::run(). |
|
Does the driver supports vertex program, but emulated by CPU ? Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPPerPixelLight::begin(), and NL3D::CMeshVPWindTree::isMBRVpOk(). |
|
Does the driver supports vertex programs ? Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPPerPixelLight::begin(), and NL3D::CMeshVPWindTree::isMBRVpOk(). |
|
test wether a texture addressing mode is supported
Implemented in NL3D::CDriverGL. Referenced by NL3D::CWaterModel::clip(), and NL3D::CWaterModel::traverseRender(). |
|
Say what Texture Stage use what UV coord. by default activeVertexBuffer*() methods map all stage i to UV i. You can change this behavior, after calling activeVertexBuffer*(), by using this method. eg: mapTextureStageToUV(0,2) will force the 0th texture stage to use the 2th UV. Warning! This DOESN'T work with VertexProgram enabled!! (assert) Warning!: some CMaterial Shader may change automatically this behavior too when setupMaterial() (and so render*()) is called. But Normal shader doesn't do it. Implemented in NL3D::CDriverGL. |
|
multipliy the model matrix. NB: you must use multiplyModelMatrix() AFTER setupModelMatrix() (and so setupViewMatrix()) or an other multiplyModelMatrix(), or else undefined results. Using of multiplyModelMatrix() instead of just one setupModelMatrix() may be usefull for precision consideration. Implemented in NL3D::CDriverGL. |
|
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 :). Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::profileAllocatedTextureMemory(). |
|
Get the number of primitives rendered from the last swapBuffers() call.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::profileRenderedPrimitives(), NL3D::CVegetableManager::render(), and NL3D::CVegetableBlendLayerModel::render(). |
|
Get the number of material setuped from the last swapBuffers() call. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::profileSetupedMaterials(), and NL3D::CLandscape::render(). |
|
Get the number of matrix setuped from the last swapBuffers() call. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::profileSetupedModelMatrix(). |
|
display VBhards allocated Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::profileVBHardAllocation(). |
|
Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers).
Reimplemented in NL3D::CDriverGL. Definition at line 73 of file driver.cpp. References _Shaders, _SyncTexDrvInfos, _TexDrvShares, _VBDrvInfos, _VtxPrgDrvInfos, NL3D::ItShaderPtrList, NL3D::ItTexDrvSharePtrList, NL3D::ItVBDrvInfoPtrList, NL3D::ItVtxPrgDrvInfoPtrList, and nlassert. Referenced by NL3D::CDriverUser::release().
00074 { 00075 // Called by derived classes. 00076 00077 // DO THIS FIRST => to auto kill real textures (by smartptr). 00078 // First, Because must not kill a pointer owned by a CSmartPtr. 00079 // Release Textures drv. 00080 ItTexDrvSharePtrList ittex; 00081 while( (ittex = _TexDrvShares.begin()) !=_TexDrvShares.end() ) 00082 { 00083 // NB: at CTextureDrvShare deletion, this->_TexDrvShares is updated (entry deleted); 00084 delete *ittex; 00085 } 00086 00087 00088 // Release refptr of TextureDrvInfos. Should be all null (because of precedent pass). 00089 { 00090 CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos); 00091 TTexDrvInfoPtrMap &rTexDrvInfos = access.value(); 00092 00093 // must be empty, because precedent pass should have deleted all. 00094 nlassert(rTexDrvInfos.empty()); 00095 } 00096 00097 // Release Shader drv. 00098 ItShaderPtrList itshd; 00099 while( (itshd = _Shaders.begin()) != _Shaders.end() ) 00100 { 00101 // NB: at IShader deletion, this->_Shaders is updated (entry deleted); 00102 delete *itshd; 00103 } 00104 00105 // Release VBs drv. 00106 ItVBDrvInfoPtrList itvb; 00107 while( (itvb = _VBDrvInfos.begin()) != _VBDrvInfos.end() ) 00108 { 00109 // NB: at IVBDrvInfo deletion, this->_VBDrvInfos is updated (entry deleted); 00110 delete *itvb; 00111 } 00112 00113 // Release VtxPrg drv. 00114 ItVtxPrgDrvInfoPtrList itVtxPrg; 00115 while( (itVtxPrg = _VtxPrgDrvInfos.begin()) != _VtxPrgDrvInfos.end() ) 00116 { 00117 // NB: at IVertexProgramDrvInfos deletion, this->_VtxPrgDrvInfos is updated (entry deleted); 00118 delete *itVtxPrg; 00119 } 00120 00121 return true; 00122 } |
|
Definition at line 232 of file driver.cpp. References _Shaders, and NL3D::ItShaderPtrList. Referenced by NL3D::IShader::~IShader().
00233 { 00234 _Shaders.erase(shaderIt); 00235 } |
|
Definition at line 219 of file driver.cpp. References _SyncTexDrvInfos, and NL3D::ItTexDrvInfoPtrMap. Referenced by NL3D::ITextureDrvInfos::~ITextureDrvInfos().
00220 { 00221 CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos); 00222 TTexDrvInfoPtrMap &rTexDrvInfos = access.value(); 00223 00224 rTexDrvInfos.erase(texDrvInfoIt); 00225 } |
|
Definition at line 227 of file driver.cpp. References _TexDrvShares, and NL3D::ItTexDrvSharePtrList. Referenced by NL3D::CTextureDrvShare::~CTextureDrvShare().
00228 { 00229 _TexDrvShares.erase(texDrvShareIt); 00230 } |
|
remove ptr from the lists in the driver.
Definition at line 214 of file driver.cpp. References _VBDrvInfos, and NL3D::ItVBDrvInfoPtrList. Referenced by NL3D::IVBDrvInfos::~IVBDrvInfos().
00215 { 00216 _VBDrvInfos.erase(vbDrvInfoIt); 00217 } |
|
Definition at line 237 of file driver.cpp. References _VtxPrgDrvInfos, and NL3D::ItVtxPrgDrvInfoPtrList. Referenced by NL3D::IVertexProgramDrvInfos::~IVertexProgramDrvInfos().
00238 { 00239 _VtxPrgDrvInfos.erase(vtxPrgDrvInfoIt); 00240 } |
|
|
Render quads with previously setuped VertexBuffer / Matrixes. There's a garanty for the orientation of its diagonal, which is drawn as follow : 3----2 | / | | / | |/ | 0----1 The rendering may be slower than with 'renderQuads', however This orientation is not garanteed with renderQuads, and depends on the hardware Implemented in NL3D::CDriverGL. Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(). |
|
render points with previously setuped VertexBuffer / Matrixes. Implemented in NL3D::CDriverGL. Referenced by NL3D::DrawDot(). |
|
render quads with previously setuped VertexBuffer / Matrixes. Quads are stored as a sequence in the vertex buffer. Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::applyFakeGaussianBlur(), NL3D::CCloud::disp(), NL3D::CCloud::dispBill(), NL3D::CCloud::dispXYZ(), NL3D::CDeform2d::doDeform(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CDriverUser::drawQuads(), NL3D::CShadowMapManager::fillBlackBorder(), NL3D::CNoise3d::flush(), NL3D::CRenderStringBuffer::flush(), NL3D::CNoise3d::flush2passes(), NL3D::CRenderStringBuffer::flushUnProjected(), NL3D::CCloud::genBill(), NL3D::CCloud::generate(), NL3D::CCloud::light(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CComputedString::render2D(), NL3D::CComputedString::render3D(), NL3D::CCloud::reset(), and NL3D::CFlareModel::traverseRender(). |
|
render a list of triangles with previously setuped VertexBuffer / Matrixes, AND previously setuped MATERIAL!! This use the last material setuped. It should be a "Normal shader" material, because no multi-pass is allowed with this method. Actually, it is like a straight drawTriangles() in OpenGL. NB: nlassert() if ntris is 0!!!! this is unlike other render() call methods. For optimisation concern. NB: this is usefull for landscape.... Implemented in NL3D::CDriverGL. Referenced by NL3D::CWaterModel::doSimpleRender(), NL3D::DrawPoly2D(), NL3D::CVegetableManager::render(), NL3D::CVegetableBlendLayerModel::render(), and NL3D::CWaterModel::traverseRender(). |
|
render a list of triangles with previously setuped VertexBuffer / Matrixes. NB: this "was" usefull for landscape.... Implemented in NL3D::CDriverGL. Referenced by NL3D::CPSUtil::displayArrow(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CLodCharacterManager::endRender(), NL3D::CCoarseMeshManager::flushRender(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CShadowPolyReceiver::render(), NL3D::CMeshMRMSkinnedGeom::renderShadowSkinPrimitives(), NL3D::CMeshMRMGeom::renderShadowSkinPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), and NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass(). |
|
Set ambiant.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CRenderTrav::resetLightSetup(), and NL3D::CDriverUser::setAmbientColor(). |
|
see supportBlendConstantColor(). Set the current Blend Constant Color. Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshBlender::prepareRenderForGlobalAlpha(), and NL3D::CMeshBlender::prepareRenderForGlobalAlphaCoarseMesh(). |
|
If true, capture the mouse to force it to stay under the window. NB : this has no effects if a low level mouse is used Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::setCapture(). |
|
Set the color mask filter through where the operation done will pass.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CCloud::light(), and NL3D::CShadowMapManager::renderGenerate(). |
|
setup several 4 double csts taken from the given tab
Implemented in NL3D::CDriverGL. |
|
setup several 4 float csts taken from the given tab
Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. |
|
|
Setup constants with a current matrix. This call must be done after setFrustum(), setupViewMatrix() or setupModelMatrix() to get correct results.
Referenced by NL3D::CMeshVPPerPixelLight::begin(), NL3D::CLandscape::render(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CMeshVPWindTree::setupPerInstanceConstants(), and NL3D::CVegetableManager::setupVertexProgramConstants(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::setDisplay(). |
|
Implemented in NL3D::CDriverGL. |
|
|
Setup a light. You must call enableLight() to active the ligth.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CRenderTrav::changeLightSetup(), NL3D::CRenderTrav::resetLightSetup(), and NL3D::CDriverUser::setLight(). |
|
setup the 2D matrix for the OffsetTexture, OffsetTextureScale and OffsetTexture addressing mode It should be stored as the following [a0 a1] [a2 a3] Implemented in NL3D::CDriverGL. Referenced by NL3D::CPSMultiTexturedParticle::setupMaterial(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::setMode(). |
|
Setup monitor color properties. Return false if setup failed. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::setMonitorColorProperties(). |
|
x and y must be between 0.0 and 1.0
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::setMousePos(). |
|
Setup the light used for per pixel lighting. The given values should have been modulated by the material diffuse and specular. This is only useful for material that have their shader set as 'PerPixelLighting'
Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshVPPerPixelLight::setupForMaterial(). |
|
Set the global polygon mode. Can be filled, line or point. The implementation driver must call IDriver::setPolygonMode and active this mode.
Reimplemented in NL3D::CDriverGL. Definition at line 763 of file driver.h. References _PolygonMode. Referenced by NL3D::CCloud::dispBill(), and NL3D::CDriverUser::setPolygonMode().
00764 { 00765 _PolygonMode=mode; 00766 } |
|
set the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL Default depends of the 3D driver setup. Values >1 may be clamped to 1 by the driver. Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::setSwapVBLInterval(). |
|
setup fog parameters. fog must enabled to see result. start and end are in [0,1] range.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShadowMapManager::renderProject(), and NL3D::CDriverUser::setupFog(). |
|
|
active the ith pass of this material.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CWaterModel::traverseRender(). |
|
|
Set the current Scissor.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CCloud::disp(), NL3D::CCloudScape::render(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CCloud::setMode2D(), and NL3D::CDriverUser::setupMatrixContext(). |
|
setup a texture, generate and upload if needed. same as setupTextureEx(tex, true, dummy); Implemented in NL3D::CDriverGL. Referenced by NL3D::CParticleSystemShape::flushTextures(), NL3D::CMaterial::flushTextures(), NL3D::CFlareShape::flushTextures(), NL3D::CLandscape::flushTiles(), NL3D::CParticleSystemShape::instanciatePS(), and NL3D::CWaterPoolManager::setBlendFactor(). |
|
setup a texture in the driver.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShapeBank::processWSUploadTexture(), and NL3D::CAsyncTextureManager::uploadTexturePart(). |
|
setup the view matrix (inverse of camera matrix). NB: you must setupViewMatrix() BEFORE setupModelMatrix(), or else undefined results. Implemented in NL3D::CDriverGL. Referenced by NL3D::CCloud::disp(), NL3D::CDeform2d::doDeform(), NL3D::CDRU::drawBitmap(), NL3D::CDRU::drawLine(), NL3D::CDRU::drawQuad(), NL3D::CDRU::drawTriangle(), NL3D::CRenderStringBuffer::flush(), NL3D::CCloud::genBill(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CCloudScape::render(), NL3D::CComputedString::render2D(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CDriverUser::restoreMatrixContextMatrixOnly(), NL3D::CCloud::setMode2D(), and NL3D::CDriverUser::setupMatrixContext(). |
|
setup the view matrix (inverse of camera matrix). Extended: give a cameraPos (mtx.Pos() is not taken into account but for getViewMatrix()), so the driver use it to remove translation from all ModelMatrixes (and lights pos). This approach improves greatly ZBuffer precision. This is transparent to user, and getViewMatrix() return mtx (as in setupViewMatrix()). NB: you must setupViewMatrixEx() BEFORE setupModelMatrix(), or else undefined results.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CRenderTrav::setupDriverCamera(). |
|
Set the current viewport
Implemented in NL3D::CDriverGL. Referenced by NL3D::CCloud::disp(), NL3D::CDRU::drawBitmap(), NL3D::CDRU::drawLine(), NL3D::CDRU::drawQuad(), NL3D::CDRU::drawTriangle(), NL3D::CCloud::genBill(), NL3D::CCloudScape::render(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CCloud::setMode2D(), NL3D::CDriverUser::setupMatrixContext(), and NL3D::CRenderTrav::traverse(). |
|
show cursor if b is true, or hide it if b is false
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::showCursor(). |
|
return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL). Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshMRMGeom::updateVertexBufferHard(), and NL3D::CMeshGeom::updateVertexBufferHard(). |
|
If the driver support it, enable profile VBHard locks. No-Op if already profiling Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::startProfileVBHardLock(). |
|
Special for Faster Specular Setup. Call this between lot of primitives rendered with Specular Materials. Visual Errors may arise if you don't correclty call endSpecularBatch(). Implemented in NL3D::CDriverGL. Referenced by NL3D::CSkeletonModel::renderSkinList(). |
|
Does the driver support Blend Constant Color ??? If yes CMaterial::blendConstant* enum can be used for blend Src ord Dst factor. If no, using these enum will have undefined results. Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshBlender::prepareRenderForGlobalAlpha(), NL3D::CMeshBlender::prepareRenderForGlobalAlphaCoarseMesh(), NL3D::CMeshBlender::restoreRender(), and NL3D::CMeshBlender::restoreRenderCoarseMesh(). |
|
Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshVPPerPixelLight::begin(). |
|
test wether the device supports some form of texture shader. (could be limited to DX6 EMBM for example)
Implemented in NL3D::CDriverGL. |
|
return true if driver support VertexBufferHard. Implemented in NL3D::CDriverGL. Referenced by NL3D::CMeshMRMGeom::updateVertexBufferHard(), and NL3D::CMeshGeom::updateVertexBufferHard(). |
|
Check if the driver support double sided colors vertex programs.
Implemented in NL3D::CDriverGL. |
|
Swap the back and front buffers.
Implemented in NL3D::CDriverGL. Referenced by NL3D::CDriverUser::swapBuffers(). |
|
Special method to internally swap the Driver handle of 2 textures. USE IT WITH CARE (eg: may have Size problems, mipmap problems, format problems ...) Actually, it is used only by CAsyncTextureManager, to manage Lods of DXTC CTextureFile. NB: internally, all textures slots are disabled. Implemented in NL3D::CDriverGL. Referenced by NL3D::CAsyncTextureManager::update(), and NL3D::CAsyncTextureManager::updateTextureLodSystem(). |
|
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.
Reimplemented in NL3D::CDriverGL. Definition at line 137 of file driver.cpp. References abortId, abortRetryIgnoreType, cancelId, iconCount, ignoreId, nlassert, noId, okCancelType, okId, okType, retryCancelType, retryId, type, typeCount, yesId, yesNoCancelType, and yesNoType. Referenced by NL3D::CDriverUser::systemMessageBox().
00138 { 00139 static const char* icons[iconCount]= 00140 { 00141 "", 00142 "WAIT:\n", 00143 "QUESTION:\n", 00144 "HEY!\n", 00145 "", 00146 "WARNING!\n", 00147 "ERROR!\n", 00148 "INFORMATION:\n", 00149 "STOP:\n" 00150 }; 00151 static const char* messages[typeCount]= 00152 { 00153 "Press any key...", 00154 "(O)k or (C)ancel ?", 00155 "(Y)es or (N)o ?", 00156 "(A)bort (R)etry (I)gnore ?", 00157 "(Y)es (N)o (C)ancel ?", 00158 "(R)etry (C)ancel ?" 00159 }; 00160 printf ("%s%s\n%s", icons[icon], title, message); 00161 while (1) 00162 { 00163 printf ("\n%s", messages[type]); 00164 int c=getchar(); 00165 if (type==okType) 00166 return okId; 00167 switch (c) 00168 { 00169 case 'O': 00170 case 'o': 00171 if ((type==okType)||(type==okCancelType)) 00172 return okId; 00173 break; 00174 case 'C': 00175 case 'c': 00176 if ((type==yesNoCancelType)||(type==okCancelType)||(type==retryCancelType)) 00177 return cancelId; 00178 break; 00179 case 'Y': 00180 case 'y': 00181 if ((type==yesNoCancelType)||(type==yesNoType)) 00182 return yesId; 00183 break; 00184 case 'N': 00185 case 'n': 00186 if ((type==yesNoCancelType)||(type==yesNoType)) 00187 return noId; 00188 break; 00189 case 'A': 00190 case 'a': 00191 if (type==abortRetryIgnoreType) 00192 return abortId; 00193 break; 00194 case 'R': 00195 case 'r': 00196 if (type==abortRetryIgnoreType) 00197 return retryId; 00198 break; 00199 case 'I': 00200 case 'i': 00201 if (type==abortRetryIgnoreType) 00202 return ignoreId; 00203 break; 00204 } 00205 } 00206 nlassert (0); // no! 00207 return okId; 00208 } |
|
The texture must be created or uploadTexture do nothing. These function can be used to upload piece by piece a texture. Use it in conjunction with setupTextureEx(..., false); Implemented in NL3D::CDriverGL. Referenced by NL3D::CShapeBank::processWSUploadTexture(), and NL3D::CAsyncTextureManager::uploadTexturePart(). |
|
Implemented in NL3D::CDriverGL. Referenced by NL3D::CShapeBank::processWSUploadTexture(). |
|
Definition at line 67 of file smart_ptr.h. |
|
Definition at line 993 of file driver.h. Referenced by NL3D::CDriverGL::setupTextureEx(). |
|
|
|
|
|
|
|
|
|
Definition at line 165 of file driver.h. Referenced by getPolygonMode(), IDriver(), and setPolygonMode(). |
|
Definition at line 163 of file driver.h. Referenced by release(), removeShaderPtr(), and ~IDriver(). |
|
Definition at line 160 of file driver.h. Referenced by invalidateShareTexture(), release(), removeTextureDrvInfoPtr(), and ~IDriver(). |
|
Definition at line 162 of file driver.h. Referenced by invalidateShareTexture(), release(), removeTextureDrvSharePtr(), and ~IDriver(). |
|
Definition at line 164 of file driver.h. Referenced by release(), removeVBDrvInfoPtr(), and ~IDriver(). |
|
Definition at line 166 of file driver.h. Referenced by release(), removeVtxPrgDrvInfoPtr(), and ~IDriver(). |
|
Definition at line 79 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount(). |
|
Version of the driver interface. To increment when the interface change.
Definition at line 46 of file driver.cpp. |
|
Referenced by NLMISC::CRefCount::CRefCount(). |
|
Definition at line 80 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount(). |