#include <driver.h>
Inherits NLMISC::CRefCount.
Inherited by NL3D::CDriverD3D, and NL3D::CDriverGL.
Classes | |
| class | CAdapter |
Public Types | |
| enum | TMessageBoxId { okId = 0, yesId, noId, abortId, retryId, cancelId, ignoreId, idCount } |
| enum | TMessageBoxType { okType = 0, okCancelType, yesNoType, abortRetryIgnoreType, yesNoCancelType, retryCancelType, typeCount } |
| enum | TMessageBoxIcon { noIcon = 0, handIcon, questionIcon, exclamationIcon, asteriskIcon, warningIcon, errorIcon, informationIcon, stopIcon, iconCount } |
| enum | TCullMode { CCW = 0, CW } |
| enum | TStencilOp { keep = 0, zero, replace, incr, decr, invert } |
| enum | TStencilFunc { never = 0, less, lessequal, equal, notequal, greaterequal, greater, always } |
| enum | TPolygonMode { Filled = 0, Line, Point } |
Driver's polygon modes. More... | |
| enum | TMatrixCount { MaxModelMatrix = 16 } |
Driver Max matrix count. More... | |
Public Member Functions | |
| IDriver (void) | |
| virtual | ~IDriver (void) |
| virtual bool | init (uint windowIcon=0, emptyProc exitFunc=0)=0 |
| virtual bool | isLost () const =0 |
| virtual bool | setDisplay (void *wnd, const GfxMode &mode, bool show=true, bool resizeable=true)=0 throw (EBadDisplay) |
| virtual bool | setMode (const GfxMode &mode)=0 |
| virtual bool | getModes (std::vector< GfxMode > &modes)=0 |
| virtual void | setWindowTitle (const ucstring &title)=0 |
| Set the title of the NeL window. | |
| virtual void | setWindowPos (uint32 x, uint32 y)=0 |
| Set the position of the NeL window. | |
| virtual void | showWindow (bool show)=0 |
| Show or hide the NeL window. | |
| virtual bool | getCurrentScreenMode (GfxMode &mode)=0 |
| return the current screen mode (if we are in windowed, return the screen mode behind the window) | |
| virtual void | beginDialogMode ()=0 |
| enter/leave the dialog mode | |
| virtual void | endDialogMode ()=0 |
| virtual void * | getDisplay ()=0 |
| virtual bool | setMonitorColorProperties (const CMonitorColorProperties &properties)=0 |
| Setup monitor color properties. | |
| virtual emptyProc | getWindowProc ()=0 |
| virtual bool | activate (void)=0 |
| Before rendering via a driver in a thread, must activate() (per thread). | |
| virtual uint | getNbTextureStages () const =0 |
| Get the number of texture stage available, for multi texturing (Normal material shaders). Valid only after setDisplay(). | |
| virtual bool | isTextureExist (const ITexture &tex)=0 |
| is the texture is set up in the driver NB: this method is thread safe. | |
| virtual NLMISC::IEventEmitter * | getEventEmitter (void)=0 |
| virtual bool | clear2D (CRGBA rgba)=0 |
| virtual bool | clearZBuffer (float zval=1)=0 |
| virtual bool | clearStencilBuffer (float stencilval=0)=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 void | setDepthRange (float znear, float zfar)=0 |
| Set depth range. | |
| virtual void | getDepthRange (float &znear, float &zfar) const =0 |
| virtual bool | setupTexture (ITexture &tex)=0 |
| setup a texture, generate and upload if needed. | |
| virtual bool | setupTextureEx (ITexture &tex, bool bUpload, bool &bAllUploaded, bool bMustRecreateSharedTexture=false)=0 |
| setup a texture in the driver. | |
| virtual bool | uploadTexture (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap)=0 |
| The texture must be created or uploadTexture do nothing. | |
| virtual bool | uploadTextureCube (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap, uint8 nNumFace)=0 |
| bool | invalidateShareTexture (ITexture &) |
| Invalidate shared texture. | |
| virtual void | forceDXTCCompression (bool dxtcComp)=0 |
| if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed. | |
| virtual void | forceTextureResize (uint divisor)=0 |
| if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc. | |
| virtual void | forceNativeFragmentPrograms (bool nativeOnly)=0 |
| Sets enforcement of native fragment programs. | |
| virtual bool | setupMaterial (CMaterial &mat)=0 |
| virtual bool | activeShader (CShader *shd)=0 |
| Activate a shader, NULL to disable the current shader. | |
| virtual void | startSpecularBatch ()=0 |
| Special for Faster Specular Setup. | |
| virtual void | endSpecularBatch ()=0 |
| virtual void | setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true)=0 |
| virtual void | setFrustumMatrix (CMatrix &frust)=0 |
| virtual CMatrix | getFrustumMatrix ()=0 |
| virtual float | getClipSpaceZMin () const =0 |
| virtual void | setupViewMatrix (const CMatrix &mtx)=0 |
| setup the view matrix (inverse of camera matrix). | |
| virtual void | setupViewMatrixEx (const CMatrix &mtx, const CVector &cameraPos)=0 |
| setup the view matrix (inverse of camera matrix). | |
| virtual void | setupModelMatrix (const CMatrix &mtx)=0 |
| setup the model matrix. | |
| virtual CMatrix | getViewMatrix (void) const =0 |
| virtual void | forceNormalize (bool normalize)=0 |
| Force input normal to be normalized by the driver. | |
| virtual bool | isForceNormalize () const =0 |
| return the forceNormalize() state. | |
| virtual void | getNumPerStageConstant (uint &lightedMaterial, uint &unlightedMaterial) const =0 |
| Get max number of per stage constant that can be used simultaneously. | |
| virtual bool | supportVertexBufferHard () const =0 |
| return true if driver support VertexBufferHard. | |
| virtual bool | supportVolatileVertexBuffer () const =0 |
| return true if volatile vertex buffer are supported. | |
| virtual bool | supportIndexOffset () const =0 |
| return true if driver support indices offset. | |
| virtual bool | slowUnlockVertexBufferHard () const =0 |
| return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL). | |
| bool | getStaticMemoryToVRAM () const |
| void | setStaticMemoryToVRAM (bool staticMemoryToVRAM) |
| uint | getResetCounter () const |
| Return the driver reset counter. | |
| virtual uint | getMaxVerticesByVertexBufferHard () const =0 |
| return How many vertices VertexBufferHard support | |
| virtual bool | initVertexBufferHard (uint agpMem, uint vramMem=0)=0 |
| Allocate the initial VertexArray Memory. | |
| virtual uint32 | getAvailableVertexAGPMemory ()=0 |
| Return the amount of AGP memory allocated by initVertexBufferHard() to store vertices. | |
| virtual uint32 | getAvailableVertexVRAMMemory ()=0 |
| Return the amount of video memory allocated by initVertexBufferHard() to store vertices. | |
| virtual bool | activeVertexBuffer (CVertexBuffer &VB)=0 |
| active a current VB, for future render(). | |
| virtual bool | activeIndexBuffer (CIndexBuffer &IB)=0 |
| active a current IB, for future render(). | |
| virtual bool | renderLines (CMaterial &mat, uint32 firstIndex, uint32 nlines)=0 |
| Render a list of indexed lines with previously setuped VertexBuffer / IndexBuffer / Matrixes. | |
| virtual bool | renderTriangles (CMaterial &mat, uint32 firstIndex, uint32 ntris)=0 |
| Render a list of indexed triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes. | |
| virtual bool | renderSimpleTriangles (uint32 firstIndex, uint32 ntris)=0 |
| Render a list of triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes, AND previously setuped MATERIAL!! This use the last material setuped. | |
| virtual bool | renderRawPoints (CMaterial &mat, uint32 startVertex, uint32 numPoints)=0 |
| Render points with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderRawLines (CMaterial &mat, uint32 startVertex, uint32 numTri)=0 |
| Render lines with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderRawTriangles (CMaterial &mat, uint32 startVertex, uint32 numTri)=0 |
| Render triangles with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderLinesWithIndexOffset (CMaterial &mat, uint32 firstIndex, uint32 nlines, uint indexOffset)=0 |
| If the driver support it, primitive can be rendered with an offset added to each index These are the offseted version of the 'render' functions. | |
| virtual bool | renderTrianglesWithIndexOffset (CMaterial &mat, uint32 firstIndex, uint32 ntris, uint indexOffset)=0 |
| virtual bool | renderSimpleTrianglesWithIndexOffset (uint32 firstIndex, uint32 ntris, uint indexOffset)=0 |
| virtual bool | renderRawQuads (CMaterial &mat, uint32 startVertex, uint32 numQuads)=0 |
| render quads with previously setuped VertexBuffer / Matrixes. | |
| virtual void | mapTextureStageToUV (uint stage, uint uv)=0 |
| Say what Texture Stage use what UV coord. | |
| virtual bool | swapBuffers (void)=0 |
| Swap the back and front buffers. | |
| virtual void | setSwapVBLInterval (uint interval)=0 |
| set the number of VBL wait when a swapBuffers() is issued. | |
| virtual uint | getSwapVBLInterval ()=0 |
| get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL | |
| virtual bool | release (void) |
| Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers). | |
| virtual bool | isActive ()=0 |
| Return true if driver is still active. Return false else. If he user close the window, must return false. | |
| virtual uint8 | getBitPerPixel ()=0 |
| Return the depth of the driver after init(). | |
| virtual TMessageBoxId | systemMessageBox (const char *message, const char *title, TMessageBoxType type=okType, TMessageBoxIcon icon=noIcon) |
| Output a system message box and print a message with an icon. | |
| virtual void | setupViewport (const class CViewport &viewport)=0 |
| Set the current viewport. | |
| virtual void | getViewport (CViewport &viewport)=0 |
| Get the current viewport. | |
| virtual void | setupScissor (const class CScissor &scissor)=0 |
| Set the current Scissor. | |
| virtual uint32 | getImplementationVersion () const =0 |
| Get the driver version. | |
| virtual const char * | getDriverInformation ()=0 |
| Get driver informations. | |
| virtual const char * | getVideocardInformation ()=0 |
| Get videocard informations. | |
| virtual void | getWindowSize (uint32 &width, uint32 &height)=0 |
| Get the width and the height of the window. | |
| virtual void | getWindowPos (uint32 &x, uint32 &y)=0 |
| Get the position of the window always (0,0) in fullscreen. | |
| virtual void | getBuffer (CBitmap &bitmap)=0 |
| get the RGBA back buffer. | |
| virtual void | getZBuffer (std::vector< float > &zbuffer)=0 |
| get the ZBuffer (back buffer). | |
| virtual void | getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)=0 |
| get a part of the RGBA back buffer. | |
| virtual bool | stretchRect (ITexture *srcText, NLMISC::CRect &srcRect, ITexture *destText, NLMISC::CRect &destRect)=0 |
| virtual bool | isTextureRectangle (ITexture *tex) const =0 |
| virtual bool | supportBloomEffect () const =0 |
| virtual void | getZBufferPart (std::vector< float > &zbuffer, NLMISC::CRect &rect)=0 |
| get a part of the ZBuffer (back buffer). | |
| virtual bool | setRenderTarget (ITexture *tex, uint32 x=0, uint32 y=0, uint32 width=0, uint32 height=0, uint32 mipmapLevel=0, uint32 cubeFace=0)=0 |
| Set the current render target. | |
| virtual bool | copyTargetToTexture (ITexture *tex, uint32 offsetx=0, uint32 offsety=0, uint32 x=0, uint32 y=0, uint32 width=0, uint32 height=0, uint32 mipmapLevel=0)=0 |
| Trick method : copy the current texture target into another texture without updating the current texture. | |
| virtual bool | getRenderTargetSize (uint32 &width, uint32 &height)=0 |
| Retrieve the render target size. | |
| virtual bool | fillBuffer (CBitmap &bitmap)=0 |
| fill the RGBA back buffer | |
| virtual void | setPolygonMode (TPolygonMode mode) |
| Set the global polygon mode. | |
| virtual uint | getMaxLight () const =0 |
| return the number of light supported by driver. | |
| virtual void | setLight (uint8 num, const CLight &light)=0 |
| Setup a light. | |
| virtual void | enableLight (uint8 num, bool enable=true)=0 |
| Enable / disable light. | |
| virtual void | setAmbientColor (CRGBA color)=0 |
| Set ambient. | |
| virtual void | setPerPixelLightingLight (CRGBA diffuse, CRGBA specular, float shininess)=0 |
| Setup the light used for per pixel lighting. | |
| virtual void | setLightMapDynamicLight (bool enable, const CLight &light)=0 |
| Setup the unique light used for Lightmap Shader. | |
| TPolygonMode | getPolygonMode () |
| Get the global polygon mode. | |
| virtual bool | supportPerPixelLighting (bool specular) const =0 |
| virtual void | swapTextureHandle (ITexture &tex0, ITexture &tex1)=0 |
| Special method to internally swap the Driver handle of 2 textures. | |
| virtual uint | getTextureHandle (const ITexture &tex)=0 |
| Advanced usage. | |
| virtual bool | supportMADOperator () const =0 |
| virtual uint | getNumAdapter () const =0 |
| virtual bool | getAdapter (uint adapter, CAdapter &desc) const =0 |
| virtual bool | setAdapter (uint adapter)=0 |
| Choose the hardware renderer. | |
| virtual CVertexBuffer::TVertexColorType | getVertexColorFormat () const =0 |
| Tell if the vertex color memory format is RGBA (openGL) or BGRA (directx) BGRA : ***************************************************************** Offset: * 0 * 1 * 2 * 3 * ***************************************************************** RGBA * red * green * blue * alpha * ***************************************************************** BGRA * blue * green * red * alpha * | |
| virtual uint64 | getSwapBufferCounter () const =0 |
| virtual void | setCullMode (TCullMode cullMode)=0 |
| Set cull mode Useful for mirrors / cube map rendering or when the scene must be rendered upside down. | |
| virtual TCullMode | getCullMode () const =0 |
| virtual void | enableStencilTest (bool enable)=0 |
| Set stencil support. | |
| virtual bool | isStencilTestEnabled () const =0 |
| virtual void | stencilFunc (TStencilFunc stencilFunc, int ref, uint mask)=0 |
| virtual void | stencilOp (TStencilOp fail, TStencilOp zfail, TStencilOp zpass)=0 |
| virtual void | stencilMask (uint mask)=0 |
Disable Hardware Feature | |
| virtual void | disableHardwareVertexProgram ()=0 |
| Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly. | |
| virtual void | disableHardwareVertexArrayAGP ()=0 |
| virtual void | disableHardwareTextureShader ()=0 |
Material multipass. | |
| virtual sint | beginMaterialMultiPass ()=0 |
| NB: setupMaterial() must be called before those methods. | |
| virtual void | setupMaterialPass (uint pass)=0 |
| active the ith pass of this material. | |
| virtual void | endMaterialMultiPass ()=0 |
| end multipass for this material. | |
Profiling. | |
| virtual void | profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut)=0 |
| Get the number of primitives rendered from the last swapBuffers() call. | |
| virtual uint32 | profileAllocatedTextureMemory ()=0 |
| Return the amount of Texture memory requested. | |
| virtual uint32 | profileSetupedMaterials () const =0 |
| Get the number of material setuped from the last swapBuffers() call. | |
| virtual uint32 | profileSetupedModelMatrix () const =0 |
| Get the number of matrix setuped from the last swapBuffers() call. | |
| virtual void | enableUsedTextureMemorySum (bool enable=true)=0 |
| Enable the sum of texture memory used since last swapBuffers() call. | |
| virtual uint32 | getUsedTextureMemory () const =0 |
| Return the amount of texture video memory used since last swapBuffers() call. | |
| virtual void | startProfileVBHardLock ()=0 |
| If the driver support it, enable profile VBHard locks. | |
| virtual void | endProfileVBHardLock (std::vector< std::string > &result)=0 |
| If the driver support it, stop profile VBHard locks, and "print" result No-Op if already profiling NB: The results are the Locks in Chronological time (since last swapBuffers). | |
| virtual void | profileVBHardAllocation (std::vector< std::string > &result)=0 |
| display VBhards allocated | |
| virtual void | startProfileIBLock ()=0 |
| virtual void | endProfileIBLock (std::vector< std::string > &result)=0 |
| virtual void | profileIBAllocation (std::vector< std::string > &result)=0 |
| void | profileTextureUsage (std::vector< std::string > &result) |
| For each texture setuped in the driver, "print" result: type, shareName, format and size (mipmap included). | |
Fog support. | |
| virtual bool | fogEnabled ()=0 |
| virtual void | enableFog (bool enable)=0 |
| virtual void | setupFog (float start, float end, CRGBA color)=0 |
| setup fog parameters. fog must enabled to see result. start and end are distance values. | |
| virtual float | getFogStart () const =0 |
| Get. | |
| virtual float | getFogEnd () const =0 |
| virtual CRGBA | getFogColor () const =0 |
Mouse / Keyboard / Game devices | |
| virtual void | showCursor (bool b)=0 |
| show cursor if b is true, or hide it if b is false | |
| virtual void | setMousePos (float x, float y)=0 |
| x and y must be between 0.0 and 1.0 | |
| virtual NLMISC::IMouseDevice * | enableLowLevelMouse (bool enable, bool exclusive)=0 |
| Enable / disable low level mouse. | |
| virtual NLMISC::IKeyboardDevice * | enableLowLevelKeyboard (bool enable)=0 |
| Enable / disable a low level keyboard. | |
| virtual uint | getDoubleClickDelay (bool hardwareMouse)=0 |
| Get the delay in ms for mouse double clicks. | |
| virtual void | setCapture (bool b)=0 |
| If true, capture the mouse to force it to stay under the window. | |
| virtual NLMISC::IInputDeviceManager * | getLowLevelInputDeviceManager ()=0 |
| Check whether there is a low level device manager available, and get its interface. | |
Texture addressing modes aka textures/pixels shaders | |
| virtual bool | supportTextureShaders () const =0 |
| test whether the device supports some form of texture shader. (could be limited to DX6 EMBM for example) | |
| virtual bool | isWaterShaderSupported () const =0 |
| virtual bool | isTextureAddrModeSupported (CMaterial::TTexAddressingMode mode) const =0 |
| test whether a texture addressing mode is supported | |
| virtual void | setMatrix2DForTextureOffsetAddrMode (const uint stage, const float mat[4])=0 |
| setup the 2D matrix for the OffsetTexture, OffsetTextureScale and OffsetTexture addressing mode It should be stored as the following [a0 a1] [a2 a3] | |
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 addressing mode and a color op. NB : EMBM may not be supported by all stages. if embm unit is at last last stage, it operates on texture at first stage otherwise it operates on texture at next stage | |
| virtual bool | supportEMBM () const =0 |
| virtual bool | isEMBMSupportedAtStage (uint stage) const =0 |
| virtual void | setEMBMMatrix (const uint stage, const float mat[4])=0 |
Misc | |
| virtual bool | supportBlendConstantColor () const =0 |
| Does the driver support Blend Constant Color ??? If yes CMaterial::blendConstant* enum can be used for blend Src ord Dst factor. | |
| virtual void | setBlendConstantColor (NLMISC::CRGBA col)=0 |
| see supportBlendConstantColor(). | |
| virtual NLMISC::CRGBA | getBlendConstantColor () const =0 |
| see supportBlendConstantColor(). | |
| virtual void | finish ()=0 |
| force the driver to flush all command. | |
| virtual void | flush ()=0 |
| virtual void | enablePolygonSmoothing (bool smooth)=0 |
| Use AntiAliasing For polygons (GL_POLYGON_SMOOTH like, not the FSAA). | |
| virtual bool | isPolygonSmoothingEnabled () const =0 |
| see enablePolygonSmoothing() | |
Bench | |
| virtual void | startBench (bool wantStandardDeviation=false, bool quick=false, bool reset=true)=0 |
| virtual void | endBench ()=0 |
| virtual void | displayBench (class NLMISC::CLog *log)=0 |
Occlusion query mechanism | |
| virtual bool | supportOcclusionQuery () const =0 |
| virtual IOcclusionQuery * | createOcclusionQuery ()=0 |
| Create an occlusion query object. | |
| virtual void | deleteOcclusionQuery (IOcclusionQuery *oq)=0 |
Static Public Member Functions | |
| static void | getTextureShareName (const ITexture &tex, std::string &output) |
| Get the driver share texture name. | |
Static Public Attributes | |
| static const uint32 | InterfaceVersion = 0x62 |
| Version of the driver interface. To increment when the interface change. | |
Protected Member Functions | |
| void | removeVBDrvInfoPtr (ItVBDrvInfoPtrList vbDrvInfoIt) |
| remove ptr from the lists in the driver. | |
| void | removeIBDrvInfoPtr (ItIBDrvInfoPtrList ibDrvInfoIt) |
| void | removeTextureDrvInfoPtr (ItTexDrvInfoPtrMap texDrvInfoIt) |
| void | removeTextureDrvSharePtr (ItTexDrvSharePtrList texDrvShareIt) |
| void | removeMatDrvInfoPtr (ItMatDrvInfoPtrList shaderIt) |
| void | removeShaderDrvInfoPtr (ItShaderDrvInfoPtrList shaderIt) |
| void | removeVtxPrgDrvInfoPtr (ItVtxPrgDrvInfoPtrList vtxPrgDrvInfoIt) |
Protected Attributes | |
| CSynchronized< TTexDrvInfoPtrMap > | _SyncTexDrvInfos |
| TTexDrvSharePtrList | _TexDrvShares |
| TMatDrvInfoPtrList | _MatDrvInfos |
| TVBDrvInfoPtrList | _VBDrvInfos |
| TIBDrvInfoPtrList | _IBDrvInfos |
| TPolygonMode | _PolygonMode |
| TVtxPrgDrvInfoPtrList | _VtxPrgDrvInfos |
| TShaderDrvInfoPtrList | _ShaderDrvInfos |
| uint | _ResetCounter |
Private Attributes | |
| bool | _StaticMemoryToVRAM |
Friends | |
| class | IVBDrvInfos |
| class | IIBDrvInfos |
| class | CTextureDrvShare |
| class | ITextureDrvInfos |
| class | IMaterialDrvInfos |
| class | IVertexProgramDrvInfos |
| class | IShaderDrvInfos |
Vertex program interface | |
|
| |
| enum | TMatrix { ModelView = 0, Projection, ModelViewProjection, NumMatrix } |
| enum | TTransform { Identity = 0, Inverse, Transpose, InverseTranspose, NumTransform } |
| virtual bool | isVertexProgramSupported () const =0 |
| Does the driver supports vertex programs ? | |
| virtual bool | isVertexProgramEmulated () const =0 |
| Does the driver supports vertex program, but emulated by CPU ? | |
| virtual bool | activeVertexProgram (CVertexProgram *program)=0 |
| Activate / disactivate a vertex program. | |
| virtual void | setConstant (uint index, float, float, float, float)=0 |
| Setup constant values. | |
| virtual void | setConstant (uint index, double, double, double, double)=0 |
| virtual void | setConstant (uint index, const NLMISC::CVector &value)=0 |
| virtual void | setConstant (uint index, const NLMISC::CVectorD &value)=0 |
| 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, uint num, const double *src)=0 |
| setup several 4 double csts taken from the given tab | |
| virtual void | setConstantMatrix (uint index, TMatrix matrix, TTransform transform)=0 |
| Setup constants with a current matrix. | |
| virtual void | setConstantFog (uint index)=0 |
| Setup the constant with the fog vector. | |
| virtual bool | supportVertexProgramDoubleSidedColor () const =0 |
| Check if the driver support double sided colors vertex programs. | |
| virtual bool | supportCloudRenderSinglePass () const =0 |
| virtual void | enableVertexProgramDoubleSidedColor (bool doubleSided)=0 |
| Activate VertexProgram 2Sided Color mode. | |
Definition at line 123 of file driver.h.
Driver's polygon modes.
| NL3D::IDriver::IDriver | ( | void | ) |
Definition at line 48 of file driver.cpp.
References _PolygonMode, _ResetCounter, _StaticMemoryToVRAM, and Filled.
| NL3D::IDriver::~IDriver | ( | void | ) | [virtual] |
Definition at line 56 of file driver.cpp.
References _IBDrvInfos, _MatDrvInfos, _SyncTexDrvInfos, _TexDrvShares, _VBDrvInfos, _VtxPrgDrvInfos, and nlassert.
| virtual bool NL3D::IDriver::activate | ( | void | ) | [pure virtual] |
Before rendering via a driver in a thread, must activate() (per thread).
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::activate().
| virtual bool NL3D::IDriver::activeIndexBuffer | ( | CIndexBuffer & | IB | ) | [pure virtual] |
active a current IB, for future render().
Don't change the index buffer format/size after having activated it. Don't lock the index buffer after having activated it.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSUtil::displayArrow(), NL3D::CPSUtil::displayBBox(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSConstraintMesh::doRenderPasses(), NL3D::CDRU::drawBitmap(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CDRU::drawLine(), NL3D::CDriverUser::drawLine(), NL3D::CDRU::drawLinesUnlit(), NL3D::drawPassTriArray(), NL3D::CPSShockWaveHelper::drawShockWave(), NL3D::CDRU::drawTriangle(), NL3D::CDriverUser::drawTriangle(), NL3D::CDRU::drawTrianglesUnlit(), NL3D::CLodCharacterManager::endRender(), NL3D::CCoarseMeshManager::flushRender(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CVisualCollisionMesh::receiveShadowMap(), NL3D::CVegetableManager::render(), NL3D::CVegetableBlendLayerModel::render(), NL3D::CSegRemanence::render(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CFlareModel::renderOcclusionMeshPrimitives(), NL3D::CMeshMRMGeom::renderPass(), NL3D::CMeshGeom::renderPass(), NL3D::CShadowPolyReceiver::renderSelection(), NL3D::CMeshMRMSkinnedGeom::renderShadowSkinPrimitives(), NL3D::CMeshMRMGeom::renderShadowSkinPrimitives(), NL3D::CMeshGeom::renderSimpleWithMaterial(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass(), NL3D::CWaterEnvMap::renderTestMesh(), NL3D::CPSGravity::show(), and NL3D::CWaterEnvMap::update().
Activate a shader, NULL to disable the current shader.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::activeVertexBuffer | ( | CVertexBuffer & | VB | ) | [pure virtual] |
active a current VB, for future render().
This method suppose that all vertices in the VB will be used.
NB: please make sure you have setuped / unsetuped the current vertex program BEFORE activate the vertex buffer. Don't change the vertex buffer format/size after having activated it. Don't lock the vertex buffer after having activated it.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShadowMapManager::applyFakeGaussianBlur(), NL3D::CMeshMRMGeom::beginMesh(), NL3D::CMeshGeom::beginMesh(), NL3D::CCloud::disp(), NL3D::CCloud::dispBill(), NL3D::CPSUtil::displayArrow(), NL3D::CPSUtil::displayBBox(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CCloud::dispXYZ(), NL3D::CDeform2d::doDeform(), NL3D::CDRU::drawBitmap(), NL3D::DrawDot(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CDRU::drawLine(), NL3D::CDriverUser::drawLine(), NL3D::CDRU::drawLinesUnlit(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CDRU::drawQuad(), NL3D::CDriverUser::drawQuad(), NL3D::CDriverUser::drawQuads(), NL3D::CPSShockWaveHelper::drawShockWave(), NL3D::CDRU::drawTriangle(), NL3D::CDriverUser::drawTriangle(), NL3D::CDriverUser::drawTriangles(), NL3D::CDRU::drawTrianglesUnlit(), NL3D::CShadowMapManager::fillBlackBorder(), NL3D::CNoise3d::flush(), NL3D::CRenderStringBuffer::flush(), NL3D::CNoise3d::flush2passes(), NL3D::CCoarseMeshManager::flushRender(), NL3D::CRenderStringBuffer::flushUnProjected(), NL3D::CCloud::genBill(), NL3D::CCloud::generate(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CCloud::light(), NL3D::CFlareModel::occlusionTest(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CVisualCollisionMesh::receiveShadowMap(), NL3D::CSegRemanence::render(), NL3D::CPackedZone16::render(), NL3D::CPackedZone32::render(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CComputedString::render2D(), NL3D::CComputedString::render3D(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CFlareModel::renderOcclusionTestMesh(), NL3D::CShadowPolyReceiver::renderSelection(), NL3D::CMeshGeom::renderSimpleWithMaterial(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CWaterEnvMap::renderTestMesh(), NL3D::CCloud::reset(), NL3D::CMeshVPPerPixelLight::setupForMaterial(), NL3D::CPSGravity::show(), NL3D::CWaterModel::traverseRender(), NL3D::CFlareModel::traverseRender(), NL3D::CWaterEnvMap::update(), and NL3D::CFlareModel::updateOcclusionQuery().
| virtual bool NL3D::IDriver::activeVertexProgram | ( | CVertexProgram * | program | ) | [pure virtual] |
Activate / disactivate a vertex program.
| program | is a pointer on a vertex program. Can be NULL to disable the current vertex program. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CBloomEffect::applyBlur(), NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPWindTree::beginMBRInstance(), NL3D::CMeshVPWindTree::beginMBRMesh(), NL3D::CBloomEffect::doBlur(), NL3D::CMeshVPPerPixelLight::enable(), NL3D::CMeshVPWindTree::end(), NL3D::CMeshVPWindTree::endMBRMesh(), NL3D::CVegetableManager::exitRenderStateForBlendLayerModel(), NL3D::CFlareModel::occlusionTest(), NL3D::CVegetableManager::render(), NL3D::CLandscape::render(), NL3D::CScene::renderOcclusionTestMeshs(), NL3D::CWaterEnvMap::renderTestMesh(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CVegetableManager::setupRenderStateForBlendLayerModel(), NL3D::CWaterModel::traverseRender(), NL3D::CFlareModel::traverseRender(), NL3D::CWaterEnvMap::update(), and NL3D::CFlareModel::updateOcclusionQueryBegin().
| virtual void NL3D::IDriver::beginDialogMode | ( | ) | [pure virtual] |
enter/leave the dialog mode
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::beginDialogMode().
| virtual sint NL3D::IDriver::beginMaterialMultiPass | ( | ) | [pure virtual] |
NB: setupMaterial() must be called before those methods.
NB: This is intended to be use with the rendering of simple primitives. NB: Other render calls performs the needed setup automatically init multipass for _CurrentMaterial. return number of pass required to render this material.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CNELU::clearBuffers(), NL3D::CDriverUser::clearBuffers(), NL3D::CDriverUser::clearRGBABuffer(), NL3D::CCloud::light(), and NL3D::CShadowMapManager::renderGenerate().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::clearBuffers().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CNELU::clearBuffers(), NL3D::CDriverUser::clearBuffers(), and NL3D::CDriverUser::clearZBuffer().
| virtual bool NL3D::IDriver::copyTargetToTexture | ( | ITexture * | tex, | |
| uint32 | offsetx = 0, |
|||
| uint32 | offsety = 0, |
|||
| uint32 | x = 0, |
|||
| uint32 | y = 0, |
|||
| uint32 | width = 0, |
|||
| uint32 | height = 0, |
|||
| uint32 | mipmapLevel = 0 | |||
| ) | [pure virtual] |
Trick method : copy the current texture target into another texture without updating the current texture.
This method copies the current texture into another texture. WARNING : at the next setRenderTarget () call, the current texture target WILL NOT BE UPDATED.
When direct render to texture is not available, this method can save a texture copy :
Use this method to copy a temporary texture target into a destination texture. Then, resets the rendering target with setRenderTarget().
The temporary texture is copied into the final texture direct from the frame buffer. The temporary texture is not filled in VRAM when the framebuffer is set back as render target.
Works only if a texture is used as render target.
This method invalidates the vertex buffer, the view and model matrices, the viewport and the frustum.
| tex | the texture to render into. | |
| offsetx | x position within the destination texture. | |
| y | y position within the destination texture. | |
| x | x position within the current texture target. | |
| y | y position within the current texture target. | |
| width | width of the renderable area to copy, if 0, use the whole size. | |
| height | height of the renderable area to copy, if 0, use the whole size. | |
| mipmapLevel | the mipmap to copy texture to. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CCloud::light().
| virtual IOcclusionQuery* NL3D::IDriver::createOcclusionQuery | ( | ) | [pure virtual] |
Create an occlusion query object.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CFlareModel::occlusionTest(), and NL3D::CFlareModel::updateOcclusionQuery().
| virtual void NL3D::IDriver::deleteOcclusionQuery | ( | IOcclusionQuery * | oq | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::disableHardwareTextureShader | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::disableHardwareTextureShader().
| virtual void NL3D::IDriver::disableHardwareVertexArrayAGP | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::disableHardwareVertexArrayAGP().
| virtual void NL3D::IDriver::disableHardwareVertexProgram | ( | ) | [pure virtual] |
Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::disableHardwareVertexProgram().
| virtual void NL3D::IDriver::displayBench | ( | class NLMISC::CLog * | log | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::displayBench().
| virtual void NL3D::IDriver::enableFog | ( | bool | enable | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CCloudScape::anim(), NL3D::CDriverUser::enableFog(), NL3D::CVegetableManager::exitRenderStateForBlendLayerModel(), NL3D::CVegetableManager::render(), NL3D::CCloudScape::render(), NL3D::CShadowMapManager::renderGenerate(), and NL3D::CVegetableManager::setupRenderStateForBlendLayerModel().
Enable / disable light.
You must call setLight() if you active the light.
| num | is the number of the light to enable / disable. | |
| enable | is true to enable the light, false to disable it. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CRenderTrav::changeLightSetup(), NL3D::CDriverUser::enableLight(), NL3D::CShadowMapManager::renderProject(), and NL3D::CRenderTrav::resetLightSetup().
| virtual NLMISC::IKeyboardDevice* NL3D::IDriver::enableLowLevelKeyboard | ( | bool | enable | ) | [pure virtual] |
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 behavior
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::enableLowLevelKeyboard().
| virtual NLMISC::IMouseDevice* NL3D::IDriver::enableLowLevelMouse | ( | bool | enable, | |
| bool | exclusive | |||
| ) | [pure 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 behavior NB : - In this mode the mouse cursor isn't drawn.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::enableLowLevelMouse().
| virtual void NL3D::IDriver::enablePolygonSmoothing | ( | bool | smooth | ) | [pure virtual] |
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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShadowMapManager::renderGenerate().
| virtual void NL3D::IDriver::enableStencilTest | ( | bool | enable | ) | [pure virtual] |
Set stencil support.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::enableStencilTest().
| virtual void NL3D::IDriver::enableUsedTextureMemorySum | ( | bool | enable = true |
) | [pure virtual] |
Enable the sum of texture memory used since last swapBuffers() call.
To retrieve the memory used call getUsedTextureMemory().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::enableUsedTextureMemorySum().
| virtual void NL3D::IDriver::enableVertexProgramDoubleSidedColor | ( | bool | doubleSided | ) | [pure virtual] |
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 supported by driver
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::endBench | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::endBench().
| virtual void NL3D::IDriver::endDialogMode | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::endDialogMode().
| virtual void NL3D::IDriver::endMaterialMultiPass | ( | ) | [pure virtual] |
end multipass for this material.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::endProfileIBLock | ( | std::vector< std::string > & | result | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::endProfileIBLock().
| virtual void NL3D::IDriver::endProfileVBHardLock | ( | std::vector< std::string > & | result | ) | [pure 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 Chronological time (since last swapBuffers).
Since multiple frame are summed, an "*" is marked against the VBHard name to show if it was not always this one (ptr test and not name test) in the chronological 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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::endProfileVBHardLock().
| virtual void NL3D::IDriver::endSpecularBatch | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CSkeletonModel::renderSkinList().
fill the RGBA back buffer
| bitmap | will be written in the buffer. no-op if bad size. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::fillBuffer().
| virtual void NL3D::IDriver::finish | ( | ) | [pure virtual] |
force the driver to flush all command.
glFinish() in opengl. Interesting only for debug and profiling purpose.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::finish().
| virtual void NL3D::IDriver::flush | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::flush().
| virtual bool NL3D::IDriver::fogEnabled | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CCloudScape::anim(), NL3D::CDriverUser::fogEnabled(), NL3D::CVegetableManager::render(), NL3D::CCloudScape::render(), NL3D::CShadowMapManager::renderGenerate(), and NL3D::CVegetableManager::setupRenderStateForBlendLayerModel().
| virtual void NL3D::IDriver::forceDXTCCompression | ( | bool | dxtcComp | ) | [pure virtual] |
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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::forceDXTCCompression().
| virtual void NL3D::IDriver::forceNativeFragmentPrograms | ( | bool | nativeOnly | ) | [pure virtual] |
Sets enforcement of native fragment programs.
This is by default enabled.
| nativeOnly | If set to false, fragment programs don't need to be native to stay loaded, otherwise (aka if true) they will be purged. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::forceNativeFragmentPrograms().
| virtual void NL3D::IDriver::forceNormalize | ( | bool | normalize | ) | [pure virtual] |
Force input normal to be normalized by the driver.
default is false. NB: driver force the normalization himself if:
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshMRMGeom::beginMesh(), NL3D::CMeshMRMGeom::endMesh(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), and NL3D::CSkeletonModel::renderSkins().
| virtual void NL3D::IDriver::forceTextureResize | ( | uint | divisor | ) | [pure 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
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::forceTextureResize().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual uint32 NL3D::IDriver::getAvailableVertexAGPMemory | ( | ) | [pure virtual] |
Return the amount of AGP memory allocated by initVertexBufferHard() to store vertices.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getAvailableVertexAGPMemory().
| virtual uint32 NL3D::IDriver::getAvailableVertexVRAMMemory | ( | ) | [pure virtual] |
Return the amount of video memory allocated by initVertexBufferHard() to store vertices.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getAvailableVertexVRAMMemory().
| virtual uint8 NL3D::IDriver::getBitPerPixel | ( | ) | [pure virtual] |
Return the depth of the driver after init().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual NLMISC::CRGBA NL3D::IDriver::getBlendConstantColor | ( | ) | const [pure virtual] |
see supportBlendConstantColor().
Get the current Blend Constant Color.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::getBuffer | ( | CBitmap & | bitmap | ) | [pure virtual] |
get the RGBA back buffer.
After swapBuffers(), the content of the back buffer is undefined.
| bitmap | the buffer will be written in this bitmap |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getBuffer(), and NL3D::CNELU::screenshot().
| virtual void NL3D::IDriver::getBufferPart | ( | CBitmap & | bitmap, | |
| NLMISC::CRect & | rect | |||
| ) | [pure virtual] |
get a part of the RGBA back buffer.
After swapBuffers(), the content of the back buffer is undefined. NB: 0,0 is the bottom left corner of the screen.
| bitmap | the buffer will be written in this bitmap | |
| rect | the in/out (wanted/clipped) part of Color buffer to retrieve. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getBufferPart().
| virtual float NL3D::IDriver::getClipSpaceZMin | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getClipSpaceZMin().
| virtual TCullMode NL3D::IDriver::getCullMode | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getCullMode().
return the current screen mode (if we are in windowed, return the screen mode behind the window)
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getCurrentScreenMode().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getDepthRange(), and NL3D::CFlareModel::traverseRender().
| virtual void* NL3D::IDriver::getDisplay | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getDisplay().
Get the delay in ms for mouse double clicks.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getDoubleClickDelay().
| virtual const char* NL3D::IDriver::getDriverInformation | ( | ) | [pure virtual] |
Get driver informations.
get the nel name of the driver (ex: "Opengl 1.2 NeL Driver")
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getDriverInformation().
| virtual NLMISC::IEventEmitter* NL3D::IDriver::getEventEmitter | ( | void | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::release(), and NL3D::CDriverUser::setDisplay().
| virtual CRGBA NL3D::IDriver::getFogColor | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CLandscape::render(), and NL3D::CShadowMapManager::renderProject().
| virtual float NL3D::IDriver::getFogEnd | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CLandscape::render(), and NL3D::CShadowMapManager::renderProject().
| virtual float NL3D::IDriver::getFogStart | ( | ) | const [pure virtual] |
Get.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CVegetableManager::render(), NL3D::CLandscape::render(), NL3D::CShadowMapManager::renderProject(), and NL3D::CVegetableManager::setupRenderStateForBlendLayerModel().
| virtual CMatrix NL3D::IDriver::getFrustumMatrix | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getFrustumMatrix().
| virtual uint32 NL3D::IDriver::getImplementationVersion | ( | ) | const [pure virtual] |
Get the driver version.
Not the same than interface version. Incremented at each implementation change.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getImplementationVersion().
| virtual NLMISC::IInputDeviceManager* NL3D::IDriver::getLowLevelInputDeviceManager | ( | ) | [pure virtual] |
Check whether 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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getLowLevelInputDeviceManager().
| virtual uint NL3D::IDriver::getMaxLight | ( | ) | const [pure virtual] |
return the number of light supported by driver.
typically 8.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CRenderTrav::resetLightSetup().
| virtual uint NL3D::IDriver::getMaxVerticesByVertexBufferHard | ( | ) | const [pure virtual] |
return How many vertices VertexBufferHard support
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getModes().
| virtual uint NL3D::IDriver::getNbTextureStages | ( | ) | const [pure virtual] |
Get the number of texture stage available, for multi texturing (Normal material shaders). Valid only after setDisplay().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getNbTextureStages(), NL3D::CMaterial::isSupportedByDriver(), NL3D::CPSMultiTexturedParticle::setupMaterial(), and NL3D::CPSMultiTexturedParticle::setupMultiTexEnv().
| virtual uint NL3D::IDriver::getNumAdapter | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::getNumPerStageConstant | ( | uint & | lightedMaterial, | |
| uint & | unlightedMaterial | |||
| ) | const [pure virtual] |
Get max number of per stage constant that can be used simultaneously.
This will usually match the number of texture stages, but with a D3D driver, this feature is not available most of the time so it is emulated. If pixel shaders are available this will be fully supported.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShadowMapManager::updateBlurTexture().
| TPolygonMode NL3D::IDriver::getPolygonMode | ( | ) | [inline] |
Get the global polygon mode.
| polygon | mode choose in this driver. |
Definition at line 957 of file driver.h.
References _PolygonMode.
Referenced by NL3D::CDriverUser::getPolygonMode(), NL3D::CSegRemanence::render(), NL3D::CPackedZone16::render(), NL3D::CPackedZone32::render(), and NL3D::CScene::renderOcclusionTestMeshs().
Retrieve the render target size.
If the render target is the frame buffer, it returns the size of the frame buffer. It the render target is a texture, it returns the size of the texture mipmap selected as render target.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| uint NL3D::IDriver::getResetCounter | ( | ) | const [inline] |
Return the driver reset counter.
The reset counter is incremented at each driver reset.
Definition at line 429 of file driver.h.
References _ResetCounter.
Referenced by NL3D::CCloudScape::anim(), and NL3D::CCloudScape::init().
| bool NL3D::IDriver::getStaticMemoryToVRAM | ( | ) | const [inline] |
Definition at line 419 of file driver.h.
References _StaticMemoryToVRAM.
Referenced by NL3D::CDriverD3D::activeIndexBuffer(), NL3D::CDriverD3D::activeVertexBuffer(), NL3D::CVertexArrayRangeMapObjectATI::allocate(), NL3D::CVertexArrayRangeATI::allocate(), NL3D::CVertexArrayRangeNVidia::allocate(), NL3D::CVertexArrayRangeARB::createVBHardGL(), NL3D::CVertexArrayRangeMapObjectATI::createVBHardGL(), NL3D::CDriverGL::createVertexBufferHard(), NL3D::CVertexBufferHardARB::lock(), and NL3D::CVertexBufferHardGLMapObjectATI::lock().
| virtual uint64 NL3D::IDriver::getSwapBufferCounter | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getSwapBufferCounter(), and NL3D::CFlareModel::traverseRender().
| virtual uint NL3D::IDriver::getSwapVBLInterval | ( | ) | [pure virtual] |
get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getSwapVBLInterval().
Advanced usage.
Get the texture Handle.Useful 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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), and NL3D::CMeshMRMGeom::renderSkinGroupPrimitives().
| void NL3D::IDriver::getTextureShareName | ( | const ITexture & | tex, | |
| std::string & | output | |||
| ) | [static] |
Get the driver share texture name.
Definition at line 306 of file driver.cpp.
References NL3D::ITexture::getShareName(), NL3D::ITexture::getUploadFormat(), NL3D::ITexture::mipMapOn(), NLMISC::smprintf(), and NLMISC::toLower().
Referenced by invalidateShareTexture(), NL3D::CDriverGL::isTextureExist(), NL3D::CDriverD3D::isTextureExist(), NL3D::CDriverGL::setupTextureEx(), and NL3D::CDriverD3D::setupTextureEx().
| virtual uint32 NL3D::IDriver::getUsedTextureMemory | ( | ) | const [pure virtual] |
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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getUsedTextureMemory().
| virtual CVertexBuffer::TVertexColorType NL3D::IDriver::getVertexColorFormat | ( | ) | const [pure virtual] |
Tell if the vertex color memory format is RGBA (openGL) or BGRA (directx) BGRA : ***************************************************************** Offset: * 0 * 1 * 2 * 3 * ***************************************************************** RGBA * red * green * blue * alpha * ***************************************************************** BGRA * blue * green * red * alpha *
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::DrawDot(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSShockWaveHelper::drawShockWave(), NL3D::CCoarseMeshManager::flushRender(), NL3D::CComputedString::render2DClip(), NL3D::CComputedString::render2DUnProjected(), and NL3D::CMeshMultiLod::renderCoarseMesh().
| virtual const char* NL3D::IDriver::getVideocardInformation | ( | ) | [pure virtual] |
Get videocard informations.
get the official name of the driver
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getVideocardInformation().
| virtual CMatrix NL3D::IDriver::getViewMatrix | ( | void | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CInstanceGroup::displayDebugClusters(), and NL3D::CPSUtil::print().
| virtual void NL3D::IDriver::getViewport | ( | CViewport & | viewport | ) | [pure virtual] |
Get the current viewport.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShadowMapManager::renderGenerate(), NL3D::CDriverUser::setRenderTarget(), and NL3D::CFlareModel::traverseRender().
Get the position of the window always (0,0) in fullscreen.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getWindowPos().
| virtual emptyProc NL3D::IDriver::getWindowProc | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Get the width and the height of the window.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CFontManager::computeString(), NL3D::CFontManager::computeStringInfo(), NL3D::CRenderStringBuffer::flush(), NL3D::CDriverUser::getWindowHeight(), NL3D::CDriverUser::getWindowSize(), NL3D::CDriverUser::getWindowWidth(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CComputedString::render2D(), NL3D::CComputedString::render2DClip(), NL3D::CComputedString::render2DUnProjected(), NL3D::CComputedString::render3D(), NL3D::CShadowMapManager::renderGenerate(), and NL3D::CFlareModel::traverseRender().
| virtual void NL3D::IDriver::getZBuffer | ( | std::vector< float > & | zbuffer | ) | [pure virtual] |
get the ZBuffer (back buffer).
| zbuffer | the returned array of Z. size of getWindowSize() . |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getZBuffer().
| virtual void NL3D::IDriver::getZBufferPart | ( | std::vector< float > & | zbuffer, | |
| NLMISC::CRect & | rect | |||
| ) | [pure virtual] |
get a part of the ZBuffer (back buffer).
NB: 0,0 is the bottom left corner of the screen.
| zbuffer | the returned array of Z. size of rec.Width*rec.Height. | |
| rect | the in/out (wanted/clipped) part of ZBuffer to retrieve. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::getZBufferPart(), and NL3D::CFlareModel::traverseRender().
Implemented in NL3D::CDriverD3D, and 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 initVertexBufferHard(16Mo, 0); so this is not necessary. NB: If allocation fails, mem/=2, and retry, until mem < 500K.
| agpMem | amount of AGP Memory required. if 0, reseted. | |
| vramMem | amount of VRAM Memory required. if 0, reseted. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Invalidate shared texture.
Definition at line 272 of file driver.cpp.
References _SyncTexDrvInfos, _TexDrvShares, and getTextureShareName().
| virtual bool NL3D::IDriver::isActive | ( | ) | [pure virtual] |
Return true if driver is still active. Return false else. If he user close the window, must return false.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::isActive().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMaterial::isSupportedByDriver(), NL3D::CPSMultiTexturedParticle::setupMaterial(), and NL3D::CPSMultiTexturedParticle::setupMultiTexEnv().
| virtual bool NL3D::IDriver::isForceNormalize | ( | ) | const [pure virtual] |
return the forceNormalize() state.
Implemented in NL3D::CDriverD3D, and 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().
| virtual bool NL3D::IDriver::isLost | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::isLost().
| virtual bool NL3D::IDriver::isPolygonSmoothingEnabled | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::isStencilTestEnabled | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::isStencilTestEnabled().
| virtual bool NL3D::IDriver::isTextureAddrModeSupported | ( | CMaterial::TTexAddressingMode | mode | ) | const [pure virtual] |
test whether a texture addressing mode is supported
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSMultiTexturedParticle::enumTexs(), NL3D::CPSMultiTexturedParticle::isAlternateTextureUsed(), NL3D::CPSMultiTexturedParticle::setupMaterial(), and NL3D::CPSMultiTexturedParticle::setupMultiTexEnv().
is the texture is set up in the driver NB: this method is thread safe.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShapeBank::processWaitingShapes(), and NL3D::CAsyncFileManager3D::CMeshLoad::run().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CBloomEffect::endInterfacesDisplayBloom(), and NL3D::CDriverUser::stretchRect().
| virtual bool NL3D::IDriver::isVertexProgramEmulated | ( | ) | const [pure virtual] |
Does the driver supports vertex program, but emulated by CPU ?
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPPerPixelLight::begin(), and NL3D::CMeshVPWindTree::isMBRVpOk().
| virtual bool NL3D::IDriver::isVertexProgramSupported | ( | ) | const [pure virtual] |
Does the driver supports vertex programs ?
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPPerPixelLight::begin(), and NL3D::CMeshVPWindTree::isMBRVpOk().
| virtual bool NL3D::IDriver::isWaterShaderSupported | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CWaterModel::fillVB(), NL3D::CWaterModel::setupVertexBuffer(), 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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CLandscape::render().
| virtual uint32 NL3D::IDriver::profileAllocatedTextureMemory | ( | ) | [pure 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 :).
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::profileAllocatedTextureMemory().
| virtual void NL3D::IDriver::profileIBAllocation | ( | std::vector< std::string > & | result | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::profileIBAllocation().
| virtual void NL3D::IDriver::profileRenderedPrimitives | ( | CPrimitiveProfile & | pIn, | |
| CPrimitiveProfile & | pOut | |||
| ) | [pure virtual] |
Get the number of primitives rendered from the last swapBuffers() call.
| 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 ...). |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::profileRenderedPrimitives(), NL3D::CVegetableManager::render(), and NL3D::CVegetableBlendLayerModel::render().
| virtual uint32 NL3D::IDriver::profileSetupedMaterials | ( | ) | const [pure virtual] |
Get the number of material setuped from the last swapBuffers() call.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::profileSetupedMaterials(), and NL3D::CLandscape::render().
| virtual uint32 NL3D::IDriver::profileSetupedModelMatrix | ( | ) | const [pure virtual] |
Get the number of matrix setuped from the last swapBuffers() call.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::profileSetupedModelMatrix().
| void NL3D::IDriver::profileTextureUsage | ( | std::vector< std::string > & | result | ) |
For each texture setuped in the driver, "print" result: type, shareName, format and size (mipmap included).
Definition at line 363 of file driver.cpp.
References _TexDrvShares, NL3D::ITexture::Alpha, NL3D::ITexture::AlphaLuminance, NL3D::ITexture::Auto, NL3D::CTextureDebugKey::Category, NL3D::ITexture::DsDt, NL3D::ITexture::DXTC1, NL3D::ITexture::DXTC1Alpha, NL3D::ITexture::DXTC3, NL3D::ITexture::DXTC5, NL3D::ITexture::getShareName(), NL3D::ITexture::getTextureCategory(), NL3D::ITextureDrvInfos::getTextureMemoryUsed(), NL3D::ITexture::getUploadFormat(), Line, NL3D::ITexture::Luminance, NL3D::ITexture::CTextureCategory::Name, nlassert, NL3D::ITexture::RGB565, NL3D::ITexture::RGB888, NL3D::ITexture::RGBA4444, NL3D::ITexture::RGBA5551, NL3D::ITexture::RGBA8888, NLMISC::strFindReplace(), NL3D::ITexture::supportSharing(), NLMISC::toLower(), NLMISC::toString(), NL3D::CTextureDebugKey::UpLoadFormat, and NL3D::ITexture::UploadFormatCount.
Referenced by NL3D::CDriverUser::profileTextureUsage().
| virtual void NL3D::IDriver::profileVBHardAllocation | ( | std::vector< std::string > & | result | ) | [pure virtual] |
display VBhards allocated
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::profileVBHardAllocation().
| bool NL3D::IDriver::release | ( | void | ) | [virtual] |
Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers).
Reimplemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Definition at line 75 of file driver.cpp.
References _IBDrvInfos, _MatDrvInfos, _ShaderDrvInfos, _SyncTexDrvInfos, _TexDrvShares, _VBDrvInfos, _VtxPrgDrvInfos, and nlassert.
Referenced by NL3D::CDriverUser::release(), and NL3D::CNELU::releaseDriver().
| void NL3D::IDriver::removeIBDrvInfoPtr | ( | ItIBDrvInfoPtrList | ibDrvInfoIt | ) | [protected] |
Definition at line 238 of file driver.cpp.
References _IBDrvInfos.
Referenced by NL3D::IIBDrvInfos::~IIBDrvInfos().
| void NL3D::IDriver::removeMatDrvInfoPtr | ( | ItMatDrvInfoPtrList | shaderIt | ) | [protected] |
Definition at line 256 of file driver.cpp.
References _MatDrvInfos.
Referenced by NL3D::IMaterialDrvInfos::~IMaterialDrvInfos().
| void NL3D::IDriver::removeShaderDrvInfoPtr | ( | ItShaderDrvInfoPtrList | shaderIt | ) | [protected] |
Definition at line 261 of file driver.cpp.
References _ShaderDrvInfos.
Referenced by NL3D::IShaderDrvInfos::~IShaderDrvInfos().
| void NL3D::IDriver::removeTextureDrvInfoPtr | ( | ItTexDrvInfoPtrMap | texDrvInfoIt | ) | [protected] |
Definition at line 243 of file driver.cpp.
References _SyncTexDrvInfos.
Referenced by NL3D::ITextureDrvInfos::~ITextureDrvInfos().
| void NL3D::IDriver::removeTextureDrvSharePtr | ( | ItTexDrvSharePtrList | texDrvShareIt | ) | [protected] |
Definition at line 251 of file driver.cpp.
References _TexDrvShares.
Referenced by NL3D::CTextureDrvShare::~CTextureDrvShare().
| void NL3D::IDriver::removeVBDrvInfoPtr | ( | ItVBDrvInfoPtrList | vbDrvInfoIt | ) | [protected] |
remove ptr from the lists in the driver.
Definition at line 233 of file driver.cpp.
References _VBDrvInfos.
Referenced by NL3D::IVBDrvInfos::~IVBDrvInfos().
| void NL3D::IDriver::removeVtxPrgDrvInfoPtr | ( | ItVtxPrgDrvInfoPtrList | vtxPrgDrvInfoIt | ) | [protected] |
Definition at line 266 of file driver.cpp.
References _VtxPrgDrvInfos.
Referenced by NL3D::IVertexProgramDrvInfos::~IVertexProgramDrvInfos().
| virtual bool NL3D::IDriver::renderLines | ( | CMaterial & | mat, | |
| uint32 | firstIndex, | |||
| uint32 | nlines | |||
| ) | [pure virtual] |
Render a list of indexed lines with previously setuped VertexBuffer / IndexBuffer / Matrixes.
| mat | is the material to use during this rendering | |
| firstIndex | is the first index in the index buffer to use as first line. | |
| nlines | is the number of line to render. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSUtil::displayBBox(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSConstraintMesh::doRenderPasses(), NL3D::CDRU::drawLine(), NL3D::CDriverUser::drawLine(), NL3D::CDRU::drawLinesUnlit(), and NL3D::CPSGravity::show().
| virtual bool NL3D::IDriver::renderLinesWithIndexOffset | ( | CMaterial & | mat, | |
| uint32 | firstIndex, | |||
| uint32 | nlines, | |||
| uint | indexOffset | |||
| ) | [pure virtual] |
If the driver support it, primitive can be rendered with an offset added to each index These are the offseted version of the 'render' functions.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::renderRawLines | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numTri | |||
| ) | [pure virtual] |
Render lines with previously setuped VertexBuffer / Matrixes.
Lines are stored as a sequence in the vertex buffer.
| mat | is the material to use during this rendering | |
| startVertex | is the first vertex to use during this rendering. | |
| numLine | is the number of line to render. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::renderRawPoints | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numPoints | |||
| ) | [pure virtual] |
Render points with previously setuped VertexBuffer / Matrixes.
Points are stored as a sequence in the vertex buffer.
| mat | is the material to use during this rendering | |
| startVertex | is the first vertex to use during this rendering. | |
| numPoints | is the number of point to render. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::DrawDot(), and NL3D::CFlareModel::updateOcclusionQuery().
| virtual bool NL3D::IDriver::renderRawQuads | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numQuads | |||
| ) | [pure virtual] |
render quads with previously setuped VertexBuffer / Matrixes.
Quads are stored as a sequence in the vertex buffer. There's a guaranty for the orientation of its diagonal, which is drawn as follow :
3----2 | / | | / | |/ | 0----1
| mat | is the material to use during this rendering | |
| startVertex | is the first vertex to use during this rendering. | |
| numQuad | is the number of quad to render. |
Implemented in NL3D::CDriverD3D, and 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::CDRU::drawQuad(), NL3D::CDriverUser::drawQuad(), 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::CShadowMapManager::renderGenerate(), NL3D::CCloud::reset(), and NL3D::CFlareModel::traverseRender().
| virtual bool NL3D::IDriver::renderRawTriangles | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numTri | |||
| ) | [pure virtual] |
Render triangles with previously setuped VertexBuffer / Matrixes.
Triangles are stored as a sequence in the vertex buffer.
| mat | is the material to use during this rendering | |
| startVertex | is the first vertex to use during this rendering. | |
| numTri | is the number of triangle to render. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::drawTriangles(), NL3D::CPackedZone16::render(), NL3D::CPackedZone32::render(), and NL3D::CWaterModel::traverseRender().
| virtual bool NL3D::IDriver::renderSimpleTriangles | ( | uint32 | firstIndex, | |
| uint32 | ntris | |||
| ) | [pure virtual] |
Render a list of triangles with previously setuped VertexBuffer / IndexBuffer / 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 useful for landscape....
| firstIndex | is the first index in the index buffer to use as first triangle. | |
| ntris | is the number of triangle to render. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::drawPassTriArray(), NL3D::CVegetableManager::render(), NL3D::CVegetableBlendLayerModel::render(), and NL3D::CFlareModel::renderOcclusionMeshPrimitives().
| virtual bool NL3D::IDriver::renderSimpleTrianglesWithIndexOffset | ( | uint32 | firstIndex, | |
| uint32 | ntris, | |||
| uint | indexOffset | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::renderTriangles | ( | CMaterial & | mat, | |
| uint32 | firstIndex, | |||
| uint32 | ntris | |||
| ) | [pure virtual] |
Render a list of indexed triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes.
| mat | is the material to use during this rendering | |
| firstIndex | is the first index in the index buffer to use as first triangle. | |
| ntris | is the number of triangle to render. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSUtil::displayArrow(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSConstraintMesh::doRenderPasses(), NL3D::CDRU::drawBitmap(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSShockWaveHelper::drawShockWave(), NL3D::CDRU::drawTriangle(), NL3D::CDriverUser::drawTriangle(), NL3D::CDRU::drawTrianglesUnlit(), NL3D::CLodCharacterManager::endRender(), NL3D::CCoarseMeshManager::flushRender(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CVisualCollisionMesh::receiveShadowMap(), NL3D::CSegRemanence::render(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CMeshMRMGeom::renderPass(), NL3D::CMeshGeom::renderPass(), NL3D::CShadowPolyReceiver::renderSelection(), NL3D::CMeshMRMSkinnedGeom::renderShadowSkinPrimitives(), NL3D::CMeshMRMGeom::renderShadowSkinPrimitives(), NL3D::CMeshGeom::renderSimpleWithMaterial(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass(), NL3D::CWaterEnvMap::renderTestMesh(), and NL3D::CWaterEnvMap::update().
| virtual bool NL3D::IDriver::renderTrianglesWithIndexOffset | ( | CMaterial & | mat, | |
| uint32 | firstIndex, | |||
| uint32 | ntris, | |||
| uint | indexOffset | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Choose the hardware renderer.
Call it before the setDisplay and enumModes methods Choose adapter = 0xffffffff for the default one.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::setAmbientColor | ( | CRGBA | color | ) | [pure virtual] |
Set ambient.
| color | is the new global ambient color for the scene. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CRenderTrav::resetLightSetup(), and NL3D::CDriverUser::setAmbientColor().
| virtual void NL3D::IDriver::setBlendConstantColor | ( | NLMISC::CRGBA | col | ) | [pure virtual] |
see supportBlendConstantColor().
Set the current Blend Constant Color.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshBlender::prepareRenderForGlobalAlpha(), and NL3D::CMeshBlender::prepareRenderForGlobalAlphaCoarseMesh().
| virtual void NL3D::IDriver::setCapture | ( | bool | b | ) | [pure virtual] |
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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setCapture().
| virtual void NL3D::IDriver::setColorMask | ( | bool | bRed, | |
| bool | bGreen, | |||
| bool | bBlue, | |||
| bool | bAlpha | |||
| ) | [pure virtual] |
Set the color mask filter through where the operation done will pass.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CCloud::light(), NL3D::CFlareModel::occlusionTest(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CDriverUser::setColorMask(), NL3D::CFlareModel::updateOcclusionQueryBegin(), and NL3D::CFlareModel::updateOcclusionQueryEnd().
setup several 4 double csts taken from the given tab
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
setup several 4 float csts taken from the given tab
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::setConstant | ( | uint | index, | |
| const NLMISC::CVectorD & | value | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::setConstant | ( | uint | index, | |
| const NLMISC::CVector & | value | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::setConstant | ( | uint | index, | |
| double | , | |||
| double | , | |||
| double | , | |||
| double | ||||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::setConstant | ( | uint | index, | |
| float | , | |||
| float | , | |||
| float | , | |||
| float | ||||
| ) | [pure virtual] |
Setup constant values.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CBloomEffect::applyBlur(), NL3D::CMeshVPPerPixelLight::begin(), NL3D::CRenderTrav::beginVPLightSetup(), NL3D::CRenderTrav::changeVPLightSetupMaterial(), NL3D::CBloomEffect::doBlur(), NL3D::CLandscape::render(), NL3D::CWaterEnvMap::renderTestMesh(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CMeshVPWindTree::setupPerInstanceConstants(), NL3D::CMeshVPWindTree::setupPerMesh(), and NL3D::CVegetableManager::setupVertexProgramConstants().
| virtual void NL3D::IDriver::setConstantFog | ( | uint | index | ) | [pure virtual] |
Setup the constant with the fog vector.
This vector must be used to get the final fog value in a vertex shader. You must use it like this: DP4 o[FOGC].x, c[4], R4; With c[4] the constant used for the fog vector and R4 the vertex local position.
This call must be done after setFrustum(), setupViewMatrix(), setupModelMatrix() and setupFog() to get correct results.
| index | is the index where to store the vector. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CLandscape::render(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CMeshVPWindTree::setupPerInstanceConstants(), NL3D::CVegetableManager::setupRenderStateForBlendLayerModel(), and NL3D::CVegetableManager::setupVertexProgramConstants().
| virtual void NL3D::IDriver::setConstantMatrix | ( | uint | index, | |
| TMatrix | matrix, | |||
| TTransform | transform | |||
| ) | [pure virtual] |
Setup constants with a current matrix.
This call must be done after setFrustum(), setupViewMatrix() or setupModelMatrix() to get correct results.
| index | is the base constant index where to store the matrix. This index must be a multiple of 4. | |
| matrix | is the matrix id to store in the constants | |
| transform | is the transformation to apply to the matrix before store it in the constants. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshVPPerPixelLight::begin(), NL3D::CLandscape::render(), NL3D::CWaterEnvMap::renderTestMesh(), NL3D::CWaterModel::setupMaterialNVertexShader(), NL3D::CMeshVPWindTree::setupPerInstanceConstants(), and NL3D::CVegetableManager::setupVertexProgramConstants().
| virtual void NL3D::IDriver::setCullMode | ( | TCullMode | cullMode | ) | [pure virtual] |
Set cull mode Useful for mirrors / cube map rendering or when the scene must be rendered upside down.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setCullMode().
Set depth range.
Depth range specify a linear mapping from device z coordinates (in the [-1, 1] range) to window coordinates (in the [0, 1] range) This mapping occurs after clipping of primitives and division by w of vertices coordinates. Default depth range is [0, 1]. NB : znear should be different from zfar or an assertion is raised
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setDepthRange().
| virtual bool NL3D::IDriver::setDisplay | ( | void * | wnd, | |
| const GfxMode & | mode, | |||
| bool | show = true, |
|||
| bool | resizeable = true | |||
| ) | throw (EBadDisplay) [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setDisplay().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSMultiTexturedParticle::setupMaterial().
| virtual void NL3D::IDriver::setFrustum | ( | float | left, | |
| float | right, | |||
| float | bottom, | |||
| float | top, | |||
| float | znear, | |||
| float | zfar, | |||
| bool | perspective = true | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and 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::CCloud::generate(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CCloud::light(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CCloudScape::render(), NL3D::CComputedString::render2D(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CCloud::reset(), NL3D::CDriverUser::restoreMatrixContextMatrixOnly(), NL3D::CRenderTrav::setupDriverCamera(), NL3D::CDriverUser::setupMatrixContext(), and NL3D::CWaterEnvMap::update().
| virtual void NL3D::IDriver::setFrustumMatrix | ( | CMatrix & | frust | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setFrustumMatrix().
Setup a light.
You must call enableLight() to active the light.
| num | is the number of the light to set. | |
| light | is a light to set in this slot. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CRenderTrav::changeLightSetup(), NL3D::CVisualCollisionManager::receiveShadowMap(), NL3D::CRenderTrav::resetLightSetup(), and NL3D::CDriverUser::setLight().
| virtual void NL3D::IDriver::setLightMapDynamicLight | ( | bool | enable, | |
| const CLight & | light | |||
| ) | [pure virtual] |
Setup the unique light used for Lightmap Shader.
Lightmaped primitives are lit per vertex with this light (should be local attenuated for maximum efficiency) This is only useful for material that have their shader set as 'LightMap'
| the | light used for per pixel lighting |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CLightTrav::traverse(), and NL3D::CPointLightModel::traverseLight().
| virtual void NL3D::IDriver::setMatrix2DForTextureOffsetAddrMode | ( | const uint | stage, | |
| const float | mat[4] | |||
| ) | [pure virtual] |
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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSMultiTexturedParticle::setupMaterial().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setMode().
| virtual bool NL3D::IDriver::setMonitorColorProperties | ( | const CMonitorColorProperties & | properties | ) | [pure virtual] |
Setup monitor color properties.
Return false if setup failed.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setMonitorColorProperties().
x and y must be between 0.0 and 1.0
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setMousePos().
| virtual void NL3D::IDriver::setPerPixelLightingLight | ( | CRGBA | diffuse, | |
| CRGBA | specular, | |||
| float | shininess | |||
| ) | [pure virtual] |
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'
| the | light used for per pixel lighting |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshVPPerPixelLight::setupForMaterial().
| virtual void NL3D::IDriver::setPolygonMode | ( | TPolygonMode | mode | ) | [inline, virtual] |
Set the global polygon mode.
Can be filled, line or point. The implementation driver must call IDriver::setPolygonMode and active this mode.
| polygon | mode choose in this driver. |
Reimplemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Definition at line 896 of file driver.h.
References _PolygonMode.
Referenced by NL3D::CCloud::dispBill(), NL3D::CSegRemanence::render(), NL3D::CPackedZone16::render(), NL3D::CPackedZone32::render(), NL3D::CScene::renderOcclusionTestMeshs(), and NL3D::CDriverUser::setPolygonMode().
| virtual bool NL3D::IDriver::setRenderTarget | ( | ITexture * | tex, | |
| uint32 | x = 0, |
|||
| uint32 | y = 0, |
|||
| uint32 | width = 0, |
|||
| uint32 | height = 0, |
|||
| uint32 | mipmapLevel = 0, |
|||
| uint32 | cubeFace = 0 | |||
| ) | [pure virtual] |
Set the current render target.
The render target can be a texture (tex pointer) or the back buffer (tex = NULL). 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 data 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.
When direct render to texture is not available (openGl), it uses the frame buffer for the rendering and copy the frame buffer content into the texture when setRenderTarget(NULL) is called.
The x, y, width and height parameters are only used in this case to optimize the copy from the framebuffer to the texture.
If a texture is set as target, the viewport and the scissor are now relative to the texture sizes, and not to the x, y, width and height parameters.
The texture content can be lost after the first setRenderTarget().
The texture must have the render target abilities enabled. (ITexture::setRenderTarget ())
| tex | the texture to render into. | |
| x | x position within the destination texture of the renderable area. | |
| y | y position within the destination texture of the renderable area. | |
| width | width of the renderable area, if 0, use the whole size. | |
| height | height of the renderable area, if 0, use the whole size. | |
| mipmapLevel | the mipmap to copy texture to. | |
| cubaFace | the face of the cube to copy texture to. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CCloud::genBill(), NL3D::CCloud::generate(), NL3D::CCloud::light(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CCloud::reset(), NL3D::CDriverUser::setRenderTarget(), and NL3D::CWaterEnvMap::update().
| void NL3D::IDriver::setStaticMemoryToVRAM | ( | bool | staticMemoryToVRAM | ) |
Definition at line 325 of file driver.cpp.
References _StaticMemoryToVRAM.
| virtual void NL3D::IDriver::setSwapVBLInterval | ( | uint | interval | ) | [pure virtual] |
set the number of VBL wait when a swapBuffers() is issued.
0 means no synchronisation to the VBL Default is 1. Values >1 may be clamped to 1 by the driver.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setSwapVBLInterval().
setup fog parameters. fog must enabled to see result. start and end are distance values.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CLandscape::render(), NL3D::CShadowMapManager::renderProject(), and NL3D::CDriverUser::setupFog().
| virtual void NL3D::IDriver::setupMaterialPass | ( | uint | pass | ) | [pure virtual] |
active the ith pass of this material.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual void NL3D::IDriver::setupModelMatrix | ( | const CMatrix & | mtx | ) | [pure virtual] |
setup the model matrix.
NB: you must setupModelMatrix() AFTER setupViewMatrix(), or else undefined results.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshMRMGeom::activeInstance(), NL3D::CMeshGeom::activeInstance(), NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CCloud::disp(), NL3D::CPSUtil::displayBasis(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CDeform2d::doDeform(), NL3D::CDRU::drawBitmap(), NL3D::CDRU::drawLine(), NL3D::CDRU::drawQuad(), NL3D::CDRU::drawTriangle(), NL3D::CLodCharacterManager::endRender(), NL3D::CRenderStringBuffer::flush(), NL3D::CCoarseMeshManager::flushRender(), NL3D::CCloud::genBill(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CMotionBlur::performMotionBlur(), NL3D::CVisualCollisionMesh::receiveShadowMap(), NL3D::CLandscapeModel::receiveShadowMap(), NL3D::CVegetableManager::render(), NL3D::CSegRemanence::render(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CCloudScape::render(), NL3D::CComputedString::render2D(), NL3D::CComputedString::render3D(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CMeshGeom::renderSimpleWithMaterial(), NL3D::CSkeletonModel::renderSkins(), NL3D::CDriverUser::restoreMatrixContextMatrixOnly(), NL3D::CCloud::setMode2D(), NL3D::CPSLocated::setupDriverModelMatrix(), NL3D::CDriverUser::setupMatrixContext(), NL3D::CFlareModel::setupOcclusionMeshMatrix(), NL3D::CVegetableManager::setupRenderStateForBlendLayerModel(), NL3D::CPSLight::show(), NL3D::CPSGravity::show(), NL3D::CParticleSystem::step(), NL3D::CWaterModel::traverseRender(), NL3D::CFlareModel::traverseRender(), NL3D::CWaterEnvMap::update(), and NL3D::CFlareModel::updateOcclusionQueryBegin().
| virtual void NL3D::IDriver::setupScissor | ( | const class CScissor & | scissor | ) | [pure virtual] |
Set the current Scissor.
| scissor | is a scissor to setup the current Scissor, in Window relative coordinate (0,1). |
Implemented in NL3D::CDriverD3D, and 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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CParticleSystemShape::flushTextures(), NL3D::CMaterial::flushTextures(), NL3D::CFlareShape::flushTextures(), NL3D::CLandscape::flushTiles(), NL3D::CWaterEnvMap::init(), NL3D::CBloomEffect::initTexture(), NL3D::CParticleSystemShape::instanciatePS(), NL3D::CLandscape::render(), and NL3D::CWaterPoolManager::setBlendFactor().
| virtual bool NL3D::IDriver::setupTextureEx | ( | ITexture & | tex, | |
| bool | bUpload, | |||
| bool & | bAllUploaded, | |||
| bool | bMustRecreateSharedTexture = false | |||
| ) | [pure virtual] |
setup a texture in the driver.
| bUpload | if true the texture is created and uploaded to VRAM, if false the texture is only created it is useful for the async upload texture to only create the texture and then make invalidate to upload small piece each frame. There is ONE case where bUpload is forced to be true inside the method: if the texture must be converted to RGBA. |
| bAllUploaded | true if any upload arise (texture invalid, must convert texture etc...). | |
| bMustRecreateSharedTexture | if true and if the texture supportSharing, then the texture is recreated (and uploaded if bUpload==true) into the shared DrvInfo (if found). Default setup (false) imply that the DrvInfo is only bound to tex (thus creating and uploading nothing) NB: the texture must be at least touch()-ed for the recreate to work. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShapeBank::processWSUploadTexture(), and NL3D::CAsyncTextureManager::uploadTexturePart().
| virtual void NL3D::IDriver::setupViewMatrix | ( | const CMatrix & | mtx | ) | [pure virtual] |
setup the view matrix (inverse of camera matrix).
NB: you must setupViewMatrix() BEFORE setupModelMatrix(), or else undefined results.
Implemented in NL3D::CDriverD3D, and 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(), NL3D::CDriverUser::setupMatrixContext(), and NL3D::CWaterEnvMap::update().
| virtual void NL3D::IDriver::setupViewMatrixEx | ( | const CMatrix & | mtx, | |
| const CVector & | cameraPos | |||
| ) | [pure virtual] |
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.
| mtx | the same view matrix (still with correct "inversed" camera position) as if passed in setupViewMatrix() | |
| cameraPos | position of the camera (before inversion, ie mtx.getPos()!=cameraPos ). |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CRenderTrav::setupDriverCamera().
| virtual void NL3D::IDriver::setupViewport | ( | const class CViewport & | viewport | ) | [pure virtual] |
Set the current viewport.
| viewport | is a viewport to setup as current viewport. |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CCloud::disp(), NL3D::CDRU::drawBitmap(), NL3D::CDRU::drawLine(), NL3D::CDRU::drawQuad(), NL3D::CDRU::drawTriangle(), NL3D::CCloud::genBill(), NL3D::CCloud::light(), NL3D::CCloudScape::render(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CScene::renderOcclusionTestMeshs(), NL3D::CCloud::setMode2D(), NL3D::CDriverUser::setupMatrixContext(), and NL3D::CRenderTrav::traverse().
Set the position of the NeL window.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setWindowPos().
| virtual void NL3D::IDriver::setWindowTitle | ( | const ucstring & | title | ) | [pure virtual] |
Set the title of the NeL window.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::setWindowTitle().
| virtual void NL3D::IDriver::showCursor | ( | bool | b | ) | [pure virtual] |
show cursor if b is true, or hide it if b is false
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::showCursor().
| virtual void NL3D::IDriver::showWindow | ( | bool | show | ) | [pure virtual] |
Show or hide the NeL window.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::showWindow().
| virtual bool NL3D::IDriver::slowUnlockVertexBufferHard | ( | ) | const [pure virtual] |
return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL).
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshGeom::render().
| virtual void NL3D::IDriver::startBench | ( | bool | wantStandardDeviation = false, |
|
| bool | quick = false, |
|||
| bool | reset = true | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::startBench().
| virtual void NL3D::IDriver::startProfileIBLock | ( | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::startProfileIBLock().
| virtual void NL3D::IDriver::startProfileVBHardLock | ( | ) | [pure virtual] |
If the driver support it, enable profile VBHard locks.
No-Op if already profiling
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::startProfileVBHardLock().
| virtual void NL3D::IDriver::startSpecularBatch | ( | ) | [pure virtual] |
Special for Faster Specular Setup.
Call this between lot of primitives rendered with Specular Materials. Visual Errors may arise if you don't correctly call endSpecularBatch().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CSkeletonModel::renderSkinList().
| virtual void NL3D::IDriver::stencilFunc | ( | TStencilFunc | stencilFunc, | |
| int | ref, | |||
| uint | mask | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::stencilFunc().
| virtual void NL3D::IDriver::stencilMask | ( | uint | mask | ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::stencilMask().
| virtual void NL3D::IDriver::stencilOp | ( | TStencilOp | fail, | |
| TStencilOp | zfail, | |||
| TStencilOp | zpass | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::stencilOp().
| virtual bool NL3D::IDriver::stretchRect | ( | ITexture * | srcText, | |
| NLMISC::CRect & | srcRect, | |||
| ITexture * | destText, | |||
| NLMISC::CRect & | destRect | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::stretchRect().
| virtual bool NL3D::IDriver::supportBlendConstantColor | ( | ) | const [pure virtual] |
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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMaterial::isSupportedByDriver(), NL3D::CMeshBlender::prepareRenderForGlobalAlpha(), NL3D::CMeshBlender::prepareRenderForGlobalAlphaCoarseMesh(), NL3D::CMeshBlender::restoreRender(), and NL3D::CMeshBlender::restoreRenderCoarseMesh().
| virtual bool NL3D::IDriver::supportBloomEffect | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CDriverUser::supportBloomEffect().
| virtual bool NL3D::IDriver::supportCloudRenderSinglePass | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CNoise3d::CNoise3d().
| virtual bool NL3D::IDriver::supportEMBM | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CPSMultiTexturedParticle::enumTexs(), NL3D::CPSMultiTexturedParticle::isAlternateTextureUsed(), NL3D::CMaterial::isSupportedByDriver(), NL3D::CPSMultiTexturedParticle::setupMaterial(), and NL3D::CPSMultiTexturedParticle::setupMultiTexEnv().
| virtual bool NL3D::IDriver::supportIndexOffset | ( | ) | const [pure virtual] |
return true if driver support indices offset.
That is, allow to specify a constant value that is added to each index in current active active index buffer when rendering indexed primitives
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::supportMADOperator | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMaterial::isSupportedByDriver(), and NL3D::CDriverUser::supportMADOperator().
| virtual bool NL3D::IDriver::supportOcclusionQuery | ( | ) | const [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CFlareModel::occlusionTest(), NL3D::CFlareModel::traverseRender(), and NL3D::CFlareModel::updateOcclusionQuery().
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CMeshVPPerPixelLight::begin(), and NL3D::CMaterial::isSupportedByDriver().
| virtual bool NL3D::IDriver::supportTextureShaders | ( | ) | const [pure virtual] |
test whether the device supports some form of texture shader. (could be limited to DX6 EMBM for example)
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::supportVertexBufferHard | ( | ) | const [pure virtual] |
return true if driver support VertexBufferHard.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::supportVertexProgramDoubleSidedColor | ( | ) | const [pure virtual] |
Check if the driver support double sided colors vertex programs.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
| virtual bool NL3D::IDriver::supportVolatileVertexBuffer | ( | ) | const [pure virtual] |
return true if volatile vertex buffer are supported.
(e.g a vertex buffer which can be created with the flag CVertexBuffer::AGPVolatile or CVertexBuffer::RAMVolatile) If these are not supported, a RAM vb is created instead (transparent to user)
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CVertexStreamManager::init().
| virtual bool NL3D::IDriver::swapBuffers | ( | void | ) | [pure virtual] |
Swap the back and front buffers.
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CNELU::swapBuffers(), and 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::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CAsyncTextureManager::update(), and NL3D::CAsyncTextureManager::updateTextureLodSystem().
| IDriver::TMessageBoxId NL3D::IDriver::systemMessageBox | ( | const char * | message, | |
| const char * | title, | |||
| IDriver::TMessageBoxType | type = okType, |
|||
| IDriver::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.
| 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... |
Reimplemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Definition at line 156 of file driver.cpp.
References abortId, abortRetryIgnoreType, cancelId, iconCount, ignoreId, nlassert, noId, okCancelType, okId, okType, retryCancelType, retryId, typeCount, yesId, yesNoCancelType, and yesNoType.
Referenced by NL3D::CDriverUser::systemMessageBox().
| virtual bool NL3D::IDriver::uploadTexture | ( | ITexture & | tex, | |
| NLMISC::CRect & | rect, | |||
| uint8 | nNumMipMap | |||
| ) | [pure virtual] |
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); For compressed textures, the rect must aligned on pixel block. (a block of pixel size is 4x4 pixels).
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShapeBank::processWSUploadTexture(), and NL3D::CAsyncTextureManager::uploadTexturePart().
| virtual bool NL3D::IDriver::uploadTextureCube | ( | ITexture & | tex, | |
| NLMISC::CRect & | rect, | |||
| uint8 | nNumMipMap, | |||
| uint8 | nNumFace | |||
| ) | [pure virtual] |
Implemented in NL3D::CDriverD3D, and NL3D::CDriverGL.
Referenced by NL3D::CShapeBank::processWSUploadTexture().
friend class CTextureDrvShare [friend] |
Definition at line 1237 of file driver.h.
Referenced by NL3D::CDriverGL::setupTextureEx(), and NL3D::CDriverD3D::setupTextureEx().
friend class IIBDrvInfos [friend] |
friend class IMaterialDrvInfos [friend] |
friend class IShaderDrvInfos [friend] |
friend class ITextureDrvInfos [friend] |
friend class IVBDrvInfos [friend] |
friend class IVertexProgramDrvInfos [friend] |
TIBDrvInfoPtrList NL3D::IDriver::_IBDrvInfos [protected] |
Definition at line 160 of file driver.h.
Referenced by NL3D::CDriverD3D::activeIndexBuffer(), NL3D::CDriverD3D::profileIBAllocation(), release(), removeIBDrvInfoPtr(), NL3D::CDriverD3D::reset(), and ~IDriver().
TMatDrvInfoPtrList NL3D::IDriver::_MatDrvInfos [protected] |
Definition at line 158 of file driver.h.
Referenced by release(), removeMatDrvInfoPtr(), NL3D::CDriverD3D::reset(), NL3D::CDriverGL::setupMaterial(), NL3D::CDriverD3D::setupMaterial(), and ~IDriver().
TPolygonMode NL3D::IDriver::_PolygonMode [protected] |
Definition at line 161 of file driver.h.
Referenced by getPolygonMode(), IDriver(), NL3D::CDriverGL::setPolygonMode(), and setPolygonMode().
uint NL3D::IDriver::_ResetCounter [protected] |
Definition at line 165 of file driver.h.
Referenced by getResetCounter(), IDriver(), NL3D::CDriverGL::incrementResetCounter(), and NL3D::CDriverD3D::reset().
TShaderDrvInfoPtrList NL3D::IDriver::_ShaderDrvInfos [protected] |
Definition at line 163 of file driver.h.
Referenced by NL3D::CDriverD3D::activeShader(), NL3D::CDriverD3D::notifyAllShaderDrvOfLostDevice(), NL3D::CDriverD3D::notifyAllShaderDrvOfResetDevice(), release(), and removeShaderDrvInfoPtr().
bool NL3D::IDriver::_StaticMemoryToVRAM [private] |
Definition at line 1253 of file driver.h.
Referenced by getStaticMemoryToVRAM(), IDriver(), and setStaticMemoryToVRAM().
CSynchronized<TTexDrvInfoPtrMap> NL3D::IDriver::_SyncTexDrvInfos [protected] |
Definition at line 155 of file driver.h.
Referenced by invalidateShareTexture(), NL3D::CDriverGL::isTextureExist(), NL3D::CDriverD3D::isTextureExist(), release(), removeTextureDrvInfoPtr(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), and ~IDriver().
TTexDrvSharePtrList NL3D::IDriver::_TexDrvShares [protected] |
Definition at line 157 of file driver.h.
Referenced by invalidateShareTexture(), profileTextureUsage(), release(), removeTextureDrvSharePtr(), NL3D::CDriverD3D::reset(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), and ~IDriver().
TVBDrvInfoPtrList NL3D::IDriver::_VBDrvInfos [protected] |
Definition at line 159 of file driver.h.
Referenced by NL3D::CDriverD3D::activeVertexBuffer(), release(), removeVBDrvInfoPtr(), NL3D::CDriverD3D::reset(), NL3D::CDriverGL::setupVertexBuffer(), and ~IDriver().
TVtxPrgDrvInfoPtrList NL3D::IDriver::_VtxPrgDrvInfos [protected] |
Definition at line 162 of file driver.h.
Referenced by NL3D::CDriverGL::activeARBVertexProgram(), NL3D::CDriverGL::activeEXTVertexShader(), NL3D::CDriverGL::activeNVVertexProgram(), NL3D::CDriverD3D::activeVertexProgram(), release(), removeVtxPrgDrvInfoPtr(), and ~IDriver().
const uint32 NL3D::IDriver::InterfaceVersion = 0x62 [static] |
Version of the driver interface. To increment when the interface change.
Definition at line 127 of file driver.h.
Referenced by NL3D::__declspec(), NL3D::CDRU::createGlDriver(), and NL3D::NL3D_interfaceVersion().
1.6.1