#include <driver_opengl.h>
Inherits NL3D::IDriver.
Classes | |
| struct | CVBHardProfile |
Public Types | |
| enum | { MaxLight = 8 } |
Public Member Functions | |
| uint32 | getHwnd () |
| CDriverGL () | |
| virtual | ~CDriverGL () |
| virtual bool | isLost () const |
| virtual bool | init (uint windowIcon=0, emptyProc exitFunc=0) |
| virtual void | disableHardwareVertexProgram () |
| Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly. | |
| virtual void | disableHardwareVertexArrayAGP () |
| virtual void | disableHardwareTextureShader () |
| virtual bool | setDisplay (void *wnd, const GfxMode &mode, bool show, bool resizeable) throw (EBadDisplay) |
| virtual bool | setMode (const GfxMode &mode) |
| virtual bool | getModes (std::vector< GfxMode > &modes) |
| virtual bool | getCurrentScreenMode (GfxMode &mode) |
| return the current screen mode (if we are in windowed, return the screen mode behind the window) | |
| virtual void | beginDialogMode () |
| enter/leave the dialog mode | |
| virtual void | endDialogMode () |
| virtual void | setWindowTitle (const ucstring &title) |
| Set the title of the NeL window. | |
| virtual void | setWindowPos (uint32 x, uint32 y) |
| Set the position of the NeL window. | |
| virtual void | showWindow (bool show) |
| Show or hide the NeL window. | |
| virtual void * | getDisplay () |
| virtual uint32 | getAvailableVertexAGPMemory () |
| Return the amount of AGP memory allocated by initVertexBufferHard() to store vertices. | |
| virtual uint32 | getAvailableVertexVRAMMemory () |
| Return the amount of video memory allocated by initVertexBufferHard() to store vertices. | |
| virtual emptyProc | getWindowProc () |
| virtual bool | activate () |
| Before rendering via a driver in a thread, must activate() (per thread). | |
| virtual uint | getNbTextureStages () const |
| Get the number of texture stage available, for multi texturing (Normal material shaders). Valid only after setDisplay(). | |
| virtual bool | isTextureExist (const ITexture &tex) |
| is the texture is set up in the driver NB: this method is thread safe. | |
| virtual NLMISC::IEventEmitter * | getEventEmitter () |
| virtual bool | clear2D (CRGBA rgba) |
| virtual bool | clearZBuffer (float zval=1) |
| virtual bool | clearStencilBuffer (float stencilval=0) |
| virtual void | setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha) |
| Set the color mask filter through where the operation done will pass. | |
| virtual void | setDepthRange (float znear, float zfar) |
| Set depth range. | |
| virtual void | getDepthRange (float &znear, float &zfar) const |
| virtual bool | setupTexture (ITexture &tex) |
| setup a texture, generate and upload if needed. | |
| virtual bool | setupTextureEx (ITexture &tex, bool bUpload, bool &bAllUploaded, bool bMustRecreateSharedTexture=false) |
| setup a texture in the driver. | |
| virtual bool | uploadTexture (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap) |
| The texture must be created or uploadTexture do nothing. | |
| virtual bool | uploadTextureCube (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap, uint8 nNumFace) |
| virtual void | forceDXTCCompression (bool dxtcComp) |
| if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed. | |
| virtual void | forceTextureResize (uint divisor) |
| if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc. | |
| virtual void | forceNativeFragmentPrograms (bool nativeOnly) |
| Sets enforcement of native fragment programs. | |
| void | setTextureEnvFunction (uint stage, CMaterial &mat) |
| Setup texture env functions. Used by setupMaterial. | |
| void | setupUserTextureMatrix (uint numStages, CMaterial &mat) |
| setup the texture matrix for a given number of stages (starting from 0) | |
| void | disableUserTextureMatrix () |
| disable all texture matrix | |
| virtual bool | setupMaterial (CMaterial &mat) |
| For objects with caustics, setup the first texture (which actually is the one from the material). | |
| virtual void | startSpecularBatch () |
| Special for Faster Specular Setup. | |
| virtual void | endSpecularBatch () |
| virtual void | setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true) |
| virtual void | setFrustumMatrix (CMatrix &frust) |
| virtual CMatrix | getFrustumMatrix () |
| virtual float | getClipSpaceZMin () const |
| virtual void | setupViewMatrix (const CMatrix &mtx) |
| setup the view matrix (inverse of camera matrix). | |
| virtual void | setupViewMatrixEx (const CMatrix &mtx, const CVector &cameraPos) |
| setup the view matrix (inverse of camera matrix). | |
| virtual void | setupModelMatrix (const CMatrix &mtx) |
| setup the model matrix. | |
| virtual CMatrix | getViewMatrix () const |
| virtual bool | activeShader (CShader *shd) |
| Activate a shader, NULL to disable the current shader. | |
| virtual void | forceNormalize (bool normalize) |
| Force input normal to be normalized by the driver. | |
| virtual bool | isForceNormalize () const |
| return the forceNormalize() state. | |
| virtual void | getNumPerStageConstant (uint &lightedMaterial, uint &unlightedMaterial) const |
| Get max number of per stage constant that can be used simultaneously. | |
| virtual bool | supportVertexBufferHard () const |
| return true if driver support VertexBufferHard. | |
| virtual bool | supportVolatileVertexBuffer () const |
| return true if volatile vertex buffer are supported. | |
| virtual bool | supportCloudRenderSinglePass () const |
| virtual bool | supportIndexOffset () const |
| return true if driver support indices offset. | |
| virtual bool | slowUnlockVertexBufferHard () const |
| return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL). | |
| virtual uint | getMaxVerticesByVertexBufferHard () const |
| return How many vertices VertexBufferHard support | |
| virtual bool | initVertexBufferHard (uint agpMem, uint vramMem) |
| Allocate the initial VertexArray Memory. | |
| virtual bool | activeVertexBuffer (CVertexBuffer &VB) |
| active a current VB, for future render(). | |
| virtual bool | activeIndexBuffer (CIndexBuffer &IB) |
| active a current IB, for future render(). | |
| virtual void | mapTextureStageToUV (uint stage, uint uv) |
| Say what Texture Stage use what UV coord. | |
| virtual bool | renderLines (CMaterial &mat, uint32 firstIndex, uint32 nlines) |
| Render a list of indexed lines with previously setuped VertexBuffer / IndexBuffer / Matrixes. | |
| virtual bool | renderTriangles (CMaterial &Mat, uint32 firstIndex, uint32 ntris) |
| Render a list of indexed triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes. | |
| virtual bool | renderSimpleTriangles (uint32 firstTri, uint32 ntris) |
| 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 startIndex, uint32 numPoints) |
| Render points with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderRawLines (CMaterial &Mat, uint32 startIndex, uint32 numLines) |
| Render lines with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderRawTriangles (CMaterial &Mat, uint32 startIndex, uint32 numTris) |
| Render triangles with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderRawQuads (CMaterial &Mat, uint32 startIndex, uint32 numQuads) |
| render quads with previously setuped VertexBuffer / Matrixes. | |
| virtual bool | renderLinesWithIndexOffset (CMaterial &, uint32, uint32, uint) |
| 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 &, uint32, uint32, uint) |
| virtual bool | renderSimpleTrianglesWithIndexOffset (uint32, uint32, uint) |
| virtual bool | swapBuffers () |
| Swap the back and front buffers. | |
| virtual void | setSwapVBLInterval (uint interval) |
| set the number of VBL wait when a swapBuffers() is issued. | |
| virtual uint | getSwapVBLInterval () |
| get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL | |
| virtual void | profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut) |
| Get the number of primitives rendered from the last swapBuffers() call. | |
| virtual uint32 | profileAllocatedTextureMemory () |
| Return the amount of Texture memory requested. | |
| virtual uint32 | profileSetupedMaterials () const |
| Get the number of material setuped from the last swapBuffers() call. | |
| virtual uint32 | profileSetupedModelMatrix () const |
| Get the number of matrix setuped from the last swapBuffers() call. | |
| void | enableUsedTextureMemorySum (bool enable) |
| Enable the sum of texture memory used since last swapBuffers() call. | |
| uint32 | getUsedTextureMemory () const |
| Return the amount of texture video memory used since last swapBuffers() call. | |
| virtual void | startProfileVBHardLock () |
| If the driver support it, enable profile VBHard locks. | |
| virtual void | endProfileVBHardLock (std::vector< std::string > &result) |
| 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) |
| display VBhards allocated | |
| virtual void | startProfileIBLock () |
| virtual void | endProfileIBLock (std::vector< std::string > &result) |
| virtual void | profileIBAllocation (std::vector< std::string > &result) |
| virtual bool | release () |
| Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers). | |
| 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 | setupScissor (const class CScissor &scissor) |
| Set the current Scissor. | |
| virtual void | setupViewport (const class CViewport &viewport) |
| Set the current viewport. | |
| virtual void | getViewport (CViewport &viewport) |
| Get the current viewport. | |
| virtual uint32 | getImplementationVersion () const |
| Get the driver version. | |
| virtual const char * | getDriverInformation () |
| Get driver informations. | |
| virtual const char * | getVideocardInformation () |
| Get videocard informations. | |
| virtual bool | isActive () |
| Return true if driver is still active. Return false else. If he user close the window, must return false. | |
| virtual uint8 | getBitPerPixel () |
| Return the depth of the driver after init(). | |
| virtual void | showCursor (bool b) |
| show cursor if b is true, or hide it if b is false | |
| virtual void | setMousePos (float x, float y) |
| x and y must be between 0.0 and 1.0 | |
| virtual void | setCapture (bool b) |
| If true, capture the mouse to force it to stay under the window. | |
| virtual NLMISC::IMouseDevice * | enableLowLevelMouse (bool enable, bool exclusive) |
| Enable / disable low level mouse. | |
| virtual NLMISC::IKeyboardDevice * | enableLowLevelKeyboard (bool enable) |
| Enable / disable a low level keyboard. | |
| virtual NLMISC::IInputDeviceManager * | getLowLevelInputDeviceManager () |
| Check whether there is a low level device manager available, and get its interface. | |
| virtual uint | getDoubleClickDelay (bool hardwareMouse) |
| Get the delay in ms for mouse double clicks. | |
| virtual void | getWindowSize (uint32 &width, uint32 &height) |
| Get the width and the height of the window. | |
| virtual void | getWindowPos (uint32 &x, uint32 &y) |
| Get the position of the window always (0,0) in fullscreen. | |
| virtual void | getBuffer (CBitmap &bitmap) |
| get the RGBA back buffer. | |
| virtual void | getZBuffer (std::vector< float > &zbuffer) |
| get the ZBuffer (back buffer). | |
| virtual void | getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect) |
| get a part of the RGBA back buffer. | |
| virtual bool | stretchRect (ITexture *srcText, NLMISC::CRect &srcRect, ITexture *destText, NLMISC::CRect &destRect) |
| virtual bool | supportBloomEffect () const |
| virtual bool | activeFrameBufferObject (ITexture *tex) |
| virtual void | getZBufferPart (std::vector< float > &zbuffer, NLMISC::CRect &rect) |
| get a part of the ZBuffer (back buffer). | |
| virtual bool | setRenderTarget (ITexture *tex, uint32 x, uint32 y, uint32 width, uint32 height, uint32 mipmapLevel, uint32 cubeFace) |
| Set the current render target. | |
| virtual bool | copyTargetToTexture (ITexture *tex, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height, uint32 mipmapLevel) |
| Trick method : copy the current texture target into another texture without updating the current texture. | |
| virtual bool | getRenderTargetSize (uint32 &width, uint32 &height) |
| Retrieve the render target size. | |
| virtual bool | fillBuffer (CBitmap &bitmap) |
| fill the RGBA back buffer | |
| virtual void | setPolygonMode (TPolygonMode mode) |
| Set the global polygon mode. | |
| virtual uint | getMaxLight () const |
| return the number of light supported by driver. | |
| virtual void | setLight (uint8 num, const CLight &light) |
| Setup a light. | |
| virtual void | enableLight (uint8 num, bool enable=true) |
| Enable / disable light. | |
| virtual void | setPerPixelLightingLight (CRGBA diffuse, CRGBA specular, float shininess) |
| Setup the light used for per pixel lighting. | |
| virtual void | setLightMapDynamicLight (bool enable, const CLight &light) |
| Setup the unique light used for Lightmap Shader. | |
| virtual void | setAmbientColor (CRGBA color) |
| Set ambient. | |
| virtual bool | supportPerPixelLighting (bool specular) const |
| virtual void | swapTextureHandle (ITexture &tex0, ITexture &tex1) |
| Special method to internally swap the Driver handle of 2 textures. | |
| virtual uint | getTextureHandle (const ITexture &tex) |
| Advanced usage. | |
| virtual uint | getNumAdapter () const |
| Adaptor information. | |
| virtual bool | getAdapter (uint adapter, CAdapter &desc) const |
| virtual bool | setAdapter (uint adapter) |
| Choose the hardware renderer. | |
| virtual CVertexBuffer::TVertexColorType | getVertexColorFormat () const |
| 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 void | startBench (bool wantStandardDeviation=false, bool quick=false, bool reset=true) |
| virtual void | endBench () |
| virtual void | displayBench (class NLMISC::CLog *log) |
| virtual bool | supportOcclusionQuery () const |
| virtual IOcclusionQuery * | createOcclusionQuery () |
| Create an occlusion query object. | |
| virtual void | deleteOcclusionQuery (IOcclusionQuery *oq) |
| virtual bool | supportTextureRectangle () const |
| virtual bool | supportFrameBufferObject () const |
| virtual bool | supportPackedDepthStencil () const |
| virtual uint64 | getSwapBufferCounter () const |
| virtual void | setCullMode (TCullMode cullMode) |
| Set cull mode Useful for mirrors / cube map rendering or when the scene must be rendered upside down. | |
| virtual TCullMode | getCullMode () const |
| virtual void | enableStencilTest (bool enable) |
| Set stencil support. | |
| virtual bool | isStencilTestEnabled () const |
| virtual void | stencilFunc (TStencilFunc stencilFunc, int ref, uint mask) |
| virtual void | stencilOp (TStencilOp fail, TStencilOp zfail, TStencilOp zpass) |
| virtual void | stencilMask (uint mask) |
| void | incrementResetCounter () |
| bool | isWndActive () const |
| const IVertexBufferHardGL * | getCurrentVertexBufferHard () const |
| void | checkTextureOn () const |
Fog support. | |
| virtual bool | fogEnabled () |
| virtual void | enableFog (bool enable) |
| virtual void | setupFog (float start, float end, CRGBA color) |
| setup fog parameters. fog must enabled to see result. start and end are in [0,1] range. | |
| virtual float | getFogStart () const |
| Get. | |
| virtual float | getFogEnd () const |
| virtual CRGBA | getFogColor () const |
texture addressing modes | |
| virtual bool | supportTextureShaders () const |
| test whether the device supports some form of texture shader. (could be limited to DX6 EMBM for example) | |
| virtual bool | isWaterShaderSupported () const |
| virtual bool | isTextureAddrModeSupported (CMaterial::TTexAddressingMode mode) const |
| test whether a texture addressing mode is supported | |
| virtual void | setMatrix2DForTextureOffsetAddrMode (const uint stage, const float mat[4]) |
| 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 | |
| virtual bool | supportEMBM () const |
| virtual bool | isEMBMSupportedAtStage (uint stage) const |
| virtual void | setEMBMMatrix (const uint stage, const float mat[4]) |
Misc | |
| virtual bool | supportBlendConstantColor () const |
| 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) |
| see supportBlendConstantColor(). | |
| virtual NLMISC::CRGBA | getBlendConstantColor () const |
| see supportBlendConstantColor(). | |
| virtual bool | setMonitorColorProperties (const CMonitorColorProperties &properties) |
| Setup monitor color properties. | |
| virtual void | finish () |
| force the driver to flush all command. | |
| virtual void | flush () |
| virtual void | enablePolygonSmoothing (bool smooth) |
| Use AntiAliasing For polygons (GL_POLYGON_SMOOTH like, not the FSAA). | |
| virtual bool | isPolygonSmoothingEnabled () const |
| see enablePolygonSmoothing() | |
Public Attributes | |
| TOcclusionQueryList | _OcclusionQueryList |
| COcclusionQueryGL * | _CurrentOcclusionQuery |
Static Public Attributes | |
| static GLenum | NLCubeFaceToGLCubeFace [6] |
| static CMaterial::CTexEnv | _TexEnvReplace |
Protected Attributes | |
| bool | _WndActive |
| uint64 | _SwapBufferCounter |
Private Member Functions | |
| virtual class IVertexBufferHardGL * | createVertexBufferHard (uint size, uint numVertices, CVertexBuffer::TPreferredMemory vbType, CVertexBuffer *vb) |
| void | refreshProjMatrixFromGL () |
| bool | setupVertexBuffer (CVertexBuffer &VB) |
| bool | activateTexture (uint stage, ITexture *tex) |
| void | activateTexEnvMode (uint stage, const CMaterial::CTexEnv &env) |
| void | activateTexEnvColor (uint stage, const CMaterial::CTexEnv &env) |
| void | forceActivateTexEnvMode (uint stage, const CMaterial::CTexEnv &env) |
| void | activateTexEnvColor (uint stage, NLMISC::CRGBA col) |
| void | forceActivateTexEnvColor (uint stage, NLMISC::CRGBA col) |
| void | forceActivateTexEnvColor (uint stage, const CMaterial::CTexEnv &env) |
| void | enableNVTextureShader (bool enabled) |
| nv texture shaders. Should be used only if this caps is present! | |
| void | verifyNVTextureShaderConfig () |
| void | cleanLightSetup () |
| GLint | getGlTextureFormat (ITexture &tex, bool &compressed) |
| bool | clipRect (NLMISC::CRect &rect) |
| void | copyFrameBufferToTexture (ITexture *tex, uint32 level, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height, uint cubeFace=0) |
| virtual bool | isTextureRectangle (ITexture *tex) const |
| void | setupUVPtr (uint stage, CVertexBufferInfo &VB, uint uvId) |
| setup a texture stage with an UV from VB. | |
| void | setupGlArrays (CVertexBufferInfo &vb) |
| setup GL arrays, with a vb info. | |
| void | setupGlArraysStd (CVertexBufferInfo &vb) |
| Tools fct used by setupGLArrays. | |
| void | setupGlArraysForNVVertexProgram (CVertexBufferInfo &vb) |
| void | setupGlArraysForARBVertexProgram (CVertexBufferInfo &vb) |
| void | setupGlArraysForEXTVertexShader (CVertexBufferInfo &vb) |
| void | toggleGlArraysForNVVertexProgram () |
| void | toggleGlArraysForARBVertexProgram () |
| void | toggleGlArraysForEXTVertexShader () |
| void | enableGlNormalize (bool normalize) |
| Test/activate normalisation of normal. | |
| void | refreshRenderSetup () |
| void | doRefreshRenderSetup () |
| void | setLightInternal (uint8 num, const CLight &light) |
| void | enableLightInternal (uint8 num, bool enable) |
| void | setupLightMapDynamicLighting (bool enable) |
| bool | isVertexProgramEnabled () const |
| uint | inlGetNumTextStages () const |
| Same as getNbTextureStages(), but faster because inline, and not virtual!! | |
| void | initEMBM () |
| void | retrieveATIDriverVersion () |
| void | bindTextureWithMode (ITexture &tex) |
| Bind a texture at stage 0 for the good texture mode(2d or cube) Parameters / part of the texture are ready to be changed in the gl after that _CurrentTexture & _CurrentTextureInfoGL are not modified ! | |
| void | setupTextureBasicParameters (ITexture &tex) |
| Force to set clamp & wrap mode for the given texture Setup is done for texture currently bind to the gl, so calling bindTextureWithMode is necessary. | |
Water | |
| sint | beginWaterMultiPass () |
| void | setupWaterPass (uint pass) |
| void | endWaterMultiPass () |
Cloud Shader | |
| sint | beginCloudMultiPass () |
| void | setupCloudPass (uint pass) |
| void | endCloudMultiPass () |
Vertex program interface | |
| bool | isVertexProgramSupported () const |
| Does the driver supports vertex programs ? | |
| bool | isVertexProgramEmulated () const |
| Does the driver supports vertex program, but emulated by CPU ? | |
| bool | activeVertexProgram (CVertexProgram *program) |
| Activate / disactivate a vertex program. | |
| void | setConstant (uint index, float, float, float, float) |
| Setup constant values. | |
| void | setConstant (uint index, double, double, double, double) |
| void | setConstant (uint indexStart, const NLMISC::CVector &value) |
| void | setConstant (uint indexStart, const NLMISC::CVectorD &value) |
| void | setConstant (uint index, uint num, const float *src) |
| setup several 4 float csts taken from the given tab | |
| void | setConstant (uint index, uint num, const double *src) |
| setup several 4 double csts taken from the given tab | |
| void | setConstantMatrix (uint index, IDriver::TMatrix matrix, IDriver::TTransform transform) |
| Setup constants with a current matrix. | |
| void | setConstantFog (uint index) |
| Setup the constant with the fog vector. | |
| void | enableVertexProgramDoubleSidedColor (bool doubleSided) |
| Activate VertexProgram 2Sided Color mode. | |
| bool | supportVertexProgramDoubleSidedColor () const |
| Check if the driver support double sided colors vertex programs. | |
| virtual bool | supportMADOperator () const |
Vertex program implementation | |
| bool | activeNVVertexProgram (CVertexProgram *program) |
| bool | activeARBVertexProgram (CVertexProgram *program) |
| bool | activeEXTVertexShader (CVertexProgram *program) |
Private Attributes | |
| bool | _FullScreen |
| bool | _OffScreen |
| uint | _Interval |
| sint32 | _WindowWidth |
| sint32 | _WindowHeight |
| sint32 | _WindowX |
| sint32 | _WindowY |
| Display * | dpy |
| GLXContext | ctx |
| Window | win |
| Cursor | cursor |
| NLMISC::CUnixEventEmitter | _EventEmitter |
| bool | _Initialized |
| uint8 | _Depth |
| bool | _ForceNormalize |
| bool | _LightSetupDirty |
| bool | _ModelViewMatrixDirty |
| bool | _ProjMatDirty |
| NLMISC::CMatrix | _GLProjMat |
| bool | _RenderSetupDirty |
| float | _OODeltaZ |
| CMatrix | _UserViewMtx |
| CMatrix | _ViewMtx |
| CMatrix | _SpecularTexMtx |
| CVector | _PZBCameraPos |
| CMatrix | _ModelViewMatrix |
| bool | _FogEnabled |
| float | _FogEnd |
| float | _FogStart |
| GLfloat | _CurrentFogColor [4] |
| CViewport | _CurrViewport |
| CScissor | _CurrScissor |
| CViewport | _OldViewport |
| bool | _RenderTargetFBO |
| uint | _MaxDriverLight |
| uint | _LightMode [MaxLight] |
| CVector | _WorldLightPos [MaxLight] |
| CVector | _WorldLightDirection [MaxLight] |
| bool | _LightDirty [MaxLight] |
| CLight | _LightMapDynamicLight |
| bool | _LightMapDynamicLightEnabled |
| bool | _LightMapDynamicLightDirty |
| CLight | _UserLight0 |
| bool | _UserLightEnable [MaxLight] |
| bool | _CurrentGlNormalize |
| CVertexBufferInfo | _LastVB |
| LastVB for UV setup. | |
| CIndexBufferInfo | _LastIB |
| bool | _VertexProgramEnabled |
| bool | _LastSetupGLArrayVertexProgram |
| NLMISC::CRefPtr< CVertexProgram > | _LastSetuppedVP |
| bool | _ForceDXTCCompression |
| uint | _ForceTextureResizePower |
| Divisor for textureResize (power). | |
| bool | _ForceNativeFragmentPrograms |
| NLMISC::CMatrix | _UserTexMat [IDRV_MAT_MAXTEXTURES] |
| uint | _UserTexMatEnabled |
| NLMISC::CRGBA | _CurrentBlendConstantColor |
| bool | _PolygonSmooth |
| uint | _ATIDriverVersion |
| bool | _ATIFogRangeFixed |
Static Private Attributes | |
| static const uint32 | ReleaseVersion = 0xe |
| static const uint | NumCoordinatesType [CVertexBuffer::NumType] |
| static const uint | GLType [CVertexBuffer::NumType] |
| static const uint | GLVertexAttribIndex [CVertexBuffer::NumValue] |
| static const bool | GLTypeIsIntegral [CVertexBuffer::NumType] |
| static const uint | GLMatrix [IDriver::NumMatrix] |
| static const uint | GLTransform [IDriver::NumTransform] |
Friends | |
| class | CTextureDrvInfosGL |
| class | CVertexProgamDrvInfosGL |
EXTVertexShader specifics. | |
|
| |
| enum | EEVSVariants { EVSSecondaryColorVariant = 0, EVSFogCoordsVariant = 1, EVSSkinWeightVariant = 2, EVSPaletteSkinVariant = 3, EVSNumVariants } |
| static const uint | _EVSNumConstant = 97 |
| GLuint | _EVSPositionHandle |
| GLuint | _EVSNormalHandle |
| GLuint | _EVSColorHandle |
| GLuint | _EVSTexHandle [8] |
| GLuint | _EVSConstantHandle |
| bool | setupEXTVertexShader (const CVPParser::TProgram &program, GLuint id, uint variants[EVSNumVariants], uint16 &usedInputRegisters) |
| Setup a vertex shader from its parsed program. | |
| bool | setupARBVertexProgram (const CVPParser::TProgram &parsedProgram, GLuint id, bool &specularWritten) |
Prec settings, for optimisation. | |
|
| |
| enum | CTexEnvSpecial { TexEnvSpecialDisabled = 0, TexEnvSpecialLightMap, TexEnvSpecialSpecularStage1, TexEnvSpecialSpecularStage1NoText, TexEnvSpecialPPLStage0, TexEnvSpecialPPLStage2, TexEnvSpecialCloudStage0, TexEnvSpecialCloudStage1 } |
| CMaterial * | _CurrentMaterial |
| CMaterial::TShader | _CurrentMaterialSupportedShader |
| ITexture * | _CurrentTexture [IDRV_MAT_MAXTEXTURES] |
| CTextureDrvInfosGL * | _CurrentTextureInfoGL [IDRV_MAT_MAXTEXTURES] |
| CMaterial::CTexEnv | _CurrentTexEnv [IDRV_MAT_MAXTEXTURES] |
| CTexEnvSpecial | _CurrentTexEnvSpecial [IDRV_MAT_MAXTEXTURES] |
| GLenum | _CurrentTexAddrMode [IDRV_MAT_MAXTEXTURES] |
| bool | _NVTextureShaderEnabled |
| bool | _StageSupportEMBM [IDRV_MAT_MAXTEXTURES] |
| CDriverGLStates | _DriverGLStates |
| uint32 | _MaterialAllTextureTouchedFlag |
| void | resetTextureShaders () |
| void | setTextureShaders (const uint8 *addressingModes, const NLMISC::CSmartPtr< ITexture > *textures) |
| set texture shaders from stage 0 to stage IDRV_MAT_MAXTEXTURES - 1 textures are needed to setup the right kind of shader (cubic or 2d texture) | |
Per pixel lighting | |
|
| |
| typedef NLMISC::CSmartPtr < CTextureCube > | TSPTextureCube |
| typedef std::vector < TSPTextureCube > | TTexCubeVect |
| TTexCubeVect | _SpecularTextureCubes |
| sint | beginPPLMultiPass () |
| void | setupPPLPass (uint pass) |
| void | endPPLMultiPass () |
| sint | beginPPLNoSpecMultiPass () |
| void | setupPPLNoSpecPass (uint pass) |
| void | endPPLNoSpecMultiPass () |
| CTextureCube * | getSpecularCubeMap (uint exp) |
| get (and if necessary, build) a cube map used for specular lighting. The range for exponent is limited, and only the best fit is used | |
| CTextureCube * | getDiffuseCubeMap () |
VertexBufferHard | |
|
| |
| class | CVertexArrayRangeNVidia |
| class | CVertexBufferHardGLNVidia |
| class | CVertexArrayRangeATI |
| class | CVertexArrayRangeARB |
| class | CVertexBufferHardARB |
| class | CVertexBufferHardGLATI |
| class | CVertexArrayRangeMapObjectATI |
| class | CVertexBufferHardGLMapObjectATI |
| class | CVBDrvInfosGL |
| CPtrSet< IVertexBufferHardGL > | _VertexBufferHardSet |
| IVertexArrayRange * | _CurrentVertexArrayRange |
| IVertexBufferHardGL * | _CurrentVertexBufferHard |
| void * | _NVCurrentVARPtr |
| uint32 | _NVCurrentVARSize |
| bool | _SupportVBHard |
| bool | _SlowUnlockVBHard |
| uint32 | _MaxVerticesByVBHard |
| IVertexArrayRange * | _AGPVertexArrayRange |
| IVertexArrayRange * | _VRAMVertexArrayRange |
| void | resetVertexArrayRange () |
| void | fenceOnCurVBHardIfNeeded (IVertexBufferHardGL *newVBHard) |
Driver Caps. | |
|
| |
| CGlExtensions | _Extensions |
| bool | _SupportPerPixelShader |
| bool | _SupportPerPixelShaderNoSpec |
| float | _PPLExponent |
| NLMISC::CRGBA | _PPLightDiffuseColor |
| NLMISC::CRGBA | _PPLightSpecularColor |
| void | checkForPerPixelLightingSupport () |
Lightmap. | |
|
| |
| uint | _NLightMaps |
| Temp Variables computed in beginLightMapMultiPass(). Reused in setupLightMapPass(). | |
| uint | _NLightMapPerPass |
| uint | _NLightMapPass |
| bool | _LightMapNoMulAddFallBack |
| std::vector< uint > | _LightMapLUT |
| CMaterial::CTexEnv | _LightMapLastStageEnv |
| bool | _LastVertexSetupIsLightMap |
| sint8 | _LightMapUVMap [IDRV_MAT_MAXTEXTURES] |
| void | computeLightMapInfos (const CMaterial &mat) |
| sint | beginLightMapMultiPass () |
| void | setupLightMapPass (uint pass) |
| void | endLightMapMultiPass () |
| void | resetLightMapVertexSetup () |
Specular. | |
|
| |
| bool | _SpecularBatchOn |
| sint | beginSpecularMultiPass () |
| void | setupSpecularPass (uint pass) |
| void | endSpecularMultiPass () |
| void | setupSpecularBegin () |
| void | setupSpecularEnd () |
Profiling | |
|
| |
| CPrimitiveProfile | _PrimitiveProfileIn |
| CPrimitiveProfile | _PrimitiveProfileOut |
| uint32 | _AllocatedTextureMemory |
| uint32 | _NbSetupMaterialCall |
| uint32 | _NbSetupModelMatrixCall |
| bool | _SumTextureMemoryUsed |
| std::set< CTextureDrvInfosGL * > | _TextureUsed |
| bool | _VBHardProfiling |
| std::vector< CVBHardProfile > | _VBHardProfiles |
| uint | _CurVBHardLockCount |
| uint | _NumVBHardProfileFrame |
| uint | computeMipMapMemoryUsage (uint w, uint h, GLint glfmt) const |
| void | appendVBHardLockProfile (NLMISC::TTicks time, CVertexBuffer *vb) |
Caustics shaders | |
|
| |
| NLMISC::CSmartPtr< CTextureCube > | _CausticCubeMap |
| static void | initCausticCubeMap () |
|
| |
| GLuint | ATIWaterShaderHandleNoDiffuseMap |
| shaders | |
| GLuint | ATIWaterShaderHandle |
| GLuint | ATICloudShaderHandle |
| GLuint | ARBWaterShader [4] |
| CSmartPtr< ITexture > | _TextureTarget |
| to texture | |
| uint32 | _TextureTargetLevel |
| uint32 | _TextureTargetX |
| uint32 | _TextureTargetY |
| uint32 | _TextureTargetWidth |
| uint32 | _TextureTargetHeight |
| bool | _TextureTargetUpload |
| uint | _TextureTargetCubeFace |
| CMaterial::TShader | getSupportedShader (CMaterial::TShader shader) |
| for material shaders | |
| void | initFragmentShaders () |
| void | deleteFragmentShaders () |
| void | deleteARBFragmentPrograms () |
| void | setupWaterPassR200 (const CMaterial &mat) |
| water setup for ATI | |
| void | setupWaterPassARB (const CMaterial &mat) |
| water setup for ARB_fragment_program | |
| void | setupWaterPassNV20 (const CMaterial &mat) |
Material multipass. | |
|
| |
| virtual sint | beginMaterialMultiPass () |
| NB: setupMaterial() must be called before thoses methods. | |
| virtual void | setupMaterialPass (uint pass) |
| active the ith pass of this material. | |
| virtual void | endMaterialMultiPass () |
| end multipass for this material. | |
| sint | beginMultiPass () |
| NB: setupMaterial() must be called before thoses methods. | |
| void | setupPass (uint pass) |
| active the ith pass of this material. | |
| void | endMultiPass () |
| end multipass for this material. | |
Definition at line 275 of file driver_opengl.h.
typedef NLMISC::CSmartPtr<CTextureCube> NL3D::CDriverGL::TSPTextureCube [private] |
Definition at line 987 of file driver_opengl.h.
typedef std::vector<TSPTextureCube> NL3D::CDriverGL::TTexCubeVect [private] |
Definition at line 988 of file driver_opengl.h.
| anonymous enum |
Definition at line 280 of file driver_opengl.h.
enum NL3D::CDriverGL::CTexEnvSpecial [private] |
Definition at line 803 of file driver_opengl.h.
| EVSSecondaryColorVariant | |
| EVSFogCoordsVariant | |
| EVSSkinWeightVariant | |
| EVSPaletteSkinVariant | |
| EVSNumVariants |
Definition at line 1222 of file driver_opengl.h.
| NL3D::CDriverGL::CDriverGL | ( | ) |
buildCausticCubeMapTex();
Definition at line 268 of file driver_opengl.cpp.
References _AGPVertexArrayRange, _AllocatedTextureMemory, _ATIDriverVersion, _ATIFogRangeFixed, _CurrentFogColor, _CurrentGlNormalize, _CurrentMaterial, _CurrentMaterialSupportedShader, _CurrentOcclusionQuery, _CurrentTexAddrMode, _CurrentVertexArrayRange, _CurrentVertexBufferHard, _CurVBHardLockCount, _FogEnabled, _FogEnd, _FogStart, _ForceDXTCCompression, _ForceNativeFragmentPrograms, _ForceNormalize, _ForceTextureResizePower, _FullScreen, _Initialized, _Interval, _LastVertexSetupIsLightMap, _LightDirty, _LightMapDynamicLightDirty, _LightMapDynamicLightEnabled, _LightMapLastStageEnv, _LightMapLUT, _LightMapUVMap, _LightSetupDirty, _MaterialAllTextureTouchedFlag, _MaxVerticesByVBHard, _ModelViewMatrixDirty, _NumVBHardProfileFrame, _NVCurrentVARPtr, _NVCurrentVARSize, _NVTextureShaderEnabled, _OffScreen, _PolygonSmooth, _ProjMatDirty, _RenderSetupDirty, _RenderTargetFBO, _SlowUnlockVBHard, _SpecularBatchOn, _StageSupportEMBM, _SumTextureMemoryUsed, _SupportVBHard, _SwapBufferCounter, _TexEnvReplace, _TextureTargetCubeFace, _TextureTargetUpload, _UserLight0, _UserTexMatEnabled, _VBHardProfiling, _VRAMVertexArrayRange, _WndActive, ARBWaterShader, ATICloudShaderHandle, ATIWaterShaderHandle, ATIWaterShaderHandleNoDiffuseMap, NLMISC::CRGBA::Black, cursor, NL3D::CMaterial::CTexEnv::Env, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, NL3D::IDRV_TOUCHED_TEX, NLMISC::CVector::K, MaxLight, NL3D_DRV_MAX_LIGHTMAP, NL3D::CMaterial::Normal, NL3D::CMaterial::Previous, NL3D::CMaterial::Replace, NL3D::CMaterial::CTexEnv::setDefault(), NL3D::CLight::setupDirectional(), NL3D::CMaterial::SrcAlpha, NL3D::CMaterial::Texture, and NLMISC::CRGBA::White.
| NL3D::CDriverGL::~CDriverGL | ( | ) | [virtual] |
Definition at line 408 of file driver_opengl.cpp.
References H_AUTO_OGL, and release().
| bool NL3D::CDriverGL::activate | ( | ) | [virtual] |
Before rendering via a driver in a thread, must activate() (per thread).
Implements NL3D::IDriver.
Definition at line 1772 of file driver_opengl.cpp.
References ctx, dpy, H_AUTO_OGL, and win.
| void NL3D::CDriverGL::activateTexEnvColor | ( | uint | stage, | |
| NLMISC::CRGBA | col | |||
| ) | [private] |
Definition at line 1754 of file driver_opengl_texture.cpp.
References _CurrentTexEnv, forceActivateTexEnvColor(), and H_AUTO_OGL.
| void NL3D::CDriverGL::activateTexEnvColor | ( | uint | stage, | |
| const CMaterial::CTexEnv & | env | |||
| ) | [private] |
Definition at line 1778 of file driver_opengl_texture.cpp.
References _CurrentTexEnv, NL3D::CMaterial::CTexEnv::ConstantColor, forceActivateTexEnvColor(), and H_AUTO_OGL.
Referenced by setTextureEnvFunction(), setupCloudPass(), setupLightMapPass(), setupPPLNoSpecPass(), and setupPPLPass().
| void NL3D::CDriverGL::activateTexEnvMode | ( | uint | stage, | |
| const CMaterial::CTexEnv & | env | |||
| ) | [private] |
Definition at line 1765 of file driver_opengl_texture.cpp.
References _CurrentTexEnv, _CurrentTexEnvSpecial, NL3D::CMaterial::CTexEnv::EnvPacked, forceActivateTexEnvMode(), H_AUTO_OGL, and TexEnvSpecialDisabled.
Referenced by activateTexture(), setTextureEnvFunction(), setupLightMapPass(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularBegin(), setupSpecularPass(), and setupWaterPassNV20().
Definition at line 1185 of file driver_opengl_texture.cpp.
References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _SumTextureMemoryUsed, _TexEnvReplace, _TextureUsed, activateTexEnvMode(), NL3D::CDriverGLStates::activeTextureARB(), NL3D::CGlExtensions::ARBTextureCubeMap, NL3D::CGlExtensions::ATITextureEnvCombine3, NL3D::ITexture::getMagFilter(), NL3D::ITexture::getMinFilter(), NL3D::getTextureGl(), NL3D::ITexture::getWrapS(), NL3D::ITexture::getWrapT(), GL_TEXTURE_RECTANGLE_NV, H_AUTO_OGL, NL3D::CTextureDrvInfosGL::ID, NL3D::ITexture::isTextureCube(), NL3D::CTextureDrvInfosGL::MagFilter, NL3D::CTextureDrvInfosGL::MinFilter, NL3D::CDriverGLStates::setTextureMode(), NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureCubeMap, NL3D::CDriverGLStates::TextureDisabled, NL3D::CTextureDrvInfosGL::TextureMode, NL3D::CDriverGLStates::TextureRect, NL3D::translateMagFilterToGl(), NL3D::translateMinFilterToGl(), NL3D::translateWrapToGl(), NL3D::CTextureDrvInfosGL::WrapS, and NL3D::CTextureDrvInfosGL::WrapT.
Referenced by beginSpecularMultiPass(), setupCloudPass(), setupLightMapPass(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularBegin(), setupTextureEx(), setupWaterPassARB(), setupWaterPassNV20(), setupWaterPassR200(), swapTextureHandle(), and toggleGlArraysForARBVertexProgram().
| bool NL3D::CDriverGL::activeARBVertexProgram | ( | CVertexProgram * | program | ) | [private] |
Definition at line 1449 of file driver_opengl_vertex_program.cpp.
References NL3D::CVertexProgram::_DrvInfo, _LastSetuppedVP, _VertexProgramEnabled, NL3D::IDriver::_VtxPrgDrvInfos, CVertexProgamDrvInfosGL, NL3D::CVertexProgram::getProgram(), GL_COLOR_SUM_ARB, GL_VERTEX_PROGRAM_ARB, H_AUTO_OGL, NL3D::CVertexProgamDrvInfosGL::ID, nglBindProgramARB, nlerror, nlwarning, CVPParser::parse(), NLMISC::safe_cast(), setupARBVertexProgram(), and NL3D::CVertexProgamDrvInfosGL::SpecularWritten.
Referenced by activeVertexProgram().
| bool NL3D::CDriverGL::activeEXTVertexShader | ( | CVertexProgram * | program | ) | [private] |
Definition at line 1519 of file driver_opengl_vertex_program.cpp.
References NL3D::CVertexProgram::_DrvInfo, _LastSetuppedVP, _VertexProgramEnabled, NL3D::IDriver::_VtxPrgDrvInfos, CVertexProgamDrvInfosGL, NL3D::CVertexProgram::getProgram(), GL_VERTEX_SHADER_EXT, H_AUTO_OGL, NL3D::CVertexProgamDrvInfosGL::ID, nglBindVertexShaderEXT, nlerror, nlwarning, CVPParser::parse(), NLMISC::safe_cast(), setupEXTVertexShader(), NL3D::CVertexProgamDrvInfosGL::UsedVertexComponents, and NL3D::CVertexProgamDrvInfosGL::Variants.
Referenced by activeVertexProgram().
Definition at line 498 of file driver_opengl.cpp.
References NL3D::CTextureDrvInfosGL::activeFrameBufferObject(), GL_FRAMEBUFFER_EXT, nglBindFramebufferEXT, supportFrameBufferObject(), and NL3D::ITexture::TextureDrvShare.
Referenced by setRenderTarget().
| bool NL3D::CDriverGL::activeIndexBuffer | ( | CIndexBuffer & | IB | ) | [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.
Implements NL3D::IDriver.
Definition at line 252 of file driver_opengl_vertex.cpp.
References _LastIB, H_AUTO_OGL, and NL3D::CIndexBufferInfo::setupIndexBuffer().
| bool NL3D::CDriverGL::activeNVVertexProgram | ( | CVertexProgram * | program | ) | [private] |
Check with our parser if the program will works with other implemented extensions, too. (EXT_vertex_shader ..). There are some incompatibilities.
Definition at line 87 of file driver_opengl_vertex_program.cpp.
References NL3D::CVertexProgram::_DrvInfo, _LastSetuppedVP, _VertexProgramEnabled, NL3D::IDriver::_VtxPrgDrvInfos, CVertexProgamDrvInfosGL, NL3D::CVertexProgram::getProgram(), GL_PROGRAM_ERROR_POSITION_NV, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, NL3D::CVertexProgamDrvInfosGL::ID, nglBindProgramNV, nglLoadProgramNV, nlassert, nlwarning, CVPParser::parse(), and NLMISC::safe_cast().
Referenced by activeVertexProgram().
Activate a shader, NULL to disable the current shader.
Implements NL3D::IDriver.
Definition at line 4024 of file driver_opengl.cpp.
References H_AUTO_OGL.
| bool NL3D::CDriverGL::activeVertexBuffer | ( | CVertexBuffer & | VB | ) | [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.
Implements NL3D::IDriver.
Definition at line 188 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, _DriverGLStates, _LastVB, _LastVertexSetupIsLightMap, NL3D::CVBDrvInfosGL::_VBHard, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::IVertexBufferHardGL::disable(), NL3D::CVertexBuffer::DrvInfos, NL3D::IVertexBufferHardGL::enable(), fenceOnCurVBHardIfNeeded(), NL3D::CVertexBuffer::fillBuffer(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getVertexFormat(), H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::IVertexBufferHardGL::isInvalid(), NLMISC::safe_cast(), setupGlArrays(), NL3D::CVertexBufferInfo::setupVertexBuffer(), setupVertexBuffer(), and NL3D::CVertexBufferInfo::VBMode.
Referenced by swapBuffers().
| bool NL3D::CDriverGL::activeVertexProgram | ( | CVertexProgram * | program | ) | [private, virtual] |
Activate / disactivate a vertex program.
| program | is a pointer on a vertex program. Can be NULL to disable the current vertex program. |
Implements NL3D::IDriver.
Definition at line 1592 of file driver_opengl_vertex_program.cpp.
References _Extensions, activeARBVertexProgram(), activeEXTVertexShader(), activeNVVertexProgram(), NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.
Referenced by swapBuffers().
| void NL3D::CDriverGL::appendVBHardLockProfile | ( | NLMISC::TTicks | time, | |
| CVertexBuffer * | vb | |||
| ) | [private] |
Definition at line 3769 of file driver_opengl.cpp.
References _CurVBHardLockCount, and _VBHardProfiles.
Referenced by NL3D::CVertexBufferHardARB::lock(), NL3D::CVertexBufferHardGLNVidia::lock(), and NL3D::CVertexBufferHardARB::unlock().
| sint NL3D::CDriverGL::beginCloudMultiPass | ( | ) | [private] |
Definition at line 1913 of file driver_opengl_material.cpp.
References _CurrentMaterial, NL3D::CMaterial::Cloud, NL3D::CMaterial::getShader(), H_AUTO_OGL, and nlassert.
Referenced by beginMultiPass().
| void NL3D::CDriverGL::beginDialogMode | ( | ) | [virtual] |
enter/leave the dialog mode
Implements NL3D::IDriver.
Definition at line 4358 of file driver_opengl.cpp.
| sint NL3D::CDriverGL::beginLightMapMultiPass | ( | ) | [private] |
Definition at line 710 of file driver_opengl_material.cpp.
References _CurrentMaterial, _DriverGLStates, _LastVB, _LightMapDynamicLightDirty, _NLightMapPass, computeLightMapInfos(), NL3D::CDriverGLStates::enableColorArray(), NL3D::CDriverGLStates::enableLighting(), H_AUTO_OGL, NL3D::CVertexBuffer::PrimaryColorFlag, NL3D::CDriverGLStates::setAmbient(), NL3D::CDriverGLStates::setSpecular(), setupLightMapDynamicLighting(), and NL3D::CVertexBufferInfo::VertexFormat.
Referenced by beginMultiPass().
| virtual sint NL3D::CDriverGL::beginMaterialMultiPass | ( | ) | [inline, virtual] |
NB: setupMaterial() must be called before thoses methods.
NB: This is intended to be use with the rendering of simple primitives. NB: Other render calls performs the needed setup automatically init multipass for _CurrentMaterial. return number of pass required to render this material.
Implements NL3D::IDriver.
Definition at line 617 of file driver_opengl.h.
References beginMultiPass().
| sint NL3D::CDriverGL::beginMultiPass | ( | ) | [private] |
NB: setupMaterial() must be called before thoses methods.
init multipass for _CurrentMaterial. return number of pass required to render this material.
Definition at line 575 of file driver_opengl_material.cpp.
References _CurrentMaterialSupportedShader, beginCloudMultiPass(), beginLightMapMultiPass(), beginPPLMultiPass(), beginPPLNoSpecMultiPass(), beginSpecularMultiPass(), beginWaterMultiPass(), NL3D::CMaterial::Cloud, H_AUTO_OGL, NL3D::CMaterial::LightMap, NL3D::CMaterial::PerPixelLighting, NL3D::CMaterial::PerPixelLightingNoSpec, NL3D::CMaterial::Specular, and NL3D::CMaterial::Water.
Referenced by beginMaterialMultiPass(), renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), and renderTriangles().
| sint NL3D::CDriverGL::beginPPLMultiPass | ( | ) | [private] |
Definition at line 1538 of file driver_opengl_material.cpp.
References H_AUTO_OGL, nlassert, and supportPerPixelLighting().
Referenced by beginMultiPass().
| sint NL3D::CDriverGL::beginPPLNoSpecMultiPass | ( | ) | [private] |
Definition at line 1734 of file driver_opengl_material.cpp.
References H_AUTO_OGL, nlassert, and supportPerPixelLighting().
Referenced by beginMultiPass().
| sint NL3D::CDriverGL::beginSpecularMultiPass | ( | ) | [private] |
Definition at line 1195 of file driver_opengl_material.cpp.
References _CurrentMaterial, _Extensions, _SpecularBatchOn, activateTexture(), NL3D::CGlExtensions::ARBTextureCubeMap, NL3D::CGlExtensions::ATITextureEnvCombine3, NL3D::CMaterial::getTexture(), H_AUTO_OGL, inlGetNumTextStages(), min, NL3D::CGlExtensions::NVTextureEnvCombine4, and setupSpecularBegin().
Referenced by beginMultiPass().
| sint NL3D::CDriverGL::beginWaterMultiPass | ( | ) | [private] |
Definition at line 2070 of file driver_opengl_material.cpp.
References _CurrentMaterial, NL3D::CMaterial::getShader(), H_AUTO_OGL, nlassert, and NL3D::CMaterial::Water.
Referenced by beginMultiPass().
| void NL3D::CDriverGL::bindTextureWithMode | ( | ITexture & | tex | ) | [inline, private] |
Bind a texture at stage 0 for the good texture mode(2d or cube) Parameters / part of the texture are ready to be changed in the gl after that _CurrentTexture & _CurrentTextureInfoGL are not modified !
Definition at line 531 of file driver_opengl_texture.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), NL3D::getTextureGl(), GL_TEXTURE_RECTANGLE_NV, NL3D::CTextureDrvInfosGL::ID, NL3D::ITexture::isTextureCube(), NL3D::CDriverGLStates::setTextureMode(), NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureCubeMap, NL3D::CTextureDrvInfosGL::TextureMode, and NL3D::CDriverGLStates::TextureRect.
Referenced by setupTextureEx().
| void NL3D::CDriverGL::checkForPerPixelLightingSupport | ( | ) | [private] |
Definition at line 2939 of file driver_opengl.cpp.
References _Extensions, _SupportPerPixelShader, _SupportPerPixelShaderNoSpec, NL3D::CGlExtensions::ARBTextureCubeMap, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::ATITextureEnvCombine3, NL3D::CGlExtensions::EXTVertexShader, H_AUTO_OGL, NL3D::CGlExtensions::NbTextureStages, NL3D::CGlExtensions::NVTextureEnvCombine4, and NL3D::CGlExtensions::NVVertexProgram.
| void NL3D::CDriverGL::checkTextureOn | ( | ) | const |
Definition at line 4068 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), NL3D::CDriverGLStates::getActiveTextureARB(), getNbTextureStages(), NL3D::CDriverGLStates::getTextureMode(), GL_TEXTURE_RECTANGLE_NV, GLboolean(), H_AUTO_OGL, nlassert, NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureCubeMap, NL3D::CDriverGLStates::TextureDisabled, and NL3D::CDriverGLStates::TextureRect.
| void NL3D::CDriverGL::cleanLightSetup | ( | ) | [private] |
Definition at line 222 of file driver_opengl_light.cpp.
References _DriverGLStates, _LightDirty, _LightMode, _LightSetupDirty, _MaxDriverLight, _PZBCameraPos, _ViewMtx, _WorldLightDirection, _WorldLightPos, NL3D::CLight::DirectionalLight, NLMISC::CMatrix::get(), GLenum(), H_AUTO_OGL, NL3D::CDriverGLStates::isLightEnabled(), nlassert, NL3D::CLight::SpotLight, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.
Referenced by doRefreshRenderSetup().
Implements NL3D::IDriver.
Definition at line 1816 of file driver_opengl.cpp.
References NLMISC::CRGBA::A, NLMISC::CRGBA::B, NLMISC::CRGBA::G, H_AUTO_OGL, and NLMISC::CRGBA::R.
Implements NL3D::IDriver.
Definition at line 1831 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::enableZWrite(), and H_AUTO_OGL.
| bool NL3D::CDriverGL::clipRect | ( | NLMISC::CRect & | rect | ) | [private] |
Definition at line 2560 of file driver_opengl.cpp.
References NLMISC::CRect::bottom(), NLMISC::clamp(), getWindowSize(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CRect::right(), NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.
Referenced by getBufferPart(), and getZBufferPart().
| void NL3D::CDriverGL::computeLightMapInfos | ( | const CMaterial & | mat | ) | [private] |
Definition at line 668 of file driver_opengl_material.cpp.
References _Extensions, _LightMapLUT, _LightMapNoMulAddFallBack, NL3D::CMaterial::_LightMaps, _NLightMapPass, _NLightMapPerPass, _NLightMaps, NL3D::CGlExtensions::ATITextureEnvCombine3, H_AUTO_OGL, inlGetNumTextStages(), NL3D_DRV_MAX_LIGHTMAP, nlassert, and NL3D::CGlExtensions::NVTextureEnvCombine4.
Referenced by beginLightMapMultiPass().
???
Definition at line 373 of file driver_opengl_texture.cpp.
References GL_DSDT_NV, GL_DU8DV8_ATI, H_AUTO_OGL, and nlstop.
Referenced by setupTextureEx().
| void NL3D::CDriverGL::copyFrameBufferToTexture | ( | ITexture * | tex, | |
| uint32 | level, | |||
| uint32 | offsetx, | |||
| uint32 | offsety, | |||
| uint32 | x, | |||
| uint32 | y, | |||
| uint32 | width, | |||
| uint32 | height, | |||
| uint | cubeFace = 0 | |||
| ) | [private] |
Definition at line 2644 of file driver_opengl.cpp.
References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), getGlTextureFormat(), GL_TEXTURE_RECTANGLE_NV, H_AUTO_OGL, NL3D::CTextureDrvInfosGL::ID, NL3D::ITexture::isTextureCube(), nlassert, NLCubeFaceToGLCubeFace, NL3D::CDriverGLStates::setTextureMode(), setupTexture(), NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureDisabled, NL3D::ITexture::TextureDrvShare, NL3D::CTextureDrvInfosGL::TextureMode, and NL3D::CDriverGLStates::TextureRect.
Referenced by copyTargetToTexture(), and setRenderTarget().
| bool NL3D::CDriverGL::copyTargetToTexture | ( | ITexture * | tex, | |
| uint32 | offsetx, | |||
| uint32 | offsety, | |||
| uint32 | x, | |||
| uint32 | y, | |||
| uint32 | width, | |||
| uint32 | height, | |||
| uint32 | mipmapLevel | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 1934 of file driver_opengl_texture.cpp.
References _TextureTarget, _TextureTargetUpload, copyFrameBufferToTexture(), getRenderTargetSize(), and H_AUTO_OGL.
| IOcclusionQuery * NL3D::CDriverGL::createOcclusionQuery | ( | ) | [virtual] |
Create an occlusion query object.
Implements NL3D::IDriver.
Definition at line 4137 of file driver_opengl.cpp.
References _Extensions, _OcclusionQueryList, NL3D::COcclusionQueryGL::Driver, GLuint(), H_AUTO_OGL, NL3D::COcclusionQueryGL::ID, NL3D::COcclusionQueryGL::Iterator, nglGenOcclusionQueriesNV, nlassert, NL3D::IOcclusionQuery::NotAvailable, NL3D::CGlExtensions::NVOcclusionQuery, NL3D::COcclusionQueryGL::OcclusionType, and NL3D::COcclusionQueryGL::VisibleCount.
| IVertexBufferHardGL * NL3D::CDriverGL::createVertexBufferHard | ( | uint | size, | |
| uint | numVertices, | |||
| CVertexBuffer::TPreferredMemory | vbType, | |||
| CVertexBuffer * | vb | |||
| ) | [private, virtual] |
Definition at line 750 of file driver_opengl_vertex.cpp.
References _AGPVertexArrayRange, _MaxVerticesByVBHard, _VertexBufferHardSet, _VRAMVertexArrayRange, NL3D::CVertexBuffer::AGPPreferred, NL3D::IVertexArrayRange::createVBHardGL(), NL3D::IDriver::getStaticMemoryToVRAM(), H_AUTO_OGL, NL3D::CPtrSet< T >::insert(), and NL3D::CVertexBuffer::StaticPreferred.
Referenced by setupVertexBuffer().
| void NL3D::CDriverGL::deleteARBFragmentPrograms | ( | ) | [private] |
Definition at line 3609 of file driver_opengl.cpp.
References ARBWaterShader, GLuint(), H_AUTO_OGL, and nglDeleteProgramsARB.
Referenced by deleteFragmentShaders(), and initFragmentShaders().
| void NL3D::CDriverGL::deleteFragmentShaders | ( | ) | [private] |
Definition at line 3625 of file driver_opengl.cpp.
References ATICloudShaderHandle, ATIWaterShaderHandle, ATIWaterShaderHandleNoDiffuseMap, deleteARBFragmentPrograms(), GLuint(), H_AUTO_OGL, and nglDeleteFragmentShaderATI.
Referenced by release().
| void NL3D::CDriverGL::deleteOcclusionQuery | ( | IOcclusionQuery * | oq | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4155 of file driver_opengl.cpp.
References _CurrentOcclusionQuery, _OcclusionQueryList, NL3D::COcclusionQueryGL::Driver, GLuint(), H_AUTO_OGL, NL3D::COcclusionQueryGL::ID, NL3D::COcclusionQueryGL::Iterator, nglDeleteOcclusionQueriesNV, nlassert, and NLMISC::safe_cast().
Referenced by release().
| void NL3D::CDriverGL::disableHardwareTextureShader | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 531 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::DisableHardwareTextureShader, and H_AUTO_OGL.
| void NL3D::CDriverGL::disableHardwareVertexArrayAGP | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 525 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::DisableHardwareVertexArrayAGP, and H_AUTO_OGL.
| void NL3D::CDriverGL::disableHardwareVertexProgram | ( | ) | [virtual] |
Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly.
Implements NL3D::IDriver.
Definition at line 519 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::DisableHardwareVertexProgram, and H_AUTO_OGL.
| void NL3D::CDriverGL::disableUserTextureMatrix | ( | ) |
disable all texture matrix
Definition at line 211 of file driver_opengl_material.cpp.
References _DriverGLStates, _UserTexMatEnabled, NL3D::CDriverGLStates::activeTextureARB(), and H_AUTO_OGL.
Referenced by setupMaterial().
| void NL3D::CDriverGL::displayBench | ( | class NLMISC::CLog * | log | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4049 of file driver_opengl.cpp.
References NLMISC::CHTimer::display(), NLMISC::CHTimer::displayByExecutionPath(), NLMISC::CHTimer::displayHierarchical(), NLMISC::CHTimer::displayHierarchicalByExecutionPathSorted(), NLMISC::CHTimer::TotalTime, and NLMISC::CHTimer::TotalTimeWithoutSons.
| void NL3D::CDriverGL::doRefreshRenderSetup | ( | ) | [private] |
Definition at line 176 of file driver_opengl_matrix.cpp.
References _ForceNormalize, _LightSetupDirty, _ModelViewMatrix, _ModelViewMatrixDirty, _RenderSetupDirty, cleanLightSetup(), enableGlNormalize(), NLMISC::CMatrix::get(), H_AUTO_OGL, NLMISC::CMatrix::hasScalePart(), and nlassert.
Referenced by refreshRenderSetup().
| void NL3D::CDriverGL::enableFog | ( | bool | enable | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 2719 of file driver_opengl.cpp.
References _DriverGLStates, _FogEnabled, NL3D::CDriverGLStates::enableFog(), and H_AUTO_OGL.
| void NL3D::CDriverGL::enableGlNormalize | ( | bool | normalize | ) | [inline, private] |
Test/activate normalisation of normal.
Definition at line 1029 of file driver_opengl.h.
References _CurrentGlNormalize.
Referenced by doRefreshRenderSetup(), and forceNormalize().
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. |
Implements NL3D::IDriver.
Definition at line 163 of file driver_opengl_light.cpp.
References _Extensions, _LightMapDynamicLightDirty, _MaxDriverLight, _UserLightEnable, enableLightInternal(), H_AUTO_OGL, and NL3D::CGlExtensions::IsGeforceFXOrAbove.
Definition at line 183 of file driver_opengl_light.cpp.
References _DriverGLStates, _LightDirty, _LightSetupDirty, _MaxDriverLight, _RenderSetupDirty, NL3D::CDriverGLStates::enableLight(), and H_AUTO_OGL.
Referenced by enableLight(), and setupLightMapDynamicLighting().
| NLMISC::IKeyboardDevice * NL3D::CDriverGL::enableLowLevelKeyboard | ( | bool | enable | ) | [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
Implements NL3D::IDriver.
Definition at line 3007 of file driver_opengl.cpp.
References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().
| NLMISC::IMouseDevice * NL3D::CDriverGL::enableLowLevelMouse | ( | bool | enable, | |
| bool | exclusive | |||
| ) | [virtual] |
Enable / disable low level mouse.
This allow to take advantage of some options (speed of the mouse, automatic wrapping) It returns a interface to these parameters when it is supported, or NULL otherwise The interface pointer is valid as long as the low level mouse is enabled. A call to disable the mouse returns NULL, and restore the default mouse behavior NB : - In this mode the mouse cursor isn't drawn.
Implements NL3D::IDriver.
Definition at line 2977 of file driver_opengl.cpp.
References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().
| void NL3D::CDriverGL::enableNVTextureShader | ( | bool | enabled | ) | [private] |
nv texture shaders. Should be used only if this caps is present!
Definition at line 2917 of file driver_opengl.cpp.
References _NVTextureShaderEnabled, GL_TEXTURE_SHADER_NV, and H_AUTO_OGL.
Referenced by setupMaterial(), and setupWaterPassNV20().
| void NL3D::CDriverGL::enablePolygonSmoothing | ( | bool | smooth | ) | [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)
Implements NL3D::IDriver.
Definition at line 3693 of file driver_opengl.cpp.
References _PolygonSmooth, and H_AUTO_OGL.
| void NL3D::CDriverGL::enableStencilTest | ( | bool | enable | ) | [virtual] |
Set stencil support.
Implements NL3D::IDriver.
Definition at line 4261 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::enableStencilTest(), and H_AUTO_OGL.
| void NL3D::CDriverGL::enableUsedTextureMemorySum | ( | bool | enable | ) | [virtual] |
Enable the sum of texture memory used since last swapBuffers() call.
To retrieve the memory used call getUsedTextureMemory().
Implements NL3D::IDriver.
Definition at line 2826 of file driver_opengl.cpp.
References _SumTextureMemoryUsed, H_AUTO_OGL, and nlinfo.
| void NL3D::CDriverGL::enableVertexProgramDoubleSidedColor | ( | bool | doubleSided | ) | [private, 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
Implements NL3D::IDriver.
Definition at line 1864 of file driver_opengl_vertex_program.cpp.
References _Extensions, NL3D::CGlExtensions::ARBVertexProgram, GL_VERTEX_PROGRAM_TWO_SIDE_ARB, GL_VERTEX_PROGRAM_TWO_SIDE_NV, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.
| void NL3D::CDriverGL::endBench | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4041 of file driver_opengl.cpp.
| void NL3D::CDriverGL::endCloudMultiPass | ( | ) | [private] |
Definition at line 2058 of file driver_opengl_material.cpp.
References _CurrentMaterial, ATICloudShaderHandle, NL3D::CMaterial::Cloud, NL3D::CMaterial::getShader(), GL_FRAGMENT_SHADER_ATI, H_AUTO_OGL, and nlassert.
Referenced by endMultiPass().
| void NL3D::CDriverGL::endDialogMode | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4363 of file driver_opengl.cpp.
| void NL3D::CDriverGL::endLightMapMultiPass | ( | ) | [private] |
Definition at line 1065 of file driver_opengl_material.cpp.
References _CurrentFogColor, _CurrentMaterial, _DriverGLStates, _FogEnabled, _LastVertexSetupIsLightMap, NL3D::CMaterial::_LightMapsMulx2, _NLightMapPass, _NLightMapPerPass, _NLightMaps, NL3D::CDriverGLStates::activeTextureARB(), and H_AUTO_OGL.
Referenced by endMultiPass().
| virtual void NL3D::CDriverGL::endMaterialMultiPass | ( | ) | [inline, virtual] |
end multipass for this material.
Implements NL3D::IDriver.
Definition at line 621 of file driver_opengl.h.
References endMultiPass().
| void NL3D::CDriverGL::endMultiPass | ( | ) | [private] |
end multipass for this material.
Definition at line 635 of file driver_opengl_material.cpp.
References _CurrentMaterialSupportedShader, NL3D::CMaterial::Cloud, endCloudMultiPass(), endLightMapMultiPass(), endPPLMultiPass(), endPPLNoSpecMultiPass(), endSpecularMultiPass(), endWaterMultiPass(), H_AUTO_OGL, NL3D::CMaterial::LightMap, NL3D::CMaterial::PerPixelLighting, NL3D::CMaterial::PerPixelLightingNoSpec, NL3D::CMaterial::Specular, and NL3D::CMaterial::Water.
Referenced by endMaterialMultiPass(), renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), and renderTriangles().
| void NL3D::CDriverGL::endPPLMultiPass | ( | ) | [private] |
Definition at line 1726 of file driver_opengl_material.cpp.
References H_AUTO_OGL.
Referenced by endMultiPass().
| void NL3D::CDriverGL::endPPLNoSpecMultiPass | ( | ) | [private] |
Definition at line 1826 of file driver_opengl_material.cpp.
References H_AUTO_OGL.
Referenced by endMultiPass().
| void NL3D::CDriverGL::endProfileIBLock | ( | std::vector< std::string > & | result | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 3801 of file driver_opengl.cpp.
| void NL3D::CDriverGL::endProfileVBHardLock | ( | std::vector< std::string > & | result | ) | [virtual] |
If the driver support it, stop profile VBHard locks, and "print" result No-Op if already profiling NB: The results are the Locks in 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.
Implements NL3D::IDriver.
Definition at line 3730 of file driver_opengl.cpp.
References _NumVBHardProfileFrame, _VBHardProfiles, _VBHardProfiling, NL3D::CDriverGL::CVBHardProfile::AccumTime, NL3D::CDriverGL::CVBHardProfile::Change, NLMISC::contReset(), NLMISC::smprintf(), NLMISC::CTime::ticksToSecond(), NLMISC::toString(), and NL3D::CDriverGL::CVBHardProfile::VBHard.
| void NL3D::CDriverGL::endSpecularBatch | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 1130 of file driver_opengl_material.cpp.
References _SpecularBatchOn, H_AUTO_OGL, and setupSpecularEnd().
| void NL3D::CDriverGL::endSpecularMultiPass | ( | ) | [private] |
Definition at line 1404 of file driver_opengl_material.cpp.
References _SpecularBatchOn, H_AUTO_OGL, and setupSpecularEnd().
Referenced by endMultiPass().
| void NL3D::CDriverGL::endWaterMultiPass | ( | ) | [private] |
Definition at line 2392 of file driver_opengl_material.cpp.
References _CurrentMaterial, _Extensions, ARBWaterShader, ATIWaterShaderHandleNoDiffuseMap, NL3D::CMaterial::getShader(), GL_FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_SHADER_ATI, H_AUTO_OGL, nlassert, NL3D::CGlExtensions::NVTextureShader, and NL3D::CMaterial::Water.
Referenced by endMultiPass().
| void NL3D::CDriverGL::fenceOnCurVBHardIfNeeded | ( | IVertexBufferHardGL * | newVBHard | ) | [private] |
Definition at line 1743 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, NL3D::CVertexBufferHardGLNVidia::getLockHintStatic(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::NVidiaVB, NL3D::CVertexBufferHardGLNVidia::setFence(), and NL3D::IVertexBufferHardGL::VBType.
Referenced by activeVertexBuffer().
fill the RGBA back buffer
| bitmap | will be written in the buffer. no-op if bad size. |
Implements NL3D::IDriver.
Definition at line 2624 of file driver_opengl.cpp.
References NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getPixelFormat(), NLMISC::CBitmap::getPixels(), NLMISC::CBitmap::getWidth(), getWindowSize(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CBitmap::RGBA, and NLMISC::CRect::Width.
| void NL3D::CDriverGL::finish | ( | ) | [virtual] |
force the driver to flush all command.
glFinish() in opengl. Interesting only for debug and profiling purpose.
Implements NL3D::IDriver.
Definition at line 3650 of file driver_opengl.cpp.
References H_AUTO_OGL.
| void NL3D::CDriverGL::flush | ( | ) | [virtual] |
| bool NL3D::CDriverGL::fogEnabled | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 2713 of file driver_opengl.cpp.
References _FogEnabled, and H_AUTO_OGL.
| void NL3D::CDriverGL::forceActivateTexEnvColor | ( | uint | stage, | |
| const CMaterial::CTexEnv & | env | |||
| ) | [inline, private] |
Definition at line 874 of file driver_opengl.h.
References NL3D::CMaterial::CTexEnv::ConstantColor, forceActivateTexEnvColor(), and H_AUTO_OGL.
| void NL3D::CDriverGL::forceActivateTexEnvColor | ( | uint | stage, | |
| NLMISC::CRGBA | col | |||
| ) | [inline, private] |
Definition at line 861 of file driver_opengl.h.
References _CurrentTexEnv, _DriverGLStates, NLMISC::CRGBA::A, NL3D::CDriverGLStates::activeTextureARB(), NLMISC::CRGBA::B, NL3D::CMaterial::CTexEnv::ConstantColor, NLMISC::CRGBA::G, and NLMISC::CRGBA::R.
Referenced by activateTexEnvColor(), forceActivateTexEnvColor(), and swapBuffers().
| void NL3D::CDriverGL::forceActivateTexEnvMode | ( | uint | stage, | |
| const CMaterial::CTexEnv & | env | |||
| ) | [private] |
Definition at line 1615 of file driver_opengl_texture.cpp.
References _CurrentTexEnv, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, NL3D::CDriverGLStates::activeTextureARB(), NL3D::CGlExtensions::ATITextureEnvCombine3, NL3D::CMaterial::CTexEnv::Env, NL3D::CMaterial::CTexEnv::EnvPacked, NL3D::CGlExtensions::EXTTextureEnvCombine, NL3D::forceActivateTexEnvModeEnvCombine4(), GL_MODULATE_ADD_ATI, H_AUTO_OGL, NL3D::InterpolateSrcLUT, NL3D::CMaterial::InterpolateTexture, NL3D::CMaterial::Mad, NL3D::CGlExtensions::NVTextureEnvCombine4, NL3D::OperandLUT, NL3D::OperatorLUT, NL3D::CMaterial::Replace, NL3D::SourceLUT, and TexEnvSpecialDisabled.
Referenced by activateTexEnvMode(), and swapBuffers().
| void NL3D::CDriverGL::forceDXTCCompression | ( | bool | dxtcComp | ) | [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.
Implements NL3D::IDriver.
Definition at line 1789 of file driver_opengl_texture.cpp.
References _ForceDXTCCompression, and H_AUTO_OGL.
| void NL3D::CDriverGL::forceNativeFragmentPrograms | ( | bool | nativeOnly | ) | [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. |
Implements NL3D::IDriver.
Definition at line 3489 of file driver_opengl.cpp.
References _ForceNativeFragmentPrograms.
| virtual void NL3D::CDriverGL::forceNormalize | ( | bool | normalize | ) | [inline, virtual] |
Force input normal to be normalized by the driver.
default is false. NB: driver force the normalization himself if:
Implements NL3D::IDriver.
Definition at line 396 of file driver_opengl.h.
References _ForceNormalize, and enableGlNormalize().
| void NL3D::CDriverGL::forceTextureResize | ( | uint | divisor | ) | [virtual] |
if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc.
.) to be divided by Divisor (2, 4, 8...) Default is 1. NB: this is done only on TextureFile
Implements NL3D::IDriver.
Definition at line 1796 of file driver_opengl_texture.cpp.
References _ForceTextureResizePower, NLMISC::clamp(), NLMISC::getPowerOf2(), and H_AUTO_OGL.
Implements NL3D::IDriver.
Definition at line 3983 of file driver_opengl.cpp.
References NL3D::IDriver::CAdapter::Description, NL3D::IDriver::CAdapter::DeviceId, NL3D::IDriver::CAdapter::DeviceName, NL3D::IDriver::CAdapter::Driver, NL3D::IDriver::CAdapter::DriverVersion, H_AUTO_OGL, NL3D::IDriver::CAdapter::Revision, NL3D::IDriver::CAdapter::SubSysId, NL3D::IDriver::CAdapter::Vendor, and NL3D::IDriver::CAdapter::VendorId.
| uint32 NL3D::CDriverGL::getAvailableVertexAGPMemory | ( | ) | [virtual] |
Return the amount of AGP memory allocated by initVertexBufferHard() to store vertices.
Implements NL3D::IDriver.
Definition at line 1721 of file driver_opengl_vertex.cpp.
References _AGPVertexArrayRange, H_AUTO_OGL, and NL3D::IVertexArrayRange::sizeAllocated().
Referenced by profileVBHardAllocation().
| uint32 NL3D::CDriverGL::getAvailableVertexVRAMMemory | ( | ) | [virtual] |
Return the amount of video memory allocated by initVertexBufferHard() to store vertices.
Implements NL3D::IDriver.
Definition at line 1732 of file driver_opengl_vertex.cpp.
References _VRAMVertexArrayRange, H_AUTO_OGL, and NL3D::IVertexArrayRange::sizeAllocated().
Referenced by profileVBHardAllocation().
| uint8 NL3D::CDriverGL::getBitPerPixel | ( | ) | [virtual] |
Return the depth of the driver after init().
Implements NL3D::IDriver.
Definition at line 2488 of file driver_opengl.cpp.
References _Depth, and H_AUTO_OGL.
| NLMISC::CRGBA NL3D::CDriverGL::getBlendConstantColor | ( | ) | const [virtual] |
see supportBlendConstantColor().
Get the current Blend Constant Color.
Implements NL3D::IDriver.
Definition at line 3105 of file driver_opengl.cpp.
References _CurrentBlendConstantColor, and H_AUTO_OGL.
| void NL3D::CDriverGL::getBuffer | ( | CBitmap & | bitmap | ) | [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 |
Implements NL3D::IDriver.
Definition at line 2615 of file driver_opengl.cpp.
References NLMISC::CBitmap::flipV(), getBufferPart(), getWindowSize(), H_AUTO_OGL, NLMISC::CRect::Height, and NLMISC::CRect::Width.
| void NL3D::CDriverGL::getBufferPart | ( | CBitmap & | bitmap, | |
| NLMISC::CRect & | rect | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 2581 of file driver_opengl.cpp.
References clipRect(), NLMISC::CBitmap::getPixels(), NLMISC::CObjectVector< T, EnableObjectBehavior >::getPtr(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CBitmap::reset(), NLMISC::CBitmap::resize(), NLMISC::CBitmap::RGBA, NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.
Referenced by getBuffer().
| virtual float NL3D::CDriverGL::getClipSpaceZMin | ( | ) | const [inline, virtual] |
Implements NL3D::IDriver.
Definition at line 384 of file driver_opengl.h.
| CDriverGL::TCullMode NL3D::CDriverGL::getCullMode | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 4254 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::getCullMode(), and H_AUTO_OGL.
return the current screen mode (if we are in windowed, return the screen mode behind the window)
Implements NL3D::IDriver.
Definition at line 1649 of file driver_opengl.cpp.
References _FullScreen, NL3D::GfxMode::Depth, dpy, NL3D::GfxMode::Frequency, H_AUTO_OGL, NL3D::GfxMode::Height, NLMISC::if(), nldebug, nlwarning, NL3D::GfxMode::OffScreen, NL3D::GfxMode::Width, and NL3D::GfxMode::Windowed.
| const IVertexBufferHardGL* NL3D::CDriverGL::getCurrentVertexBufferHard | ( | ) | const [inline] |
Definition at line 1304 of file driver_opengl.h.
References _CurrentVertexBufferHard.
Implements NL3D::IDriver.
Definition at line 4240 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::getDepthRange(), and H_AUTO_OGL.
| CTextureCube* NL3D::CDriverGL::getDiffuseCubeMap | ( | ) | [inline, private] |
Definition at line 996 of file driver_opengl.h.
References getSpecularCubeMap().
| virtual void* NL3D::CDriverGL::getDisplay | ( | ) | [inline, virtual] |
Implements NL3D::IDriver.
Definition at line 319 of file driver_opengl.h.
Get the delay in ms for mouse double clicks.
Implements NL3D::IDriver.
Definition at line 3049 of file driver_opengl.cpp.
References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().
| virtual const char* NL3D::CDriverGL::getDriverInformation | ( | ) | [inline, virtual] |
Get driver informations.
get the nel name of the driver (ex: "Opengl 1.2 NeL Driver")
Implements NL3D::IDriver.
Definition at line 490 of file driver_opengl.h.
| virtual NLMISC::IEventEmitter* NL3D::CDriverGL::getEventEmitter | ( | void | ) | [inline, virtual] |
| CRGBA NL3D::CDriverGL::getFogColor | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 2779 of file driver_opengl.cpp.
References _CurrentFogColor, NLMISC::CRGBA::A, NLMISC::CRGBA::B, NLMISC::CRGBA::G, H_AUTO_OGL, and NLMISC::CRGBA::R.
| float NL3D::CDriverGL::getFogEnd | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 2772 of file driver_opengl.cpp.
References _FogEnd, and H_AUTO_OGL.
| float NL3D::CDriverGL::getFogStart | ( | ) | const [virtual] |
Get.
Implements NL3D::IDriver.
Definition at line 2765 of file driver_opengl.cpp.
References _FogStart, and H_AUTO_OGL.
| CMatrix NL3D::CDriverGL::getFrustumMatrix | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 65 of file driver_opengl_matrix.cpp.
References H_AUTO_OGL, and NLMISC::CMatrix::set().
Definition at line 250 of file driver_opengl_texture.cpp.
References _Extensions, _ForceDXTCCompression, NL3D::ITexture::allowDegradation(), NL3D::ITexture::Alpha, NLMISC::CBitmap::Alpha, NL3D::ITexture::AlphaLuminance, NLMISC::CBitmap::AlphaLuminance, NL3D::CGlExtensions::ATIEnvMapBumpMap, NL3D::CGlExtensions::ATIFragmentShader, NL3D::ITexture::Auto, NL3D::ITexture::DsDt, NLMISC::CBitmap::DsDt, NL3D::ITexture::DXTC1, NLMISC::CBitmap::DXTC1, NL3D::ITexture::DXTC1Alpha, NLMISC::CBitmap::DXTC1Alpha, NL3D::ITexture::DXTC3, NLMISC::CBitmap::DXTC3, NLMISC::CBitmap::DXTC5, NL3D::ITexture::DXTC5, NL3D::CGlExtensions::EXTTextureCompressionS3TC, NLMISC::CBitmap::getPixelFormat(), NL3D::ITexture::getUploadFormat(), GL_DSDT_NV, GL_DU8DV8_ATI, H_AUTO_OGL, NL3D::ITexture::Luminance, NLMISC::CBitmap::Luminance, nlassert, NL3D::CGlExtensions::NVTextureShader, NL3D::ITexture::RGB565, NL3D::ITexture::RGB888, NLMISC::CBitmap::RGBA, NL3D::ITexture::RGBA4444, NL3D::ITexture::RGBA5551, and NL3D::ITexture::RGBA8888.
Referenced by copyFrameBufferToTexture(), setupTextureEx(), and uploadTexture().
| uint32 NL3D::CDriverGL::getHwnd | ( | ) | [inline] |
Definition at line 283 of file driver_opengl.h.
| virtual uint32 NL3D::CDriverGL::getImplementationVersion | ( | ) | const [inline, virtual] |
Get the driver version.
Not the same than interface version. Incremented at each implementation change.
Implements NL3D::IDriver.
Definition at line 485 of file driver_opengl.h.
References ReleaseVersion.
| NLMISC::IInputDeviceManager * NL3D::CDriverGL::getLowLevelInputDeviceManager | ( | ) | [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 ...)
Implements NL3D::IDriver.
Definition at line 3036 of file driver_opengl.cpp.
References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().
| uint NL3D::CDriverGL::getMaxLight | ( | ) | const [virtual] |
return the number of light supported by driver.
typically 8.
Implements NL3D::IDriver.
Definition at line 34 of file driver_opengl_light.cpp.
References _MaxDriverLight, and H_AUTO_OGL.
| uint NL3D::CDriverGL::getMaxVerticesByVertexBufferHard | ( | ) | const [virtual] |
return How many vertices VertexBufferHard support
Implements NL3D::IDriver.
Definition at line 742 of file driver_opengl_vertex.cpp.
References _MaxVerticesByVBHard, and H_AUTO_OGL.
Implements NL3D::IDriver.
Definition at line 1591 of file driver_opengl.cpp.
References NL3D::GfxMode::Depth, dpy, NL3D::GfxMode::Frequency, H_AUTO_OGL, NL3D::GfxMode::Height, nldebug, nlwarning, and NL3D::GfxMode::Width.
| uint NL3D::CDriverGL::getNbTextureStages | ( | ) | const [virtual] |
Get the number of texture stage available, for multi texturing (Normal material shaders). Valid only after setDisplay().
Implements NL3D::IDriver.
Definition at line 3113 of file driver_opengl.cpp.
References H_AUTO_OGL, and inlGetNumTextStages().
Referenced by checkTextureOn().
| uint NL3D::CDriverGL::getNumAdapter | ( | ) | const [virtual] |
Adaptor information.
Implements NL3D::IDriver.
Definition at line 3974 of file driver_opengl.cpp.
References H_AUTO_OGL.
| void NL3D::CDriverGL::getNumPerStageConstant | ( | uint & | lightedMaterial, | |
| uint & | unlightedMaterial | |||
| ) | const [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.
Implements NL3D::IDriver.
Definition at line 4351 of file driver_opengl.cpp.
References inlGetNumTextStages().
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.
Implements NL3D::IDriver.
Definition at line 1963 of file driver_opengl_texture.cpp.
References _TextureTarget, _WindowHeight, _WindowWidth, dpy, H_AUTO_OGL, and win.
Referenced by copyTargetToTexture().
| CTextureCube * NL3D::CDriverGL::getSpecularCubeMap | ( | uint | exp | ) | [private] |
get (and if necessary, build) a cube map used for specular lighting. The range for exponent is limited, and only the best fit is used
Definition at line 1436 of file driver_opengl_material.cpp.
References _SpecularTextureCubes, NL3D::BuildCubeMap(), NLMISC::clamp(), NL3D::CTextureCube::getTexture(), H_AUTO_OGL, NL3D::CTextureCube::negative_x, NL3D::CTextureCube::negative_y, NL3D::CTextureCube::negative_z, nlassert, NL3D::CTextureCube::positive_x, NL3D::CTextureCube::positive_y, NL3D::CTextureCube::positive_z, NL3D::ITexture::RGB565, NL3D::ITexture::setUploadFormat(), and NLMISC::smprintf().
Referenced by getDiffuseCubeMap(), setupPPLNoSpecPass(), and setupPPLPass().
| CMaterial::TShader NL3D::CDriverGL::getSupportedShader | ( | CMaterial::TShader | shader | ) | [private] |
for material shaders
test whether the given shader is supported, and gives back a supported shader
Definition at line 242 of file driver_opengl_material.cpp.
References _SupportPerPixelShader, _SupportPerPixelShaderNoSpec, H_AUTO_OGL, inlGetNumTextStages(), NL3D::CMaterial::LightMap, NL3D::CMaterial::Normal, NL3D::CMaterial::PerPixelLighting, NL3D::CMaterial::PerPixelLightingNoSpec, and NL3D::CMaterial::Specular.
Referenced by setupMaterial().
| virtual uint64 NL3D::CDriverGL::getSwapBufferCounter | ( | ) | const [inline, virtual] |
Implements NL3D::IDriver.
Definition at line 645 of file driver_opengl.h.
References _SwapBufferCounter.
| uint NL3D::CDriverGL::getSwapVBLInterval | ( | ) | [virtual] |
get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL
Implements NL3D::IDriver.
Definition at line 3677 of file driver_opengl.cpp.
References _Extensions, _Interval, H_AUTO_OGL, and NL3D::CGlExtensions::WGLEXTSwapControl.
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.
Implements NL3D::IDriver.
Definition at line 1840 of file driver_opengl_texture.cpp.
References H_AUTO_OGL, NL3D::CTextureDrvInfosGL::ID, and NL3D::ITexture::TextureDrvShare.
| uint32 NL3D::CDriverGL::getUsedTextureMemory | ( | ) | const [virtual] |
Return the amount of texture video memory used since last swapBuffers() call.
Before use this method, you should enable the sum with enableUsedTextureMemorySum().
Implements NL3D::IDriver.
Definition at line 2837 of file driver_opengl.cpp.
References _TextureUsed, H_AUTO_OGL, and NL3D::CTextureDrvInfosGL::TextureMemory.
| CVertexBuffer::TVertexColorType NL3D::CDriverGL::getVertexColorFormat | ( | ) | const [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 *
Implements NL3D::IDriver.
Definition at line 4015 of file driver_opengl.cpp.
References H_AUTO_OGL, and NL3D::CVertexBuffer::TRGBA.
| const char * NL3D::CDriverGL::getVideocardInformation | ( | ) | [virtual] |
Get videocard informations.
get the official name of the driver
Implements NL3D::IDriver.
Definition at line 2494 of file driver_opengl.cpp.
References _Initialized, H_AUTO_OGL, and NLMISC::smprintf().
| CMatrix NL3D::CDriverGL::getViewMatrix | ( | void | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 149 of file driver_opengl_matrix.cpp.
References _UserViewMtx, and H_AUTO_OGL.
| void NL3D::CDriverGL::getViewport | ( | CViewport & | viewport | ) | [virtual] |
Get the current viewport.
Implements NL3D::IDriver.
Definition at line 2261 of file driver_opengl.cpp.
References _CurrViewport, and H_AUTO_OGL.
Referenced by setRenderTarget().
Get the position of the window always (0,0) in fullscreen.
Implements NL3D::IDriver.
Definition at line 2449 of file driver_opengl.cpp.
References _OffScreen, _WindowX, _WindowY, and H_AUTO_OGL.
| emptyProc NL3D::CDriverGL::getWindowProc | ( | ) | [virtual] |
Get the width and the height of the window.
Implements NL3D::IDriver.
Definition at line 2420 of file driver_opengl.cpp.
References _OffScreen, _WindowHeight, _WindowWidth, dpy, H_AUTO_OGL, WGL_PBUFFER_HEIGHT_ARB, WGL_PBUFFER_WIDTH_ARB, and win.
Referenced by clipRect(), fillBuffer(), getBuffer(), getZBuffer(), and setRenderTarget().
| void NL3D::CDriverGL::getZBuffer | ( | std::vector< float > & | zbuffer | ) | [virtual] |
get the ZBuffer (back buffer).
| zbuffer | the returned array of Z. size of getWindowSize() . |
Implements NL3D::IDriver.
Definition at line 2607 of file driver_opengl.cpp.
References getWindowSize(), getZBufferPart(), H_AUTO_OGL, NLMISC::CRect::Height, and NLMISC::CRect::Width.
| void NL3D::CDriverGL::getZBufferPart | ( | std::vector< float > & | zbuffer, | |
| NLMISC::CRect & | rect | |||
| ) | [virtual] |
get a part of the ZBuffer (back buffer).
NB: 0,0 is the bottom left corner of the screen.
| zbuffer | the returned array of Z. size of rec.Width*rec.Height. | |
| rect | the in/out (wanted/clipped) part of ZBuffer to retrieve. |
Implements NL3D::IDriver.
Definition at line 2593 of file driver_opengl.cpp.
References clipRect(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.
Referenced by getZBuffer().
| void NL3D::CDriverGL::incrementResetCounter | ( | ) | [inline] |
Definition at line 1302 of file driver_opengl.h.
References NL3D::IDriver::_ResetCounter.
Referenced by NL3D::CVertexBufferHardARB::invalidate(), NL3D::CVertexBufferHardGLMapObjectATI::invalidate(), NL3D::CVertexBufferHardARB::lock(), and NL3D::CVertexBufferHardGLMapObjectATI::lock().
Implements NL3D::IDriver.
Definition at line 415 of file driver_opengl.cpp.
References dpy, H_AUTO_OGL, nldebug, nlerror, nlwarning, retrieveATIDriverVersion(), and NL3D::WndProc().
Referenced by renderRawQuads().
| static void NL3D::CDriverGL::initCausticCubeMap | ( | ) | [static, private] |
| void NL3D::CDriverGL::initEMBM | ( | ) | [private] |
Definition at line 3230 of file driver_opengl.cpp.
References _DriverGLStates, _Extensions, _StageSupportEMBM, NL3D::CDriverGLStates::activeTextureARB(), NL3D::CGlExtensions::ATIEnvMapBumpMap, GL_BUMP_NUM_TEX_UNITS_ATI, GL_BUMP_TARGET_ATI, GL_BUMP_TEX_UNITS_ATI, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, min, NL3D::CGlExtensions::NbTextureStages, nglGetTexBumpParameterivATI, and supportEMBM().
| void NL3D::CDriverGL::initFragmentShaders | ( | ) | [private] |
Definition at line 3494 of file driver_opengl.cpp.
References _Extensions, _ForceNativeFragmentPrograms, NL3D::CGlExtensions::ARBFragmentProgram, ARBWaterShader, ATICloudShaderHandle, NL3D::CGlExtensions::ATIFragmentShader, ATIWaterShaderHandle, ATIWaterShaderHandleNoDiffuseMap, deleteARBFragmentPrograms(), NL3D::fetchPerturbedEnvMapR200(), GL_CON_0_ATI, GL_LERP_ATI, GL_MOV_ATI, GL_MUL_ATI, GL_PRIMARY_COLOR_ARB, GL_REG_0_ATI, GL_REG_1_ATI, GL_REG_2_ATI, GL_REG_3_ATI, GL_SWIZZLE_STR_ATI, GLenum(), H_AUTO_OGL, NL3D::loadARBFragmentProgramStringNative(), nglAlphaFragmentOp1ATI, nglAlphaFragmentOp2ATI, nglAlphaFragmentOp3ATI, nglBeginFragmentShaderATI, nglBindFragmentShaderATI, nglColorFragmentOp1ATI, nglColorFragmentOp2ATI, nglEndFragmentShaderATI, nglGenFragmentShadersATI, nglSampleMapATI, nlassert, nlinfo, and nlwarning.
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. |
Implements NL3D::IDriver.
Definition at line 1650 of file driver_opengl_vertex.cpp.
References _AGPVertexArrayRange, _MaxVerticesByVBHard, _VRAMVertexArrayRange, NL3D::CVertexBuffer::AGPPreferred, NL3D::IVertexArrayRange::allocate(), H_AUTO_OGL, NL3D_DRV_VERTEXARRAY_MINIMUM_SIZE, nlinfo, resetVertexArrayRange(), NL3D::CVertexBuffer::StaticPreferred, and supportVertexBufferHard().
| uint NL3D::CDriverGL::inlGetNumTextStages | ( | ) | const [inline, private] |
Same as getNbTextureStages(), but faster because inline, and not virtual!!
Definition at line 1208 of file driver_opengl.h.
References _Extensions, and NL3D::CGlExtensions::NbTextureStages.
Referenced by beginSpecularMultiPass(), computeLightMapInfos(), getNbTextureStages(), getNumPerStageConstant(), getSupportedShader(), resetLightMapVertexSetup(), resetTextureShaders(), setMatrix2DForTextureOffsetAddrMode(), setupGlArraysStd(), setupLightMapPass(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularBegin(), setupTextureEx(), setupWaterPassARB(), setupWaterPassNV20(), setupWaterPassR200(), swapBuffers(), swapTextureHandle(), toggleGlArraysForARBVertexProgram(), toggleGlArraysForEXTVertexShader(), and toggleGlArraysForNVVertexProgram().
| bool NL3D::CDriverGL::isActive | ( | ) | [virtual] |
Return true if driver is still active. Return false else. If he user close the window, must return false.
Implements NL3D::IDriver.
Definition at line 2478 of file driver_opengl.cpp.
References H_AUTO_OGL.
Implements NL3D::IDriver.
Definition at line 3205 of file driver_opengl.cpp.
References _StageSupportEMBM, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, nlassert, and supportEMBM().
| virtual bool NL3D::CDriverGL::isForceNormalize | ( | ) | const [inline, virtual] |
return the forceNormalize() state.
Implements NL3D::IDriver.
Definition at line 404 of file driver_opengl.h.
References _ForceNormalize.
| virtual bool NL3D::CDriverGL::isLost | ( | ) | const [inline, virtual] |
Implements NL3D::IDriver.
Definition at line 295 of file driver_opengl.h.
| bool NL3D::CDriverGL::isPolygonSmoothingEnabled | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 3707 of file driver_opengl.cpp.
References _PolygonSmooth, and H_AUTO_OGL.
| bool NL3D::CDriverGL::isStencilTestEnabled | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 4268 of file driver_opengl.cpp.
References _DriverGLStates, H_AUTO_OGL, and NL3D::CDriverGLStates::isStencilTestEnabled().
| bool NL3D::CDriverGL::isTextureAddrModeSupported | ( | CMaterial::TTexAddressingMode | mode | ) | const [virtual] |
test whether a texture addressing mode is supported
Implements NL3D::IDriver.
Definition at line 2886 of file driver_opengl.cpp.
References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureShader.
is the texture is set up in the driver NB: this method is thread safe.
Implements NL3D::IDriver.
Definition at line 1797 of file driver_opengl.cpp.
References NL3D::IDriver::_SyncTexDrvInfos, NL3D::IDriver::getTextureShareName(), and H_AUTO_OGL.
Implements NL3D::IDriver.
Definition at line 490 of file driver_opengl.cpp.
References NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getWidth(), NL3D::ITexture::isBloomTexture(), NLMISC::isPowerOf2(), NL3D::ITexture::mipMapOff(), and supportTextureRectangle().
Referenced by setupTextureEx().
| bool NL3D::CDriverGL::isVertexProgramEmulated | ( | ) | const [private, virtual] |
Does the driver supports vertex program, but emulated by CPU ?
Implements NL3D::IDriver.
Definition at line 78 of file driver_opengl_vertex_program.cpp.
References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgramEmulated.
| bool NL3D::CDriverGL::isVertexProgramEnabled | ( | ) | const [inline, private] |
Definition at line 1167 of file driver_opengl.h.
References _VertexProgramEnabled.
Referenced by setupGlArrays(), toggleGlArraysForARBVertexProgram(), toggleGlArraysForEXTVertexShader(), and toggleGlArraysForNVVertexProgram().
| bool NL3D::CDriverGL::isVertexProgramSupported | ( | ) | const [private, virtual] |
Does the driver supports vertex programs ?
Implements NL3D::IDriver.
Definition at line 71 of file driver_opengl_vertex_program.cpp.
References _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.
Referenced by supportBloomEffect().
| bool NL3D::CDriverGL::isWaterShaderSupported | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 2874 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::ARBFragmentProgram, NL3D::CGlExtensions::ARBVertexProgram, ARBWaterShader, NL3D::CGlExtensions::ATIFragmentShader, NL3D::CGlExtensions::EXTVertexShader, H_AUTO_OGL, NL3D::CGlExtensions::NVTextureShader, and NL3D::CGlExtensions::NVVertexProgram.
| bool NL3D::CDriverGL::isWndActive | ( | ) | const [inline] |
Definition at line 1303 of file driver_opengl.h.
References _WndActive.
Referenced by NL3D::CVertexArrayRangeARB::updateLostBuffers(), and NL3D::CVertexArrayRangeMapObjectATI::updateLostBuffers().
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.
Implements NL3D::IDriver.
Definition at line 701 of file driver_opengl_vertex.cpp.
References _LastVB, H_AUTO_OGL, and setupUVPtr().
| uint32 NL3D::CDriverGL::profileAllocatedTextureMemory | ( | ) | [virtual] |
Return the amount of Texture memory requested.
taking mipmap, compression, texture format, etc... into account. NB: because of GeForce*, RGB888 is considered to be 32 bits. So it may be false for others cards :).
Implements NL3D::IDriver.
Definition at line 2801 of file driver_opengl.cpp.
References _AllocatedTextureMemory, and H_AUTO_OGL.
| void NL3D::CDriverGL::profileIBAllocation | ( | std::vector< std::string > & | result | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 3807 of file driver_opengl.cpp.
| void NL3D::CDriverGL::profileRenderedPrimitives | ( | CPrimitiveProfile & | pIn, | |
| CPrimitiveProfile & | pOut | |||
| ) | [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 ...). |
Implements NL3D::IDriver.
Definition at line 2792 of file driver_opengl.cpp.
References _PrimitiveProfileIn, _PrimitiveProfileOut, and H_AUTO_OGL.
| uint32 NL3D::CDriverGL::profileSetupedMaterials | ( | ) | const [virtual] |
Get the number of material setuped from the last swapBuffers() call.
Implements NL3D::IDriver.
Definition at line 2809 of file driver_opengl.cpp.
References _NbSetupMaterialCall, and H_AUTO_OGL.
| uint32 NL3D::CDriverGL::profileSetupedModelMatrix | ( | ) | const [virtual] |
Get the number of matrix setuped from the last swapBuffers() call.
Implements NL3D::IDriver.
Definition at line 2817 of file driver_opengl.cpp.
References _NbSetupModelMatrixCall, and H_AUTO_OGL.
| void NL3D::CDriverGL::profileVBHardAllocation | ( | std::vector< std::string > & | result | ) | [virtual] |
display VBhards allocated
Implements NL3D::IDriver.
Definition at line 3813 of file driver_opengl.cpp.
References _VertexBufferHardSet, getAvailableVertexAGPMemory(), getAvailableVertexVRAMMemory(), NL3D::CVertexBuffer::getName(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CPtrSet< T >::Set, NLMISC::toString(), and NL3D::IVertexBufferHardGL::VB.
| void NL3D::CDriverGL::refreshProjMatrixFromGL | ( | ) | [private] |
Definition at line 3121 of file driver_opengl.cpp.
References _GLProjMat, _ProjMatDirty, H_AUTO_OGL, and NLMISC::CMatrix::set().
Referenced by setConstantMatrix().
| void NL3D::CDriverGL::refreshRenderSetup | ( | ) | [inline, private] |
Definition at line 1042 of file driver_opengl.h.
References _RenderSetupDirty, and doRefreshRenderSetup().
Referenced by renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), renderSimpleTriangles(), renderTriangles(), setConstantMatrix(), and setupLightMapDynamicLighting().
| bool NL3D::CDriverGL::release | ( | void | ) | [virtual] |
Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers).
Reimplemented from NL3D::IDriver.
Definition at line 2022 of file driver_opengl.cpp.
References _AGPVertexArrayRange, _FullScreen, _Initialized, _OcclusionQueryList, _OffScreen, _SwapBufferCounter, _VRAMVertexArrayRange, ctx, deleteFragmentShaders(), deleteOcclusionQuery(), dpy, H_AUTO_OGL, nlinfo, nlwarning, resetVertexArrayRange(), and win.
Referenced by ~CDriverGL().
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. |
Implements NL3D::IDriver.
Definition at line 261 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, NL3D::CIndexBufferInfo::_Format, _LastIB, _PrimitiveProfileIn, _PrimitiveProfileOut, NL3D::CIndexBufferInfo::_Values, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::IVertexBufferHardGL::isInvalid(), nlassert, NL3D::CPrimitiveProfile::NLines, refreshRenderSetup(), setupMaterial(), and setupPass().
| virtual bool NL3D::CDriverGL::renderLinesWithIndexOffset | ( | CMaterial & | mat, | |
| uint32 | firstIndex, | |||
| uint32 | nlines, | |||
| uint | indexOffset | |||
| ) | [inline, 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.
Implements NL3D::IDriver.
Definition at line 440 of file driver_opengl.h.
References nlassertex, and UNSUPPORTED_INDEX_OFFSET_MSG.
| bool NL3D::CDriverGL::renderRawLines | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numTri | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 446 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::isInvalid(), NL3D::CPrimitiveProfile::NLines, refreshRenderSetup(), setupMaterial(), and setupPass().
| bool NL3D::CDriverGL::renderRawPoints | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numPoints | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 405 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::isInvalid(), NL3D::CPrimitiveProfile::NPoints, refreshRenderSetup(), setupMaterial(), and setupPass().
| bool NL3D::CDriverGL::renderRawQuads | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numQuads | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 530 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, init(), NL3D::IVertexBufferHardGL::isInvalid(), min, NL3D::CPrimitiveProfile::NQuads, refreshRenderSetup(), setupMaterial(), and setupPass().
| bool NL3D::CDriverGL::renderRawTriangles | ( | CMaterial & | mat, | |
| uint32 | startVertex, | |||
| uint32 | numTri | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 487 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::isInvalid(), NL3D::CPrimitiveProfile::NTriangles, refreshRenderSetup(), setupMaterial(), and setupPass().
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. |
Implements NL3D::IDriver.
Definition at line 366 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, NL3D::CIndexBufferInfo::_Format, _LastIB, _PrimitiveProfileIn, _PrimitiveProfileOut, NL3D::CIndexBufferInfo::_Values, NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::IVertexBufferHardGL::isInvalid(), nlassert, NL3D::CPrimitiveProfile::NTriangles, and refreshRenderSetup().
| virtual bool NL3D::CDriverGL::renderSimpleTrianglesWithIndexOffset | ( | uint32 | , | |
| uint32 | , | |||
| uint | ||||
| ) | [inline, virtual] |
Implements NL3D::IDriver.
Definition at line 442 of file driver_opengl.h.
References nlassertex, and UNSUPPORTED_INDEX_OFFSET_MSG.
| bool NL3D::CDriverGL::renderTriangles | ( | CMaterial & | mat, | |
| uint32 | firstIndex, | |||
| uint32 | ntris | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 312 of file driver_opengl_vertex.cpp.
References _CurrentVertexBufferHard, NL3D::CIndexBufferInfo::_Format, _LastIB, _PrimitiveProfileIn, _PrimitiveProfileOut, NL3D::CIndexBufferInfo::_Values, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::IVertexBufferHardGL::isInvalid(), nlassert, NL3D::CPrimitiveProfile::NTriangles, refreshRenderSetup(), setupMaterial(), and setupPass().
| virtual bool NL3D::CDriverGL::renderTrianglesWithIndexOffset | ( | CMaterial & | , | |
| uint32 | , | |||
| uint32 | , | |||
| uint | ||||
| ) | [inline, virtual] |
Implements NL3D::IDriver.
Definition at line 441 of file driver_opengl.h.
References nlassertex, and UNSUPPORTED_INDEX_OFFSET_MSG.
| void NL3D::CDriverGL::resetLightMapVertexSetup | ( | ) | [private] |
Definition at line 1099 of file driver_opengl_material.cpp.
References _DriverGLStates, _LastVB, _LastVertexSetupIsLightMap, _LightMapUVMap, NL3D::CDriverGLStates::enableColorArray(), H_AUTO_OGL, inlGetNumTextStages(), NL3D::CVertexBuffer::PrimaryColorFlag, setupUVPtr(), and NL3D::CVertexBufferInfo::VertexFormat.
Referenced by setupMaterial().
| void NL3D::CDriverGL::resetTextureShaders | ( | ) | [private] |
Definition at line 1729 of file driver_opengl.cpp.
References _CurrentTexAddrMode, _DriverGLStates, _Extensions, _NVTextureShaderEnabled, NL3D::CDriverGLStates::activeTextureARB(), GL_PREVIOUS_TEXTURE_INPUT_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_SHADER_NV, H_AUTO_OGL, inlGetNumTextStages(), and NL3D::CGlExtensions::NVTextureShader.
| void NL3D::CDriverGL::resetVertexArrayRange | ( | ) | [private] |
Definition at line 1627 of file driver_opengl_vertex.cpp.
References _AGPVertexArrayRange, _CurrentVertexBufferHard, _VertexBufferHardSet, _VRAMVertexArrayRange, NL3D::CPtrSet< T >::clear(), NL3D::IVertexBufferHardGL::disable(), NL3D::IVertexArrayRange::free(), H_AUTO_OGL, NL3D::IVertexBufferHardGL::lock(), and NL3D::IVertexBufferHardGL::unlock().
Referenced by initVertexBufferHard(), and release().
| void NL3D::CDriverGL::retrieveATIDriverVersion | ( | ) | [private] |
Definition at line 3860 of file driver_opengl.cpp.
References _ATIDriverVersion, _ATIFogRangeFixed, NLMISC::fromString(), H_AUTO_OGL, and NLMISC::toLower().
Referenced by init().
Choose the hardware renderer.
Call it before the setDisplay and enumModes methods Choose adapter = 0xffffffff for the default one.
Implements NL3D::IDriver.
Definition at line 4006 of file driver_opengl.cpp.
References H_AUTO_OGL.
| void NL3D::CDriverGL::setAmbientColor | ( | CRGBA | color | ) | [virtual] |
Set ambient.
| color | is the new global ambient color for the scene. |
Implements NL3D::IDriver.
Definition at line 206 of file driver_opengl_light.cpp.
References NLMISC::CRGBA::B, NLMISC::CRGBA::G, H_AUTO_OGL, and NLMISC::CRGBA::R.
| void NL3D::CDriverGL::setBlendConstantColor | ( | NLMISC::CRGBA | col | ) | [virtual] |
see supportBlendConstantColor().
Set the current Blend Constant Color.
Implements NL3D::IDriver.
Definition at line 3089 of file driver_opengl.cpp.
References _CurrentBlendConstantColor, _Extensions, NLMISC::CRGBA::A, NLMISC::CRGBA::B, NL3D::CGlExtensions::EXTBlendColor, NLMISC::CRGBA::G, H_AUTO_OGL, nglBlendColorEXT, and NLMISC::CRGBA::R.
| void NL3D::CDriverGL::setCapture | ( | bool | b | ) | [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
Implements NL3D::IDriver.
Definition at line 2512 of file driver_opengl.cpp.
References dpy, H_AUTO_OGL, and win.
Set the color mask filter through where the operation done will pass.
Implements NL3D::IDriver.
Definition at line 1861 of file driver_opengl.cpp.
References H_AUTO_OGL.
setup several 4 double csts taken from the given tab
Implements NL3D::IDriver.
Definition at line 1732 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, nglProgramEnvParameter4dvARB, nglProgramParameters4dvNV, nglSetInvariantEXT, and NL3D::CGlExtensions::NVVertexProgram.
setup several 4 float csts taken from the given tab
Implements NL3D::IDriver.
Definition at line 1707 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, nglProgramEnvParameter4fvARB, nglProgramParameters4fvNV, nglSetInvariantEXT, and NL3D::CGlExtensions::NVVertexProgram.
| void NL3D::CDriverGL::setConstant | ( | uint | indexStart, | |
| const NLMISC::CVectorD & | value | |||
| ) | [private, virtual] |
Implements NL3D::IDriver.
Definition at line 1685 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, nglProgramEnvParameter4dARB, nglProgramParameter4dNV, nglSetInvariantEXT, NL3D::CGlExtensions::NVVertexProgram, NLMISC::CVectorD::x, NLMISC::CVectorD::y, and NLMISC::CVectorD::z.
| void NL3D::CDriverGL::setConstant | ( | uint | indexStart, | |
| const NLMISC::CVector & | value | |||
| ) | [private, virtual] |
Implements NL3D::IDriver.
Definition at line 1662 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, nglProgramEnvParameter4fARB, nglProgramParameter4fNV, nglSetInvariantEXT, NL3D::CGlExtensions::NVVertexProgram, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.
| void NL3D::CDriverGL::setConstant | ( | uint | index, | |
| double | d0, | |||
| double | d1, | |||
| double | d2, | |||
| double | d3 | |||
| ) | [private, virtual] |
Implements NL3D::IDriver.
Definition at line 1639 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, nglProgramEnvParameter4dARB, nglProgramParameter4dNV, nglSetInvariantEXT, and NL3D::CGlExtensions::NVVertexProgram.
Setup constant values.
Implements NL3D::IDriver.
Definition at line 1616 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, H_AUTO_OGL, nglProgramEnvParameter4fARB, nglProgramParameter4fNV, nglSetInvariantEXT, and NL3D::CGlExtensions::NVVertexProgram.
Referenced by setConstantFog(), and setupFog().
| void NL3D::CDriverGL::setConstantFog | ( | uint | index | ) | [private, 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. |
Implements NL3D::IDriver.
Definition at line 1855 of file driver_opengl_vertex_program.cpp.
References _ModelViewMatrix, NLMISC::CMatrix::get(), H_AUTO_OGL, and setConstant().
| void NL3D::CDriverGL::setConstantMatrix | ( | uint | index, | |
| IDriver::TMatrix | matrix, | |||
| IDriver::TTransform | transform | |||
| ) | [private, 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. |
Implements NL3D::IDriver.
Definition at line 1779 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, _GLProjMat, _ModelViewMatrix, NL3D::CGlExtensions::ARBVertexProgram, NLMISC::CMatrix::get(), GL_IDENTITY_NV, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, GLMatrix, GLTransform, H_AUTO_OGL, NL3D::IDriver::Identity, NL3D::IDriver::Inverse, NL3D::IDriver::InverseTranspose, NLMISC::CMatrix::invert(), NL3D::IDriver::ModelView, NL3D::IDriver::ModelViewProjection, nglProgramEnvParameter4fvARB, nglSetInvariantEXT, nglTrackMatrixNV, NL3D::CGlExtensions::NVVertexProgram, NL3D::IDriver::Projection, refreshProjMatrixFromGL(), refreshRenderSetup(), NLMISC::CMatrix::transpose(), and NL3D::IDriver::Transpose.
| void NL3D::CDriverGL::setCullMode | ( | TCullMode | cullMode | ) | [virtual] |
Set cull mode Useful for mirrors / cube map rendering or when the scene must be rendered upside down.
Implements NL3D::IDriver.
Definition at line 4247 of file driver_opengl.cpp.
References _DriverGLStates, H_AUTO_OGL, and NL3D::CDriverGLStates::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
Implements NL3D::IDriver.
Definition at line 4233 of file driver_opengl.cpp.
References _DriverGLStates, H_AUTO_OGL, and NL3D::CDriverGLStates::setDepthRange().
| bool NL3D::CDriverGL::setDisplay | ( | void * | wnd, | |
| const GfxMode & | mode, | |||
| bool | show, | |||
| bool | resizeable | |||
| ) | throw (EBadDisplay) [virtual] |
Implements NL3D::IDriver.
Definition at line 539 of file driver_opengl.cpp.
References NL3D::CMaterial::CTexEnv::ConstantColor, NLMISC::explode(), GL_CURRENT_VERTEX_EXT, GL_FULL_RANGE_EXT, GL_INVARIANT_EXT, GL_VECTOR_EXT, GLenum(), H_AUTO_OGL, nglBindParameterEXT, nglBindTextureUnitParameterEXT, nglGenSymbolsEXT, NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, nldebug, nlerror, nlinfo, nlwarning, NLMISC::CVector::Null, NL3D::registerGlExtensions(), NLMISC::CRGBA::set(), WGL_ALPHA_BITS_ARB, WGL_BLUE_BITS_ARB, WGL_DEPTH_BITS_ARB, WGL_DRAW_TO_PBUFFER_ARB, WGL_GREEN_BITS_ARB, WGL_PBUFFER_HEIGHT_ARB, WGL_PBUFFER_WIDTH_ARB, WGL_RED_BITS_ARB, and NLMISC::CRGBA::White.
Implements NL3D::IDriver.
Definition at line 3215 of file driver_opengl.cpp.
References _DriverGLStates, _Extensions, NL3D::CDriverGLStates::activeTextureARB(), NL3D::CGlExtensions::ATIEnvMapBumpMap, GL_BUMP_ROT_MATRIX_ATI, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, nglTexBumpParameterfvATI, nlassert, and supportEMBM().
| void NL3D::CDriverGL::setFrustum | ( | float | left, | |
| float | right, | |||
| float | bottom, | |||
| float | top, | |||
| float | znear, | |||
| float | zfar, | |||
| bool | perspective = true | |||
| ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 30 of file driver_opengl_matrix.cpp.
References _OODeltaZ, _ProjMatDirty, and H_AUTO_OGL.
| void NL3D::CDriverGL::setFrustumMatrix | ( | CMatrix & | frust | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 53 of file driver_opengl_matrix.cpp.
References NLMISC::CMatrix::get(), and H_AUTO_OGL.
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. |
Implements NL3D::IDriver.
Definition at line 43 of file driver_opengl_light.cpp.
References _LightMapDynamicLightDirty, _UserLight0, H_AUTO_OGL, and setLightInternal().
Definition at line 59 of file driver_opengl_light.cpp.
References _Extensions, _LightDirty, _LightMode, _LightSetupDirty, _MaxDriverLight, _RenderSetupDirty, _WorldLightDirection, _WorldLightPos, NL3D::CGlExtensions::ATITextureEnvCombine3, NLMISC::CRGBA::B, NL3D::CLight::DirectionalLight, NLMISC::CRGBA::G, NL3D::CLight::getAmbiant(), NL3D::CLight::getConstantAttenuation(), NL3D::CLight::getCutoff(), NL3D::CLight::getDiffuse(), NL3D::CLight::getDirection(), NL3D::CLight::getExponent(), NL3D::CLight::getLinearAttenuation(), NL3D::CLight::getMode(), NL3D::CLight::getPosition(), NL3D::CLight::getQuadraticAttenuation(), NL3D::CLight::getSpecular(), GLenum(), H_AUTO_OGL, NLMISC::Pi, NLMISC::CRGBA::R, and NL3D::CLight::SpotLight.
Referenced by setLight(), and setupLightMapDynamicLighting().
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 |
Implements NL3D::IDriver.
Definition at line 312 of file driver_opengl_light.cpp.
References _LightMapDynamicLight, _LightMapDynamicLightDirty, _LightMapDynamicLightEnabled, and H_AUTO_OGL.
| void NL3D::CDriverGL::setMatrix2DForTextureOffsetAddrMode | ( | const uint | stage, | |
| const float | mat[4] | |||
| ) | [virtual] |
setup the 2D matrix for the OffsetTexture, OffsetTextureScale and OffsetTexture addressing mode It should be stored as the following [a0 a1] [a2 a3]
Implements NL3D::IDriver.
Definition at line 2902 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), GL_OFFSET_TEXTURE_MATRIX_NV, GL_TEXTURE_SHADER_NV, H_AUTO_OGL, inlGetNumTextStages(), nlassert, and supportTextureShaders().
Implements NL3D::IDriver.
Definition at line 1494 of file driver_opengl.cpp.
References _Depth, _FullScreen, _WindowHeight, _WindowWidth, _WindowX, _WindowY, NL3D::GfxMode::Depth, NL3D::GfxMode::Frequency, H_AUTO_OGL, NL3D::GfxMode::Height, showWindow(), NL3D::GfxMode::Width, and NL3D::GfxMode::Windowed.
| bool NL3D::CDriverGL::setMonitorColorProperties | ( | const CMonitorColorProperties & | properties | ) | [virtual] |
Setup monitor color properties.
Return false if setup failed.
Implements NL3D::IDriver.
Definition at line 3136 of file driver_opengl.cpp.
References NL3D::CMonitorColorProperties::Contrast, NL3D::CMonitorColorProperties::Gamma, H_AUTO_OGL, NL3D::CMonitorColorProperties::Luminosity, min, and nlwarning.
x and y must be between 0.0 and 1.0
Implements NL3D::IDriver.
Definition at line 2397 of file driver_opengl.cpp.
References _WindowHeight, _WindowWidth, dpy, H_AUTO_OGL, and win.
| void NL3D::CDriverGL::setPerPixelLightingLight | ( | CRGBA | diffuse, | |
| CRGBA | specular, | |||
| float | shininess | |||
| ) | [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 |
Implements NL3D::IDriver.
Definition at line 2967 of file driver_opengl.cpp.
References _PPLExponent, _PPLightDiffuseColor, _PPLightSpecularColor, and H_AUTO_OGL.
| void NL3D::CDriverGL::setPolygonMode | ( | TPolygonMode | mode | ) | [virtual] |
Set the global polygon mode.
Can be filled, line or point. The implementation driver must call IDriver::setPolygonMode and active this mode.
| polygon | mode choose in this driver. |
Reimplemented from NL3D::IDriver.
Definition at line 2690 of file driver_opengl.cpp.
References NL3D::IDriver::_PolygonMode, NL3D::IDriver::Filled, H_AUTO_OGL, NL3D::IDriver::Line, and NL3D::IDriver::Point.
| bool NL3D::CDriverGL::setRenderTarget | ( | ITexture * | tex, | |
| uint32 | x, | |||
| uint32 | y, | |||
| uint32 | width, | |||
| uint32 | height, | |||
| uint32 | mipmapLevel, | |||
| uint32 | cubeFace | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 1865 of file driver_opengl_texture.cpp.
References _CurrScissor, _CurrViewport, _OldViewport, _RenderTargetFBO, _TextureTarget, _TextureTargetCubeFace, _TextureTargetHeight, _TextureTargetLevel, _TextureTargetUpload, _TextureTargetWidth, _TextureTargetX, _TextureTargetY, activeFrameBufferObject(), copyFrameBufferToTexture(), NL3D::ITexture::getRenderTarget(), getViewport(), getWindowSize(), H_AUTO_OGL, NL3D::CViewport::init(), NL3D::ITexture::isBloomTexture(), nlassertex, setupScissor(), setupViewport(), and supportBloomEffect().
| void NL3D::CDriverGL::setSwapVBLInterval | ( | uint | interval | ) | [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.
Implements NL3D::IDriver.
Definition at line 3664 of file driver_opengl.cpp.
References _Extensions, _Initialized, _Interval, H_AUTO_OGL, and NL3D::CGlExtensions::WGLEXTSwapControl.
Setup texture env functions. Used by setupMaterial.
Definition at line 121 of file driver_opengl_material.cpp.
References _DriverGLStates, NL3D::CMaterial::_TexEnvs, activateTexEnvColor(), activateTexEnvMode(), NL3D::CDriverGLStates::activeTextureARB(), NL3D::CMaterial::getTexCoordGen(), NL3D::CMaterial::getTexCoordGenMode(), NL3D::CMaterial::getTexture(), H_AUTO_OGL, NL3D::ITexture::isTextureCube(), NL3D::CDriverGLStates::setTexGenMode(), NL3D::CMaterial::TexCoordGenEyeSpace, NL3D::CMaterial::TexCoordGenObjectSpace, and NL3D::CMaterial::TexCoordGenReflect.
Referenced by setupMaterial().
| void NL3D::CDriverGL::setTextureShaders | ( | const uint8 * | addressingModes, | |
| const NLMISC::CSmartPtr< ITexture > * | textures | |||
| ) | [private] |
set texture shaders from stage 0 to stage IDRV_MAT_MAXTEXTURES - 1 textures are needed to setup the right kind of shader (cubic or 2d texture)
Definition at line 260 of file driver_opengl_material.cpp.
References _CurrentTexAddrMode, _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), NL3D::convTexAddr(), GL_SHADER_OPERATION_NV, GL_TEXTURE_SHADER_NV, GLenum(), H_AUTO_OGL, and NL3D::IDRV_MAT_MAXTEXTURES.
Referenced by setupMaterial(), and setupWaterPassNV20().
| bool NL3D::CDriverGL::setupARBVertexProgram | ( | const CVPParser::TProgram & | parsedProgram, | |
| GLuint | id, | |||
| bool & | specularWritten | |||
| ) | [private] |
Definition at line 1315 of file driver_opengl_vertex_program.cpp.
References CVPInstruction::ADD, NL3D::ARBVertexProgramDumpInstr(), CVPSwizzle::Comp, CVPInstruction::Dest, GL_PROGRAM_ERROR_POSITION_ARB, GL_PROGRAM_ERROR_STRING_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, GL_VERTEX_PROGRAM_ARB, GLenum(), H_AUTO_OGL, CVPOperand::Indexed, CVPOperand::InputRegister, CVPOperand::InputRegisterValue, CVPOperand::IPosition, CVPOperand::Negate, nglBindProgramARB, nglProgramStringARB, nlassert, nlwarning, CVPInstruction::Opcode, CVPOperand::OSecondaryColor, CVPOperand::OutputRegister, CVPOperand::OutputRegisterValue, CVPInstruction::Src1, CVPInstruction::Src2, CVPOperand::Swizzle, NLMISC::toString(), CVPOperand::Type, CVPOperand::Value, CVPSwizzle::W, CVPOperand::WriteMask, CVPSwizzle::X, CVPSwizzle::Y, and CVPSwizzle::Z.
Referenced by activeARBVertexProgram().
| void NL3D::CDriverGL::setupCloudPass | ( | uint | pass | ) | [private] |
Definition at line 1921 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, activateTexEnvColor(), activateTexture(), NL3D::CDriverGLStates::activeTextureARB(), ATICloudShaderHandle, NL3D::CMaterial::Cloud, NL3D::CMaterial::getShader(), GL_CON_0_ATI, GL_FRAGMENT_SHADER_ATI, H_AUTO_OGL, nglBindFragmentShaderATI, nglSetFragmentShaderConstantATI, nlassert, NL3D::CGlExtensions::NVTextureEnvCombine4, TexEnvSpecialCloudStage0, and TexEnvSpecialCloudStage1.
Referenced by setupPass().
| bool NL3D::CDriverGL::setupEXTVertexShader | ( | const CVPParser::TProgram & | program, | |
| GLuint | id, | |||
| uint | variants[EVSNumVariants], | |||
| uint16 & | usedInputRegisters | |||
| ) | [private] |
Setup a vertex shader from its parsed program.
Don't know why, but on some implementation of EXT_vertex_shader, can't write a single components to the fog coordinate.. So we force the mask to 0xf (only the x coordinate is used anyway).
Definition at line 385 of file driver_opengl_vertex_program.cpp.
References _ATIFogRangeFixed, _EVSColorHandle, _EVSConstantHandle, _EVSNormalHandle, _EVSNumConstant, _EVSPositionHandle, _EVSTexHandle, CVPInstruction::ADD, CVPOperand::AddressRegister, CVPInstruction::ARL, CVPSwizzle::Comp, CVPOperand::Constant, CVPOperand::ConstantValue, NL3D::convInputRegisterToVBFlag(), NL3D::convOutputRegisterToEXTVertexShader(), NL3D::convSwizzleToGLFormat(), NL3D::doSwizzle(), NL3D::doWriteMask(), CVPInstruction::DP3, CVPInstruction::DP4, CVPInstruction::DST, EVS_INFO, EVSFogCoordsVariant, EVSPaletteSkinVariant, EVSSecondaryColorVariant, EVSSkinWeightVariant, CVPInstruction::EXPP, GL_FULL_RANGE_EXT, GL_LOCAL_CONSTANT_EXT, GL_LOCAL_EXT, GL_NORMALIZED_RANGE_EXT, GL_ONE_EXT, GL_OP_ADD_EXT, GL_OP_CLAMP_EXT, GL_OP_DOT3_EXT, GL_OP_DOT4_EXT, GL_OP_EXP_BASE_2_EXT, GL_OP_FLOOR_EXT, GL_OP_FRAC_EXT, GL_OP_INDEX_EXT, GL_OP_LOG_BASE_2_EXT, GL_OP_MADD_EXT, GL_OP_MAX_EXT, GL_OP_MIN_EXT, GL_OP_MOV_EXT, GL_OP_MUL_EXT, GL_OP_NEGATE_EXT, GL_OP_POWER_EXT, GL_OP_RECIP_EXT, GL_OP_RECIP_SQRT_EXT, GL_OP_SET_GE_EXT, GL_OP_SET_LT_EXT, GL_OUTPUT_COLOR0_EXT, GL_OUTPUT_COLOR1_EXT, GL_OUTPUT_FOG_EXT, GL_OUTPUT_TEXTURE_COORD0_EXT, GL_OUTPUT_TEXTURE_COORD7_EXT, GL_SCALAR_EXT, GL_VARIANT_EXT, GL_VECTOR_EXT, GL_VERTEX_SHADER_OPTIMIZED_EXT, GL_W_EXT, GL_X_EXT, GL_Y_EXT, GL_Z_EXT, GL_ZERO_EXT, GLboolean(), GLenum(), GLuint(), H_AUTO_OGL, CVPOperand::IFogCoord, CVPOperand::Indexed, CVPOperand::InputRegister, CVPOperand::InputRegisterValue, CVPOperand::IPaletteSkin, CVPOperand::ISecondaryColor, CVPSwizzle::isIdentity(), CVPParser::isInputUsed(), CVPOperand::IWeight, CVPInstruction::LIT, CVPInstruction::LOG, CVPInstruction::MAD, CVPInstruction::MAX, CVPInstruction::MIN, CVPInstruction::MOV, CVPInstruction::MUL, CVPOperand::Negate, nglBeginVertexShaderEXT, nglBindVertexShaderEXT, nglEndVertexShaderEXT, nglExtractComponentEXT, nglGenSymbolsEXT, nglInsertComponentEXT, nglSetLocalConstantEXT, nglShaderOp1EXT, nglShaderOp2EXT, nglShaderOp3EXT, nlassert, nlinfo, nlstop, nlwarning, CVPOperand::OFogCoord, CVPOperand::OHPosition, CVPOperand::OPrimaryColor, CVPOperand::OSecondaryColor, CVPOperand::OutputRegister, CVPOperand::OutputRegisterValue, CVPInstruction::RCP, CVPInstruction::RSQ, CVPInstruction::SGE, CVPInstruction::SLT, CVPOperand::Swizzle, NLMISC::toString(), CVPOperand::Type, CVPOperand::Value, CVPOperand::Variable, and CVPOperand::VariableValue.
Referenced by activeEXTVertexShader().
setup fog parameters. fog must enabled to see result. start and end are in [0,1] range.
Special : with vertex program, using the extension EXT_vertex_shader, fog is emulated using 1 more constant to scale result to [0, 1]
Implements NL3D::IDriver.
Definition at line 2726 of file driver_opengl.cpp.
References _ATIFogRangeFixed, _CurrentFogColor, _EVSNumConstant, _Extensions, _FogEnd, _FogStart, NLMISC::CRGBA::A, NL3D::CGlExtensions::ARBVertexProgram, NLMISC::CRGBA::B, NL3D::CGlExtensions::EXTVertexShader, NLMISC::CRGBA::G, H_AUTO_OGL, NL3D::CGlExtensions::NVVertexProgram, NLMISC::CRGBA::R, and setConstant().
| void NL3D::CDriverGL::setupGlArrays | ( | CVertexBufferInfo & | vb | ) | [private] |
setup GL arrays, with a vb info.
Definition at line 1525 of file driver_opengl_vertex.cpp.
References _Extensions, NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, H_AUTO_OGL, isVertexProgramEnabled(), NL3D::CGlExtensions::NVVertexProgram, setupGlArraysForARBVertexProgram(), setupGlArraysForEXTVertexShader(), setupGlArraysForNVVertexProgram(), setupGlArraysStd(), toggleGlArraysForARBVertexProgram(), toggleGlArraysForEXTVertexShader(), and toggleGlArraysForNVVertexProgram().
Referenced by activeVertexBuffer().
| void NL3D::CDriverGL::setupGlArraysForARBVertexProgram | ( | CVertexBufferInfo & | vb | ) | [private] |
Definition at line 1258 of file driver_opengl_vertex.cpp.
References _DriverGLStates, NL3D::ARBVertexProgramMustNormalizeAttrib, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::CDriverGLStates::enableVertexAttribArrayARB(), GLboolean(), GLType, GLTypeIsIntegral, GLVertexAttribIndex, H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::CVertexBufferInfo::HwATI, nglVertexAttribArrayObjectATI, nglVertexAttribPointerARB, nlctassert, NumCoordinatesType, NL3D::CVertexBuffer::NumValue, NL3D::CVertexBufferInfo::Type, NL3D::CVertexBufferInfo::ValuePtr, NL3D::CVertexBufferInfo::VBMode, NL3D::CVertexBufferInfo::VertexFormat, NL3D::CVertexBufferInfo::VertexObjectId, and NL3D::CVertexBufferInfo::VertexSize.
Referenced by setupGlArrays().
| void NL3D::CDriverGL::setupGlArraysForEXTVertexShader | ( | CVertexBufferInfo & | vb | ) | [private] |
Definition at line 1339 of file driver_opengl_vertex.cpp.
References _DriverGLStates, NL3D::CVertexProgram::_DrvInfo, _LastSetuppedVP, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::CDriverGLStates::clientActiveTextureARB(), NL3D::CVertexBuffer::Empty, NL3D::CDriverGLStates::enableVertexAttribArrayForEXTVertexShader(), EVSFogCoordsVariant, EVSPaletteSkinVariant, EVSSecondaryColorVariant, EVSSkinWeightVariant, NL3D::CVertexBuffer::Fog, GLType, GLVertexAttribIndex, H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::CVertexBufferInfo::HwATI, nglArrayObjectATI, nglVariantArrayObjectATI, nglVariantPointerEXT, nlassert, nlstop, NL3D::CVertexBuffer::Normal, NumCoordinatesType, NL3D::CVertexBuffer::NumValue, NL3D::CVertexBuffer::PaletteSkin, NL3D::CVertexBuffer::Position, NL3D::CVertexBuffer::PrimaryColor, NLMISC::safe_cast(), NL3D::CVertexBuffer::SecondaryColor, NL3D::CVertexBuffer::TexCoord0, NL3D::CVertexBuffer::TexCoord1, NL3D::CVertexBuffer::TexCoord2, NL3D::CVertexBuffer::TexCoord3, NL3D::CVertexBuffer::TexCoord4, NL3D::CVertexBuffer::TexCoord5, NL3D::CVertexBuffer::TexCoord6, NL3D::CVertexBuffer::TexCoord7, NL3D::CVertexBufferInfo::Type, NL3D::CVertexProgamDrvInfosGL::UsedVertexComponents, NL3D::CVertexBufferInfo::ValuePtr, NL3D::CVertexProgamDrvInfosGL::Variants, NL3D::CVertexBufferInfo::VBMode, NL3D::CVertexBufferInfo::VertexFormat, NL3D::CVertexBufferInfo::VertexObjectId, NL3D::CVertexBufferInfo::VertexSize, and NL3D::CVertexBuffer::Weight.
Referenced by setupGlArrays().
| void NL3D::CDriverGL::setupGlArraysForNVVertexProgram | ( | CVertexBufferInfo & | vb | ) | [private] |
Definition at line 1147 of file driver_opengl_vertex.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::CDriverGLStates::enableColorArray(), NL3D::CDriverGLStates::enableSecondaryColorArray(), NL3D::CDriverGLStates::enableVertexAttribArray(), GLType, GLVertexAttribIndex, H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, nglSecondaryColorPointerEXT, nglVertexAttribPointerNV, NumCoordinatesType, NL3D::CVertexBuffer::NumValue, NL3D::CVertexBufferInfo::Type, NL3D::CVertexBuffer::UChar4, NL3D::CVertexBufferInfo::ValuePtr, NL3D::CVertexBufferInfo::VBMode, NL3D::CVertexBufferInfo::VertexFormat, NL3D::CVertexBufferInfo::VertexObjectId, and NL3D::CVertexBufferInfo::VertexSize.
Referenced by setupGlArrays().
| void NL3D::CDriverGL::setupGlArraysStd | ( | CVertexBufferInfo & | vb | ) | [private] |
Tools fct used by setupGLArrays.
Definition at line 878 of file driver_opengl_vertex.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::CDriverGLStates::enableColorArray(), NL3D::CDriverGLStates::enableNormalArray(), NL3D::CDriverGLStates::enableVertexArray(), NL3D::CVertexBuffer::Float3, H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::CVertexBufferInfo::HwATI, NL3D::CVertexBufferInfo::HwNVIDIA, inlGetNumTextStages(), nglArrayObjectATI, nlassert, NL3D::CVertexBuffer::Normal, NL3D::CVertexBuffer::NormalFlag, NL3D::CVertexBuffer::NumComponentsType, NL3D::CVertexBuffer::Position, NL3D::CVertexBuffer::PrimaryColor, NL3D::CVertexBuffer::PrimaryColorFlag, setupUVPtr(), NL3D::CVertexBufferInfo::SysMem, NL3D::CVertexBufferInfo::Type, NL3D::CVertexBuffer::UChar4, NL3D::CVertexBufferInfo::UVRouting, NL3D::CVertexBufferInfo::ValuePtr, NL3D::CVertexBufferInfo::VBMode, NL3D::CVertexBufferInfo::VertexFormat, NL3D::CVertexBufferInfo::VertexObjectId, and NL3D::CVertexBufferInfo::VertexSize.
Referenced by setupGlArrays().
| void NL3D::CDriverGL::setupLightMapDynamicLighting | ( | bool | enable | ) | [private] |
Definition at line 323 of file driver_opengl_light.cpp.
References _LightMapDynamicLight, _LightMapDynamicLightDirty, _LightMapDynamicLightEnabled, _MaxDriverLight, _UserLight0, _UserLightEnable, enableLightInternal(), H_AUTO_OGL, refreshRenderSetup(), and setLightInternal().
Referenced by beginLightMapMultiPass(), and setupMaterial().
| void NL3D::CDriverGL::setupLightMapPass | ( | uint | pass | ) | [private] |
Definition at line 741 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, _FogEnabled, _LastVB, _LastVertexSetupIsLightMap, _LightMapLastStageEnv, _LightMapLUT, _LightMapNoMulAddFallBack, NL3D::CMaterial::_LightMaps, NL3D::CMaterial::_LightMapsMulx2, _LightMapUVMap, _NLightMapPass, _NLightMapPerPass, _NLightMaps, NLMISC::CRGBA::A, activateTexEnvColor(), activateTexEnvMode(), activateTexture(), NL3D::CDriverGLStates::activeTextureARB(), NLMISC::CRGBA::addRGBOnly(), NL3D::CGlExtensions::ATITextureEnvCombine3, NLMISC::CRGBA::B, NL3D::CDriverGLStates::blendFunc(), NL3D::CMaterial::CTexEnv::ConstantColor, NL3D::convColor(), NL3D::CDriverGLStates::enableBlend(), NLMISC::CRGBA::G, NL3D::CMaterial::getBlend(), NLMISC::CRGBA::getPacked(), NL3D::CMaterial::getTexture(), GL_MODULATE_ADD_ATI, H_AUTO_OGL, inlGetNumTextStages(), min, nlassert, NL3D::CGlExtensions::NVTextureEnvCombine4, NLMISC::CRGBA::R, NL3D::CDriverGLStates::setDiffuse(), NL3D::CDriverGLStates::setEmissive(), NL3D::CDriverGLStates::setTexGenMode(), setupUVPtr(), and TexEnvSpecialLightMap.
Referenced by setupPass().
For objects with caustics, setup the first texture (which actually is the one from the material).
Implements NL3D::IDriver.
Definition at line 282 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentMaterialSupportedShader, _DriverGLStates, _Extensions, _FogEnabled, _LastVertexSetupIsLightMap, NL3D::CMaterial::_LightMaps, NL3D::CMaterial::_MatDrvInfo, NL3D::IDriver::_MatDrvInfos, _MaterialAllTextureTouchedFlag, _NbSetupMaterialCall, _OODeltaZ, NL3D::CMaterial::_TexAddrMode, NL3D::CMaterial::_Textures, NLMISC::CRGBA::A, activateTexture(), NL3D::CDriverGLStates::alphaFunc(), NL3D::CShaderGL::Ambient, NLMISC::CRGBA::B, NLMISC::blend(), NL3D::CDriverGLStates::blendFunc(), NL3D::CMaterial::clearTouched(), NL3D::CMaterial::Cloud, NL3D::convBlend(), NL3D::convColor(), NL3D::convZFunction(), NL3D::CDriverGLStates::depthFunc(), NL3D::CShaderGL::Diffuse, disableUserTextureMatrix(), NL3D::CShaderGL::DstBlend, NL3D::CShaderGL::Emissive, NL3D::CDriverGLStates::enableAlphaTest(), NL3D::CDriverGLStates::enableBlend(), NL3D::CDriverGLStates::enableCullFace(), NL3D::CDriverGLStates::enableFog(), NL3D::CDriverGLStates::enableLighting(), enableNVTextureShader(), NL3D::CDriverGLStates::enableZWrite(), NLMISC::CRGBA::G, NL3D::CMaterial::getAlphaTestThreshold(), NL3D::CMaterial::getAmbient(), NL3D::CMaterial::getColor(), NL3D::CMaterial::getDiffuse(), NL3D::CMaterial::getDstBlend(), NL3D::CMaterial::getEmissive(), NL3D::CMaterial::getFlags(), NLMISC::CRGBA::getPacked(), NL3D::CMaterial::getShader(), NL3D::CMaterial::getShininess(), NL3D::CMaterial::getSpecular(), NL3D::CMaterial::getSrcBlend(), getSupportedShader(), NL3D::CMaterial::getTexture(), NL3D::CMaterial::getTouched(), NL3D::CMaterial::getZBias(), NL3D::CMaterial::getZFunc(), GLenum(), H_AUTO_OGL, NL3D::IDRV_MAT_ALPHA_TEST, NL3D::IDRV_MAT_BLEND, NL3D::IDRV_MAT_DOUBLE_SIDED, NL3D::IDRV_MAT_LIGHTING, NL3D::IDRV_MAT_TEX_ADDR, NL3D::IDRV_MAT_ZWRITE, NL3D::IDRV_TOUCHED_ALL, NL3D::IDRV_TOUCHED_BLENDFUNC, NL3D::IDRV_TOUCHED_LIGHTING, NL3D::IDRV_TOUCHED_SHADER, NL3D::IDRV_TOUCHED_ZFUNC, inlGetNumTextStages(), NL3D::CMaterial::isLightedVertexColor(), NL3D::CMaterial::LightMap, NL3D::CMaterial::Normal, NL3D::CGlExtensions::NVTextureShader, NL3D::CShaderGL::PackedAmbient, NL3D::CShaderGL::PackedDiffuse, NL3D::CShaderGL::PackedEmissive, NL3D::CShaderGL::PackedSpecular, NL3D::CMaterial::PerPixelLighting, NLMISC::CRGBA::R, resetLightMapVertexSetup(), NL3D::CDriverGLStates::setAmbient(), NL3D::CDriverGLStates::setDiffuse(), NL3D::CDriverGLStates::setEmissive(), NL3D::CDriverGLStates::setShininess(), NL3D::CDriverGLStates::setSpecular(), setTextureEnvFunction(), setTextureShaders(), setupLightMapDynamicLighting(), setupTexture(), setupUserTextureMatrix(), NL3D::CDriverGLStates::setVertexColorLighted(), NL3D::CDriverGLStates::setZBias(), NL3D::CMaterial::Specular, NL3D::CShaderGL::Specular, NL3D::CShaderGL::SrcBlend, NL3D::CShaderGL::SupportedShader, NL3D::CMaterial::Water, and NL3D::CShaderGL::ZComp.
Referenced by renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), and renderTriangles().
| virtual void NL3D::CDriverGL::setupMaterialPass | ( | uint | pass | ) | [inline, virtual] |
active the ith pass of this material.
Implements NL3D::IDriver.
Definition at line 619 of file driver_opengl.h.
References setupPass().
| void NL3D::CDriverGL::setupModelMatrix | ( | const CMatrix & | mtx | ) | [virtual] |
setup the model matrix.
NB: you must setupModelMatrix() AFTER setupViewMatrix(), or else undefined results.
Implements NL3D::IDriver.
Definition at line 156 of file driver_opengl_matrix.cpp.
References _ModelViewMatrix, _ModelViewMatrixDirty, _NbSetupModelMatrixCall, _PZBCameraPos, _RenderSetupDirty, _ViewMtx, NLMISC::CMatrix::getPos(), H_AUTO_OGL, and NLMISC::CMatrix::setPos().
| void NL3D::CDriverGL::setupPass | ( | uint | pass | ) | [private] |
active the ith pass of this material.
Definition at line 601 of file driver_opengl_material.cpp.
References _CurrentMaterialSupportedShader, NL3D::CMaterial::Cloud, H_AUTO_OGL, NL3D::CMaterial::LightMap, NL3D::CMaterial::PerPixelLighting, NL3D::CMaterial::PerPixelLightingNoSpec, setupCloudPass(), setupLightMapPass(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularPass(), setupWaterPass(), NL3D::CMaterial::Specular, and NL3D::CMaterial::Water.
Referenced by renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), renderTriangles(), and setupMaterialPass().
| void NL3D::CDriverGL::setupPPLNoSpecPass | ( | uint | pass | ) | [private] |
Definition at line 1744 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, _PPLightDiffuseColor, activateTexEnvColor(), activateTexEnvMode(), activateTexture(), NL3D::CDriverGLStates::activeTextureARB(), NL3D::CMaterial::Diffuse, NL3D::CMaterial::CTexEnv::Env, getSpecularCubeMap(), NL3D::CMaterial::getTexture(), GL_MODULATE_ADD_ATI, H_AUTO_OGL, inlGetNumTextStages(), nlassert, NL3D::CGlExtensions::NVTextureEnvCombine4, setupTexture(), and TexEnvSpecialPPLStage0.
Referenced by setupPass().
| void NL3D::CDriverGL::setupPPLPass | ( | uint | pass | ) | [private] |
Definition at line 1548 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, _PPLightDiffuseColor, _PPLightSpecularColor, activateTexEnvColor(), activateTexEnvMode(), activateTexture(), NL3D::CDriverGLStates::activeTextureARB(), NL3D::CMaterial::Diffuse, NL3D::CMaterial::CTexEnv::Env, NL3D::CMaterial::getShininess(), getSpecularCubeMap(), NL3D::CMaterial::getTexture(), GL_MODULATE_ADD_ATI, H_AUTO_OGL, inlGetNumTextStages(), nlassert, NL3D::CGlExtensions::NVTextureEnvCombine4, setupTexture(), TexEnvSpecialPPLStage0, and TexEnvSpecialPPLStage2.
Referenced by setupPass().
| void NL3D::CDriverGL::setupScissor | ( | const class CScissor & | scissor | ) | [virtual] |
Set the current Scissor.
| scissor | is a scissor to setup the current Scissor, in Window relative coordinate (0,1). |
Implements NL3D::IDriver.
Definition at line 2270 of file driver_opengl.cpp.
References _CurrScissor, _TextureTarget, _WindowHeight, _WindowWidth, NLMISC::clamp(), dpy, H_AUTO_OGL, NL3D::CScissor::Height, NL3D::CScissor::Width, win, NL3D::CScissor::X, and NL3D::CScissor::Y.
Referenced by setRenderTarget().
| void NL3D::CDriverGL::setupSpecularBegin | ( | ) | [private] |
Definition at line 1139 of file driver_opengl_material.cpp.
References _DriverGLStates, _SpecularTexMtx, activateTexEnvMode(), activateTexture(), NL3D::CDriverGLStates::activeTextureARB(), NL3D::CMaterial::CTexEnv::Env, NLMISC::CMatrix::get(), H_AUTO_OGL, inlGetNumTextStages(), NL3D::CMaterial::Replace, and NL3D::CDriverGLStates::setTexGenMode().
Referenced by beginSpecularMultiPass(), and startSpecularBatch().
| void NL3D::CDriverGL::setupSpecularEnd | ( | ) | [private] |
Definition at line 1179 of file driver_opengl_material.cpp.
References _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), H_AUTO_OGL, and NL3D::CDriverGLStates::setTexGenMode().
Referenced by endSpecularBatch(), and endSpecularMultiPass().
| void NL3D::CDriverGL::setupSpecularPass | ( | uint | pass | ) | [private] |
Support NVidia combine 4 extension to do specular map in a single pass
Definition at line 1228 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, activateTexEnvMode(), NL3D::CDriverGLStates::activeTextureARB(), NL3D::CGlExtensions::ATITextureEnvCombine3, NL3D::CDriverGLStates::blendFunc(), NL3D::CDriverGLStates::enableBlend(), NL3D::CMaterial::CTexEnv::Env, NL3D::CMaterial::getTexture(), GL_MODULATE_ADD_ATI, H_AUTO_OGL, NL3D::CMaterial::Modulate, NL3D::CGlExtensions::NVTextureEnvCombine4, NL3D::CMaterial::Previous, NL3D::CMaterial::Replace, NL3D::CDriverGLStates::setTextureMode(), NL3D::CMaterial::SrcAlpha, NL3D::CMaterial::SrcColor, TexEnvSpecialSpecularStage1, TexEnvSpecialSpecularStage1NoText, NL3D::CMaterial::Texture, and NL3D::CDriverGLStates::TextureDisabled.
Referenced by setupPass().
setup a texture, generate and upload if needed.
same as setupTextureEx(tex, true, dummy);
Implements NL3D::IDriver.
Definition at line 518 of file driver_opengl_texture.cpp.
References H_AUTO_OGL, and setupTextureEx().
Referenced by copyFrameBufferToTexture(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupWaterPassARB(), setupWaterPassNV20(), setupWaterPassR200(), and swapTextureHandle().
| void NL3D::CDriverGL::setupTextureBasicParameters | ( | ITexture & | tex | ) | [inline, private] |
Force to set clamp & wrap mode for the given texture Setup is done for texture currently bind to the gl, so calling bindTextureWithMode is necessary.
Definition at line 559 of file driver_opengl_texture.cpp.
References _Extensions, NL3D::ITexture::Clamp, NL3D::ITexture::clearFilterOrWrapModeTouched(), NL3D::ITexture::getMagFilter(), NL3D::ITexture::getMinFilter(), NL3D::getTextureGl(), NL3D::ITexture::getWrapS(), NL3D::ITexture::getWrapT(), NL3D::ITexture::isTextureCube(), NL3D::CTextureDrvInfosGL::MagFilter, NL3D::CTextureDrvInfosGL::MinFilter, NL3D::CTextureDrvInfosGL::TextureMode, NL3D::translateMagFilterToGl(), NL3D::translateMinFilterToGl(), NL3D::translateWrapToGl(), NL3D::CTextureDrvInfosGL::WrapS, and NL3D::CTextureDrvInfosGL::WrapT.
Referenced by setupTextureEx().
| bool NL3D::CDriverGL::setupTextureEx | ( | ITexture & | tex, | |
| bool | bUpload, | |||
| bool & | bAllUploaded, | |||
| bool | bMustRecreateSharedTexture = false | |||
| ) | [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. |
Implements NL3D::IDriver.
Definition at line 589 of file driver_opengl_texture.cpp.
References _AllocatedTextureMemory, _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _ForceTextureResizePower, NL3D::ITexture::_ListInvalidRect, NL3D::IDriver::_SyncTexDrvInfos, NL3D::IDriver::_TexDrvShares, activateTexture(), NL3D::ITexture::allowDegradation(), NL3D::CGlExtensions::ARBTextureCubeMap, bindTextureWithMode(), NLMISC::CBitmap::buildMipMaps(), NLMISC::clamp(), NL3D::ITexture::clearTouched(), NL3D::CTextureDrvInfosGL::Compressed, computeMipMapMemoryUsage(), NLMISC::CBitmap::convertToType(), CTextureDrvInfosGL, NL3D::IDriver::CTextureDrvShare, NL3D::CGlExtensions::EXTTextureCompressionS3TC, NL3D::ITexture::filterOrWrapModeTouched(), NLMISC::CBitmap::flipH(), NLMISC::CBitmap::flipV(), NL3D::ITexture::generate(), NL3D::getGlSrcTextureComponentType(), NL3D::getGlSrcTextureFormat(), getGlTextureFormat(), NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getMipMapCount(), NLMISC::CBitmap::getPixelFormat(), NLMISC::CBitmap::getPixels(), NLMISC::CObjectVector< T, EnableObjectBehavior >::getPtr(), NL3D::ITexture::getReleasable(), NLMISC::CBitmap::getSize(), NL3D::CTextureCube::getTexture(), NL3D::getTextureGl(), NL3D::IDriver::getTextureShareName(), NLMISC::CBitmap::getWidth(), GLenum(), H_AUTO_OGL, NLMISC::CRect::Height, inlGetNumTextStages(), NL3D::ITexture::isAllInvalidated(), NL3D::ITexture::isTextureCube(), isTextureRectangle(), min, NL3D::CTextureDrvInfosGL::MipMap, NL3D::ITexture::mipMapOn(), NL3D::CTextureCube::negative_x, NL3D::CTextureCube::negative_y, NL3D::CTextureCube::negative_z, NEL_MEASURE_UPLOAD_TIME_END, NEL_MEASURE_UPLOAD_TIME_START, nglCompressedTexImage2DARB, NLCubeFaceToGLCubeFace, NL3D::CTextureCube::positive_x, NL3D::CTextureCube::positive_y, NL3D::CTextureCube::positive_z, NL3D::ITexture::release(), NLMISC::CBitmap::releaseMipMaps(), NLMISC::CBitmap::resample(), NLMISC::CBitmap::RGBA, NLMISC::safe_cast(), NL3D::sameDXTCFormat(), NL3D::CDriverGLStates::setTextureMode(), setupTextureBasicParameters(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), NL3D::ITexture::supportSharing(), NL3D::CDriverGLStates::TextureDisabled, NL3D::ITexture::TextureDrvShare, NL3D::CTextureDrvInfosGL::TextureMemory, NL3D::CTextureDrvInfosGL::TextureMode, NL3D::ITexture::touched(), NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.
Referenced by setupTexture().
setup the texture matrix for a given number of stages (starting from 0)
check if matrix disabled
Definition at line 165 of file driver_opengl_material.cpp.
References _DriverGLStates, _UserTexMatEnabled, NL3D::CDriverGLStates::activeTextureARB(), NLMISC::CMatrix::get(), NL3D::CMaterial::getFlags(), NL3D::CMaterial::getUserTexMat(), H_AUTO_OGL, NL3D::IDRV_MAT_USER_TEX_FIRST_BIT, and NL3D::IDRV_MAT_USER_TEX_MAT_ALL.
Referenced by setupMaterial().
| void NL3D::CDriverGL::setupUVPtr | ( | uint | stage, | |
| CVertexBufferInfo & | VB, | |||
| uint | uvId | |||
| ) | [private] |
setup a texture stage with an UV from VB.
Definition at line 654 of file driver_opengl_vertex.cpp.
References _DriverGLStates, _LastSetupGLArrayVertexProgram, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::CDriverGLStates::clientActiveTextureARB(), NL3D::CDriverGLStates::enableTexCoordArray(), NL3D::CVertexBuffer::Float2, NL3D::CVertexBuffer::Float3, H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::CVertexBufferInfo::HwATI, NL3D::CVertexBufferInfo::HwNVIDIA, nglArrayObjectATI, nlassert, NL3D::CVertexBufferInfo::SysMem, NL3D::CVertexBuffer::TexCoord0, NL3D::CVertexBuffer::TexCoord0Flag, NL3D::CVertexBufferInfo::Type, NL3D::CVertexBufferInfo::ValuePtr, NL3D::CVertexBufferInfo::VBMode, NL3D::CVertexBufferInfo::VertexFormat, NL3D::CVertexBufferInfo::VertexObjectId, and NL3D::CVertexBufferInfo::VertexSize.
Referenced by mapTextureStageToUV(), resetLightMapVertexSetup(), setupGlArraysStd(), and setupLightMapPass().
| bool NL3D::CDriverGL::setupVertexBuffer | ( | CVertexBuffer & | VB | ) | [private] |
Definition at line 132 of file driver_opengl_vertex.cpp.
References _Extensions, NL3D::CVBDrvInfosGL::_SystemMemory, NL3D::IDriver::_VBDrvInfos, NL3D::CVBDrvInfosGL::_VBHard, NL3D::CVertexBuffer::AGPVolatile, NL3D::CVertexBuffer::capacity(), createVertexBufferHard(), CVBDrvInfosGL, NL3D::CGlExtensions::DisableHardwareVertexArrayAGP, NL3D::CVertexBuffer::DrvInfos, NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getPreferredMemory(), NL3D::CVertexBuffer::getTouchFlags(), NL3D::CVertexBuffer::getVertexSize(), H_AUTO_OGL, nlassert, NL3D::CVertexBuffer::RAMPreferred, NL3D::CVertexBuffer::RAMVolatile, NL3D::CVertexBuffer::setLocation(), NL3D::CVertexBuffer::TouchedReserve, and NL3D::CVertexBuffer::TouchedVertexFormat.
Referenced by activeVertexBuffer().
| void NL3D::CDriverGL::setupViewMatrix | ( | const CMatrix & | mtx | ) | [virtual] |
setup the view matrix (inverse of camera matrix).
NB: you must setupViewMatrix() BEFORE setupModelMatrix(), or else undefined results.
Implements NL3D::IDriver.
Definition at line 116 of file driver_opengl_matrix.cpp.
References _LightDirty, _LightSetupDirty, _ModelViewMatrixDirty, _PZBCameraPos, _RenderSetupDirty, _SpecularTexMtx, _UserViewMtx, _ViewMtx, H_AUTO_OGL, I, NLMISC::CMatrix::identity(), NLMISC::CMatrix::invert(), MaxLight, NLMISC::CVector::Null, NLMISC::CMatrix::setPos(), and NLMISC::CMatrix::setRot().
| void NL3D::CDriverGL::setupViewMatrixEx | ( | const CMatrix & | mtx, | |
| const CVector & | cameraPos | |||
| ) | [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 ). |
Implements NL3D::IDriver.
Definition at line 82 of file driver_opengl_matrix.cpp.
References _LightDirty, _LightSetupDirty, _ModelViewMatrixDirty, _PZBCameraPos, _RenderSetupDirty, _SpecularTexMtx, _UserViewMtx, _ViewMtx, H_AUTO_OGL, I, NLMISC::CMatrix::identity(), NLMISC::CMatrix::invert(), MaxLight, NLMISC::CVector::Null, NLMISC::CMatrix::setPos(), and NLMISC::CMatrix::setRot().
| void NL3D::CDriverGL::setupViewport | ( | const class CViewport & | viewport | ) | [virtual] |
Set the current viewport.
| viewport | is a viewport to setup as current viewport. |
Implements NL3D::IDriver.
Definition at line 2198 of file driver_opengl.cpp.
References _CurrViewport, _TextureTarget, _WindowHeight, _WindowWidth, NLMISC::clamp(), dpy, NL3D::CViewport::getValues(), H_AUTO_OGL, and win.
Referenced by setRenderTarget().
| void NL3D::CDriverGL::setupWaterPass | ( | uint | pass | ) | [private] |
Definition at line 2370 of file driver_opengl_material.cpp.
References _CurrentMaterial, _Extensions, ARBWaterShader, ATIWaterShaderHandleNoDiffuseMap, NL3D::CMaterial::getShader(), H_AUTO_OGL, nlassert, NL3D::CGlExtensions::NVTextureShader, setupWaterPassARB(), setupWaterPassNV20(), setupWaterPassR200(), and NL3D::CMaterial::Water.
Referenced by setupPass().
| void NL3D::CDriverGL::setupWaterPassARB | ( | const CMaterial & | mat | ) | [private] |
water setup for ARB_fragment_program
Unfortunately, the EXT_vertex_shader extension has to output the fog values in the [0, 1] range to work with the standard pipeline. So we must add a special path for this case, where the fog coordinate is 'unscaled' again. NB : this is fixed in later drivers (from 6.14.10.6343), so check this
Definition at line 2161 of file driver_opengl_material.cpp.
References _ATIFogRangeFixed, _Extensions, _FogEnabled, _FogEnd, _FogStart, activateTexture(), ARBWaterShader, NL3D::CGlExtensions::EXTVertexShader, NL3D::CMaterial::getTexture(), GL_FRAGMENT_PROGRAM_ARB, H_AUTO_OGL, inlGetNumTextStages(), NL3D::ITexture::isBumpMap(), nglBindProgramARB, nglProgramEnvParameter4fARB, NL3D::ITexture::RGBA8888, NLMISC::safe_cast(), NL3D::ITexture::setUploadFormat(), and setupTexture().
Referenced by setupWaterPass().
| void NL3D::CDriverGL::setupWaterPassNV20 | ( | const CMaterial & | mat | ) | [private] |
Definition at line 2271 of file driver_opengl_material.cpp.
References _DriverGLStates, NL3D::CMaterial::_Textures, activateTexEnvMode(), activateTexture(), NL3D::CDriverGLStates::activeTextureARB(), enableNVTextureShader(), NL3D::CMaterial::CTexEnv::Env, NL3D::CTextureBump::getNormalizationFactor(), NL3D::CMaterial::getTexture(), GL_OFFSET_TEXTURE_MATRIX_NV, GL_TEXTURE_SHADER_NV, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, inlGetNumTextStages(), NL3D::ITexture::isBumpMap(), nlctassert, NL3D::CMaterial::Replace, setTextureShaders(), and setupTexture().
Referenced by setupWaterPass().
| void NL3D::CDriverGL::setupWaterPassR200 | ( | const CMaterial & | mat | ) | [private] |
water setup for ATI
Definition at line 2081 of file driver_opengl_material.cpp.
References activateTexture(), ATIWaterShaderHandle, ATIWaterShaderHandleNoDiffuseMap, NL3D::CMaterial::getTexture(), GL_CON_0_ATI, GL_CON_1_ATI, GL_FRAGMENT_SHADER_ATI, H_AUTO_OGL, inlGetNumTextStages(), NL3D::ITexture::isBumpMap(), nglBindFragmentShaderATI, nglSetFragmentShaderConstantATI, NLMISC::safe_cast(), and setupTexture().
Referenced by setupWaterPass().
Set the position of the NeL window.
Implements NL3D::IDriver.
Definition at line 1704 of file driver_opengl.cpp.
| void NL3D::CDriverGL::setWindowTitle | ( | const ucstring & | title | ) | [virtual] |
Set the title of the NeL window.
Implements NL3D::IDriver.
Definition at line 1691 of file driver_opengl.cpp.
References ucstring::c_str(), dpy, ucstring::toUtf8(), and win.
| void NL3D::CDriverGL::showCursor | ( | bool | b | ) | [virtual] |
show cursor if b is true, or hide it if b is false
Implements NL3D::IDriver.
Definition at line 2352 of file driver_opengl.cpp.
References cursor, dpy, H_AUTO_OGL, and win.
| void NL3D::CDriverGL::showWindow | ( | bool | show | ) | [virtual] |
Show or hide the NeL window.
Implements NL3D::IDriver.
Definition at line 1716 of file driver_opengl.cpp.
Referenced by setMode().
| bool NL3D::CDriverGL::slowUnlockVertexBufferHard | ( | ) | const [virtual] |
return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL).
Implements NL3D::IDriver.
Definition at line 734 of file driver_opengl_vertex.cpp.
References _SlowUnlockVBHard, and H_AUTO_OGL.
| void NL3D::CDriverGL::startBench | ( | bool | wantStandardDeviation = false, |
|
| bool | quick = false, |
|||
| bool | reset = true | |||
| ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4033 of file driver_opengl.cpp.
| void NL3D::CDriverGL::startProfileIBLock | ( | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 3795 of file driver_opengl.cpp.
| void NL3D::CDriverGL::startProfileVBHardLock | ( | ) | [virtual] |
If the driver support it, enable profile VBHard locks.
No-Op if already profiling
Implements NL3D::IDriver.
Definition at line 3715 of file driver_opengl.cpp.
References _CurVBHardLockCount, _NumVBHardProfileFrame, _VBHardProfiles, and _VBHardProfiling.
| void NL3D::CDriverGL::startSpecularBatch | ( | ) | [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().
Implements NL3D::IDriver.
Definition at line 1121 of file driver_opengl_material.cpp.
References _SpecularBatchOn, H_AUTO_OGL, and setupSpecularBegin().
| void NL3D::CDriverGL::stencilFunc | ( | TStencilFunc | stencilFunc, | |
| int | ref, | |||
| uint | mask | |||
| ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4275 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::IDriver::always, NL3D::IDriver::equal, GLenum(), GLuint(), NL3D::IDriver::greater, NL3D::IDriver::greaterequal, H_AUTO_OGL, NL3D::IDriver::less, NL3D::IDriver::lessequal, NL3D::IDriver::never, nlstop, NL3D::IDriver::notequal, and NL3D::CDriverGLStates::stencilFunc().
| void NL3D::CDriverGL::stencilMask | ( | uint | mask | ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4343 of file driver_opengl.cpp.
References _DriverGLStates, GLuint(), H_AUTO_OGL, and NL3D::CDriverGLStates::stencilMask().
| void NL3D::CDriverGL::stencilOp | ( | TStencilOp | fail, | |
| TStencilOp | zfail, | |||
| TStencilOp | zpass | |||
| ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 4298 of file driver_opengl.cpp.
References _DriverGLStates, NL3D::IDriver::decr, GLenum(), H_AUTO_OGL, NL3D::IDriver::incr, NL3D::IDriver::invert, NL3D::IDriver::keep, nlstop, NL3D::IDriver::replace, NL3D::CDriverGLStates::stencilOp(), and NL3D::IDriver::zero.
| bool NL3D::CDriverGL::stretchRect | ( | ITexture * | srcText, | |
| NLMISC::CRect & | srcRect, | |||
| ITexture * | destText, | |||
| NLMISC::CRect & | destRect | |||
| ) | [virtual] |
| bool NL3D::CDriverGL::supportBlendConstantColor | ( | ) | const [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.
Implements NL3D::IDriver.
Definition at line 3083 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::EXTBlendColor, and H_AUTO_OGL.
| bool NL3D::CDriverGL::supportBloomEffect | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 483 of file driver_opengl.cpp.
References isVertexProgramSupported(), supportFrameBufferObject(), supportPackedDepthStencil(), and supportTextureRectangle().
Referenced by setRenderTarget().
| bool NL3D::CDriverGL::supportCloudRenderSinglePass | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 3850 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::ATIFragmentShader, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureEnvCombine4.
| bool NL3D::CDriverGL::supportEMBM | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 3196 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::ATIEnvMapBumpMap, and H_AUTO_OGL.
Referenced by initEMBM(), isEMBMSupportedAtStage(), and setEMBMMatrix().
| bool NL3D::CDriverGL::supportFrameBufferObject | ( | ) | const [virtual] |
Definition at line 4130 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::FrameBufferObject, and H_AUTO_OGL.
Referenced by activeFrameBufferObject(), and supportBloomEffect().
| virtual bool NL3D::CDriverGL::supportIndexOffset | ( | ) | const [inline, 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
Implements NL3D::IDriver.
Definition at line 417 of file driver_opengl.h.
| bool NL3D::CDriverGL::supportMADOperator | ( | ) | const [private, virtual] |
Implements NL3D::IDriver.
Definition at line 3965 of file driver_opengl.cpp.
References _Extensions, NL3D::CGlExtensions::ATITextureEnvCombine3, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureEnvCombine4.
| bool NL3D::CDriverGL::supportOcclusionQuery | ( | ) | const [virtual] |
Implements NL3D::IDriver.
Definition at line 4109 of file driver_opengl.cpp.
References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVOcclusionQuery.
| bool NL3D::CDriverGL::supportPackedDepthStencil | ( | ) | const [virtual] |
Definition at line 4123 of file driver_opengl.cpp.
References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::PackedDepthStencil.
Referenced by NL3D::CTextureDrvInfosGL::CTextureDrvInfosGL(), and supportBloomEffect().
Implements NL3D::IDriver.
Definition at line 2959 of file driver_opengl.cpp.
References _SupportPerPixelShader, _SupportPerPixelShaderNoSpec, and H_AUTO_OGL.
Referenced by beginPPLMultiPass(), and beginPPLNoSpecMultiPass().
| bool NL3D::CDriverGL::supportTextureRectangle | ( | ) | const [virtual] |
Definition at line 4116 of file driver_opengl.cpp.
References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureRectangle.
Referenced by isTextureRectangle(), and supportBloomEffect().
| bool NL3D::CDriverGL::supportTextureShaders | ( | ) | const [virtual] |
test whether the device supports some form of texture shader. (could be limited to DX6 EMBM for example)
Implements NL3D::IDriver.
Definition at line 2865 of file driver_opengl.cpp.
References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureShader.
Referenced by setMatrix2DForTextureOffsetAddrMode().
| bool NL3D::CDriverGL::supportVertexBufferHard | ( | ) | const [virtual] |
return true if driver support VertexBufferHard.
Implements NL3D::IDriver.
Definition at line 718 of file driver_opengl_vertex.cpp.
References _SupportVBHard, and H_AUTO_OGL.
Referenced by initVertexBufferHard().
| bool NL3D::CDriverGL::supportVertexProgramDoubleSidedColor | ( | ) | const [private, virtual] |
Check if the driver support double sided colors vertex programs.
Implements NL3D::IDriver.
Definition at line 1888 of file driver_opengl_vertex_program.cpp.
References _Extensions, NL3D::CGlExtensions::ARBVertexProgram, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.
| bool NL3D::CDriverGL::supportVolatileVertexBuffer | ( | ) | const [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)
Implements NL3D::IDriver.
Definition at line 725 of file driver_opengl_vertex.cpp.
References H_AUTO_OGL.
| bool NL3D::CDriverGL::swapBuffers | ( | ) | [virtual] |
Swap the back and front buffers.
Implements NL3D::IDriver.
Definition at line 1870 of file driver_opengl.cpp.
References _AGPVertexArrayRange, _CurrentMaterial, _CurrentTexture, _CurrentTextureInfoGL, _CurrentVertexBufferHard, _CurVBHardLockCount, _DriverGLStates, _EventEmitter, _Extensions, _NbSetupMaterialCall, _NbSetupModelMatrixCall, _NumVBHardProfileFrame, _NVTextureShaderEnabled, _PrimitiveProfileIn, _PrimitiveProfileOut, _SwapBufferCounter, _TextureUsed, _VBHardProfiling, _VertexBufferHardSet, _VRAMVertexArrayRange, _WndActive, activeVertexBuffer(), activeVertexProgram(), NL3D::CMaterial::CTexEnv::ConstantColor, dpy, forceActivateTexEnvColor(), forceActivateTexEnvMode(), NL3D::CDriverGLStates::forceDefaults(), GL_TEXTURE_SHADER_NV, H_AUTO_OGL, inlGetNumTextStages(), NL3D::CVertexBufferHardGLNVidia::isFenceSet(), nlassert, NL3D::CVertexBuffer::NormalFlag, NL3D::IVertexBufferHardGL::NVidiaVB, NL3D::CGlExtensions::NVVertexArrayRange, NL3D::CVertexBuffer::PositionFlag, NL3D::CVertexBuffer::PrimaryColorFlag, NL3D::CPrimitiveProfile::reset(), NLMISC::safe_cast(), NL3D::CVertexBuffer::SecondaryColorFlag, NLMISC::CRGBA::set(), NL3D::CPtrSet< T >::Set, NL3D::CVertexBuffer::setNumVertices(), NL3D::CVertexBuffer::setVertexFormat(), NL3D::CVertexBufferHardGLNVidia::testFence(), NL3D::CVertexBuffer::TexCoord0Flag, NL3D::CVertexBuffer::TexCoord1Flag, NL3D::CVertexBuffer::TexCoord2Flag, NL3D::CVertexBuffer::TexCoord3Flag, NL3D::IVertexArrayRange::updateLostBuffers(), and win.
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.
Implements NL3D::IDriver.
Definition at line 1807 of file driver_opengl_texture.cpp.
References activateTexture(), NL3D::CTextureDrvInfosGL::Compressed, NL3D::getTextureGl(), H_AUTO_OGL, NL3D::CTextureDrvInfosGL::ID, inlGetNumTextStages(), NL3D::CTextureDrvInfosGL::MagFilter, NL3D::CTextureDrvInfosGL::MinFilter, NL3D::CTextureDrvInfosGL::MipMap, setupTexture(), NL3D::CTextureDrvInfosGL::TextureMemory, NL3D::CTextureDrvInfosGL::WrapS, and NL3D::CTextureDrvInfosGL::WrapT.
| IDriver::TMessageBoxId NL3D::CDriverGL::systemMessageBox | ( | const char * | message, | |
| const char * | title, | |||
| IDriver::TMessageBoxType | type = okType, |
|||
| TMessageBoxIcon | icon = noIcon | |||
| ) | [virtual] |
Output a system message box and print a message with an icon.
This method can be call even if the driver is not initialized. This method is used to return internal driver problem when string can't be displayed in the driver window. If the driver can't open a messageBox, it should not override this method and let the IDriver class manage it with the ASCII console.
| 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 from NL3D::IDriver.
Definition at line 2154 of file driver_opengl.cpp.
References NL3D::IDriver::abortId, NL3D::IDriver::abortRetryIgnoreType, NL3D::IDriver::asteriskIcon, NL3D::IDriver::cancelId, NL3D::IDriver::errorIcon, NL3D::IDriver::exclamationIcon, H_AUTO_OGL, NL3D::IDriver::handIcon, NL3D::IDriver::ignoreId, NL3D::IDriver::informationIcon, nlstop, NL3D::IDriver::noId, NL3D::IDriver::okCancelType, NL3D::IDriver::okId, NL3D::IDriver::questionIcon, NL3D::IDriver::retryCancelType, NL3D::IDriver::retryId, NL3D::IDriver::stopIcon, NL3D::IDriver::warningIcon, NL3D::IDriver::yesId, NL3D::IDriver::yesNoCancelType, and NL3D::IDriver::yesNoType.
| void NL3D::CDriverGL::toggleGlArraysForARBVertexProgram | ( | ) | [private] |
Definition at line 1034 of file driver_opengl_vertex.cpp.
References _CurrentTexture, _DriverGLStates, _Extensions, _LastSetupGLArrayVertexProgram, activateTexture(), NL3D::CGlExtensions::ATITextureEnvCombine3, NL3D::CDriverGLStates::clientActiveTextureARB(), NL3D::CDriverGLStates::enableColorArray(), NL3D::CDriverGLStates::enableNormalArray(), NL3D::CDriverGLStates::enableSecondaryColorArray(), NL3D::CDriverGLStates::enableTexCoordArray(), NL3D::CDriverGLStates::enableVertexArray(), NL3D::CDriverGLStates::enableVertexAttribArrayARB(), GLVertexAttribIndex, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, inlGetNumTextStages(), isVertexProgramEnabled(), and NL3D::CVertexBuffer::NumValue.
Referenced by setupGlArrays().
| void NL3D::CDriverGL::toggleGlArraysForEXTVertexShader | ( | ) | [private] |
Definition at line 1099 of file driver_opengl_vertex.cpp.
References _DriverGLStates, NL3D::CVertexProgram::_DrvInfo, _LastSetupGLArrayVertexProgram, _LastSetuppedVP, NL3D::CDriverGLStates::clientActiveTextureARB(), NL3D::CDriverGLStates::enableColorArray(), NL3D::CDriverGLStates::enableNormalArray(), NL3D::CDriverGLStates::enableSecondaryColorArray(), NL3D::CDriverGLStates::enableTexCoordArray(), NL3D::CDriverGLStates::enableVertexArray(), NL3D::CDriverGLStates::enableVertexAttribArrayForEXTVertexShader(), H_AUTO_OGL, inlGetNumTextStages(), isVertexProgramEnabled(), NL3D::CVertexBuffer::NumValue, NLMISC::safe_cast(), and NL3D::CVertexProgamDrvInfosGL::Variants.
Referenced by setupGlArrays().
| void NL3D::CDriverGL::toggleGlArraysForNVVertexProgram | ( | ) | [private] |
Definition at line 990 of file driver_opengl_vertex.cpp.
References _DriverGLStates, _LastSetupGLArrayVertexProgram, NL3D::CDriverGLStates::clientActiveTextureARB(), NL3D::CDriverGLStates::enableColorArray(), NL3D::CDriverGLStates::enableNormalArray(), NL3D::CDriverGLStates::enableSecondaryColorArray(), NL3D::CDriverGLStates::enableTexCoordArray(), NL3D::CDriverGLStates::enableVertexArray(), NL3D::CDriverGLStates::enableVertexAttribArray(), GLVertexAttribIndex, H_AUTO_OGL, inlGetNumTextStages(), isVertexProgramEnabled(), and NL3D::CVertexBuffer::NumValue.
Referenced by setupGlArrays().
| bool NL3D::CDriverGL::uploadTexture | ( | ITexture & | tex, | |
| NLMISC::CRect & | rect, | |||
| uint8 | nNumMipMap | |||
| ) | [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).
Implements NL3D::IDriver.
Definition at line 1037 of file driver_opengl_texture.cpp.
References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _ForceTextureResizePower, NL3D::CDriverGLStates::activeTextureARB(), NL3D::ITexture::allowDegradation(), NLMISC::clamp(), NL3D::CGlExtensions::EXTTextureCompressionS3TC, NL3D::getGlSrcTextureComponentType(), NL3D::getGlSrcTextureFormat(), getGlTextureFormat(), NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getMipMapCount(), NLMISC::CBitmap::getPixelFormat(), NLMISC::CBitmap::getPixels(), NLMISC::CObjectVector< T, EnableObjectBehavior >::getPtr(), NL3D::getTextureGl(), NLMISC::CBitmap::getWidth(), GL_TEXTURE_RECTANGLE_NV, GLenum(), H_AUTO_OGL, NLMISC::CRect::Height, NL3D::CTextureDrvInfosGL::ID, NL3D::ITexture::isTextureCube(), min, NL3D::ITexture::mipMapOn(), nglCompressedTexImage2DARB, nglCompressedTexSubImage2DARB, nlassert, NLMISC::CBitmap::RGBA, NL3D::sameDXTCFormat(), NL3D::CDriverGLStates::setTextureMode(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureDisabled, NL3D::ITexture::TextureDrvShare, NL3D::CTextureDrvInfosGL::TextureMode, NL3D::CDriverGLStates::TextureRect, NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.
| bool NL3D::CDriverGL::uploadTextureCube | ( | ITexture & | tex, | |
| NLMISC::CRect & | rect, | |||
| uint8 | nNumMipMap, | |||
| uint8 | nNumFace | |||
| ) | [virtual] |
Implements NL3D::IDriver.
Definition at line 1173 of file driver_opengl_texture.cpp.
References H_AUTO_OGL, NL3D::ITexture::isTextureCube(), and NL3D::ITexture::TextureDrvShare.
| void NL3D::CDriverGL::verifyNVTextureShaderConfig | ( | ) | [private] |
friend class CTextureDrvInfosGL [friend] |
Definition at line 660 of file driver_opengl.h.
Referenced by setupTextureEx().
friend class CVBDrvInfosGL [friend] |
Definition at line 1068 of file driver_opengl.h.
Referenced by setupVertexBuffer().
friend class CVertexArrayRangeARB [friend] |
Definition at line 1063 of file driver_opengl.h.
friend class CVertexArrayRangeATI [friend] |
Definition at line 1062 of file driver_opengl.h.
friend class CVertexArrayRangeMapObjectATI [friend] |
Definition at line 1066 of file driver_opengl.h.
friend class CVertexArrayRangeNVidia [friend] |
Definition at line 1060 of file driver_opengl.h.
friend class CVertexBufferHardARB [friend] |
Definition at line 1064 of file driver_opengl.h.
friend class CVertexBufferHardGLATI [friend] |
Definition at line 1065 of file driver_opengl.h.
friend class CVertexBufferHardGLMapObjectATI [friend] |
Definition at line 1067 of file driver_opengl.h.
friend class CVertexBufferHardGLNVidia [friend] |
Definition at line 1061 of file driver_opengl.h.
friend class CVertexProgamDrvInfosGL [friend] |
Definition at line 661 of file driver_opengl.h.
Referenced by activeARBVertexProgram(), activeEXTVertexShader(), and activeNVVertexProgram().
Definition at line 1084 of file driver_opengl.h.
Referenced by CDriverGL(), createVertexBufferHard(), getAvailableVertexAGPMemory(), initVertexBufferHard(), release(), resetVertexArrayRange(), and swapBuffers().
Definition at line 1101 of file driver_opengl.h.
Referenced by CDriverGL(), profileAllocatedTextureMemory(), setupTextureEx(), and NL3D::CTextureDrvInfosGL::~CTextureDrvInfosGL().
uint NL3D::CDriverGL::_ATIDriverVersion [private] |
Definition at line 1274 of file driver_opengl.h.
Referenced by CDriverGL(), and retrieveATIDriverVersion().
bool NL3D::CDriverGL::_ATIFogRangeFixed [private] |
Definition at line 1275 of file driver_opengl.h.
Referenced by CDriverGL(), retrieveATIDriverVersion(), setupEXTVertexShader(), setupFog(), and setupWaterPassARB().
Definition at line 1203 of file driver_opengl.h.
Definition at line 1211 of file driver_opengl.h.
Referenced by getBlendConstantColor(), and setBlendConstantColor().
GLfloat NL3D::CDriverGL::_CurrentFogColor[4] [private] |
Definition at line 758 of file driver_opengl.h.
Referenced by CDriverGL(), endLightMapMultiPass(), getFogColor(), and setupFog().
bool NL3D::CDriverGL::_CurrentGlNormalize [private] |
Definition at line 846 of file driver_opengl.h.
Referenced by CDriverGL(), and enableGlNormalize().
CMaterial* NL3D::CDriverGL::_CurrentMaterial [private] |
Definition at line 815 of file driver_opengl.h.
Referenced by beginCloudMultiPass(), beginLightMapMultiPass(), beginSpecularMultiPass(), beginWaterMultiPass(), CDriverGL(), endCloudMultiPass(), endLightMapMultiPass(), endWaterMultiPass(), setupCloudPass(), setupLightMapPass(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularPass(), setupWaterPass(), and swapBuffers().
Definition at line 816 of file driver_opengl.h.
Referenced by beginMultiPass(), CDriverGL(), endMultiPass(), setupMaterial(), and setupPass().
Definition at line 1296 of file driver_opengl.h.
Referenced by CDriverGL(), and deleteOcclusionQuery().
GLenum NL3D::CDriverGL::_CurrentTexAddrMode[IDRV_MAT_MAXTEXTURES] [private] |
Definition at line 827 of file driver_opengl.h.
Referenced by CDriverGL(), resetTextureShaders(), and setTextureShaders().
Definition at line 823 of file driver_opengl.h.
Referenced by activateTexEnvColor(), activateTexEnvMode(), forceActivateTexEnvColor(), and forceActivateTexEnvMode().
Definition at line 825 of file driver_opengl.h.
Referenced by activateTexEnvMode(), forceActivateTexEnvMode(), setupCloudPass(), setupLightMapPass(), setupPPLNoSpecPass(), setupPPLPass(), and setupSpecularPass().
Definition at line 820 of file driver_opengl.h.
Referenced by activateTexture(), copyFrameBufferToTexture(), setupTextureEx(), swapBuffers(), toggleGlArraysForARBVertexProgram(), and uploadTexture().
Definition at line 822 of file driver_opengl.h.
Referenced by activateTexture(), copyFrameBufferToTexture(), setupTextureEx(), swapBuffers(), and uploadTexture().
Definition at line 1071 of file driver_opengl.h.
Referenced by CDriverGL(), NL3D::CVertexArrayRangeATI::disable(), NL3D::CVertexArrayRangeNVidia::disable(), NL3D::CVertexArrayRangeARB::enable(), NL3D::CVertexArrayRangeATI::enable(), and NL3D::CVertexArrayRangeNVidia::enable().
Definition at line 1073 of file driver_opengl.h.
Referenced by activeVertexBuffer(), CDriverGL(), NL3D::CVertexBufferHardARB::disable(), NL3D::CVertexArrayRangeARB::disable(), NL3D::CVertexBufferHardGLMapObjectATI::disable(), NL3D::CVertexBufferHardGLATI::disable(), NL3D::CVertexBufferHardGLNVidia::disable(), NL3D::CVertexBufferHardARB::enable(), NL3D::CVertexBufferHardGLMapObjectATI::enable(), NL3D::CVertexBufferHardGLATI::enable(), NL3D::CVertexBufferHardGLNVidia::enable(), fenceOnCurVBHardIfNeeded(), getCurrentVertexBufferHard(), renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), renderSimpleTriangles(), renderTriangles(), resetVertexArrayRange(), and swapBuffers().
CScissor NL3D::CDriverGL::_CurrScissor [private] |
Definition at line 764 of file driver_opengl.h.
Referenced by setRenderTarget(), and setupScissor().
CViewport NL3D::CDriverGL::_CurrViewport [private] |
Definition at line 763 of file driver_opengl.h.
Referenced by getViewport(), setRenderTarget(), and setupViewport().
uint NL3D::CDriverGL::_CurVBHardLockCount [private] |
Definition at line 1124 of file driver_opengl.h.
Referenced by appendVBHardLockProfile(), CDriverGL(), startProfileVBHardLock(), and swapBuffers().
uint8 NL3D::CDriverGL::_Depth [private] |
Definition at line 716 of file driver_opengl.h.
Referenced by getBitPerPixel(), and setMode().
Definition at line 840 of file driver_opengl.h.
Referenced by activateTexture(), activeVertexBuffer(), beginLightMapMultiPass(), bindTextureWithMode(), checkTextureOn(), cleanLightSetup(), clearZBuffer(), copyFrameBufferToTexture(), NL3D::CVertexArrayRangeARB::createVBHardGL(), disableUserTextureMatrix(), enableFog(), enableLightInternal(), enableStencilTest(), endLightMapMultiPass(), forceActivateTexEnvColor(), forceActivateTexEnvMode(), getCullMode(), getDepthRange(), initEMBM(), isStencilTestEnabled(), NL3D::CVertexBufferHardARB::lock(), resetLightMapVertexSetup(), resetTextureShaders(), setCullMode(), setDepthRange(), setEMBMMatrix(), setMatrix2DForTextureOffsetAddrMode(), setTextureEnvFunction(), setTextureShaders(), setupCloudPass(), setupGlArraysForARBVertexProgram(), setupGlArraysForEXTVertexShader(), setupGlArraysForNVVertexProgram(), setupGlArraysStd(), setupLightMapPass(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularBegin(), setupSpecularEnd(), setupSpecularPass(), setupTextureEx(), setupUserTextureMatrix(), setupUVPtr(), setupWaterPassNV20(), stencilFunc(), stencilMask(), stencilOp(), swapBuffers(), toggleGlArraysForARBVertexProgram(), toggleGlArraysForEXTVertexShader(), toggleGlArraysForNVVertexProgram(), NL3D::CVertexBufferHardARB::unlock(), uploadTexture(), and NL3D::CVertexBufferHardARB::~CVertexBufferHardARB().
Definition at line 696 of file driver_opengl.h.
Referenced by enableLowLevelKeyboard(), enableLowLevelMouse(), getDoubleClickDelay(), getEventEmitter(), getLowLevelInputDeviceManager(), and swapBuffers().
GLuint NL3D::CDriverGL::_EVSColorHandle [private] |
Definition at line 1227 of file driver_opengl.h.
Referenced by setupEXTVertexShader().
GLuint NL3D::CDriverGL::_EVSConstantHandle [private] |
Definition at line 1230 of file driver_opengl.h.
Referenced by setConstant(), setConstantMatrix(), and setupEXTVertexShader().
GLuint NL3D::CDriverGL::_EVSNormalHandle [private] |
Definition at line 1226 of file driver_opengl.h.
Referenced by setupEXTVertexShader().
const uint NL3D::CDriverGL::_EVSNumConstant = 97 [static, private] |
Definition at line 1232 of file driver_opengl.h.
Referenced by setupEXTVertexShader(), and setupFog().
GLuint NL3D::CDriverGL::_EVSPositionHandle [private] |
Definition at line 1225 of file driver_opengl.h.
Referenced by setupEXTVertexShader().
GLuint NL3D::CDriverGL::_EVSTexHandle[8] [private] |
Definition at line 1228 of file driver_opengl.h.
Referenced by setupEXTVertexShader().
CGlExtensions NL3D::CDriverGL::_Extensions [private] |
Definition at line 711 of file driver_opengl.h.
Referenced by activateTexture(), activeVertexProgram(), beginSpecularMultiPass(), checkForPerPixelLightingSupport(), computeLightMapInfos(), createOcclusionQuery(), NL3D::CVertexProgamDrvInfosGL::CVertexProgamDrvInfosGL(), NL3D::CVertexArrayRangeNVidia::disable(), disableHardwareTextureShader(), disableHardwareVertexArrayAGP(), disableHardwareVertexProgram(), NL3D::CVertexArrayRangeNVidia::enable(), enableLight(), enableVertexProgramDoubleSidedColor(), endWaterMultiPass(), forceActivateTexEnvMode(), getGlTextureFormat(), getSwapVBLInterval(), initEMBM(), initFragmentShaders(), inlGetNumTextStages(), isTextureAddrModeSupported(), isVertexProgramEmulated(), isVertexProgramSupported(), isWaterShaderSupported(), resetTextureShaders(), setBlendConstantColor(), setConstant(), setConstantMatrix(), setEMBMMatrix(), setLightInternal(), setSwapVBLInterval(), setupCloudPass(), setupFog(), setupGlArrays(), setupLightMapPass(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularPass(), setupTextureBasicParameters(), setupTextureEx(), setupVertexBuffer(), setupWaterPass(), setupWaterPassARB(), supportBlendConstantColor(), supportCloudRenderSinglePass(), supportEMBM(), supportFrameBufferObject(), supportMADOperator(), supportOcclusionQuery(), supportPackedDepthStencil(), supportTextureRectangle(), supportTextureShaders(), supportVertexProgramDoubleSidedColor(), swapBuffers(), toggleGlArraysForARBVertexProgram(), and uploadTexture().
bool NL3D::CDriverGL::_FogEnabled [private] |
Definition at line 756 of file driver_opengl.h.
Referenced by CDriverGL(), enableFog(), endLightMapMultiPass(), fogEnabled(), setupLightMapPass(), setupMaterial(), and setupWaterPassARB().
float NL3D::CDriverGL::_FogEnd [private] |
Definition at line 757 of file driver_opengl.h.
Referenced by CDriverGL(), getFogEnd(), setupFog(), and setupWaterPassARB().
float NL3D::CDriverGL::_FogStart [private] |
Definition at line 757 of file driver_opengl.h.
Referenced by CDriverGL(), getFogStart(), setupFog(), and setupWaterPassARB().
bool NL3D::CDriverGL::_ForceDXTCCompression [private] |
Definition at line 1181 of file driver_opengl.h.
Referenced by CDriverGL(), forceDXTCCompression(), and getGlTextureFormat().
Definition at line 1185 of file driver_opengl.h.
Referenced by CDriverGL(), forceNativeFragmentPrograms(), and initFragmentShaders().
bool NL3D::CDriverGL::_ForceNormalize [private] |
Definition at line 719 of file driver_opengl.h.
Referenced by CDriverGL(), doRefreshRenderSetup(), forceNormalize(), and isForceNormalize().
Divisor for textureResize (power).
Definition at line 1183 of file driver_opengl.h.
Referenced by CDriverGL(), forceTextureResize(), setupTextureEx(), and uploadTexture().
bool NL3D::CDriverGL::_FullScreen [private] |
Definition at line 668 of file driver_opengl.h.
Referenced by CDriverGL(), getCurrentScreenMode(), release(), and setMode().
NLMISC::CMatrix NL3D::CDriverGL::_GLProjMat [private] |
Definition at line 731 of file driver_opengl.h.
Referenced by refreshProjMatrixFromGL(), and setConstantMatrix().
bool NL3D::CDriverGL::_Initialized [private] |
Definition at line 706 of file driver_opengl.h.
Referenced by CDriverGL(), getVideocardInformation(), release(), and setSwapVBLInterval().
uint NL3D::CDriverGL::_Interval [private] |
Definition at line 670 of file driver_opengl.h.
Referenced by CDriverGL(), getSwapVBLInterval(), and setSwapVBLInterval().
CIndexBufferInfo NL3D::CDriverGL::_LastIB [private] |
Definition at line 924 of file driver_opengl.h.
Referenced by activeIndexBuffer(), renderLines(), renderSimpleTriangles(), and renderTriangles().
Definition at line 1176 of file driver_opengl.h.
Referenced by setupUVPtr(), toggleGlArraysForARBVertexProgram(), toggleGlArraysForEXTVertexShader(), and toggleGlArraysForNVVertexProgram().
Definition at line 1179 of file driver_opengl.h.
Referenced by activeARBVertexProgram(), activeEXTVertexShader(), activeNVVertexProgram(), setupGlArraysForEXTVertexShader(), and toggleGlArraysForEXTVertexShader().
CVertexBufferInfo NL3D::CDriverGL::_LastVB [private] |
LastVB for UV setup.
Definition at line 923 of file driver_opengl.h.
Referenced by activeVertexBuffer(), beginLightMapMultiPass(), mapTextureStageToUV(), resetLightMapVertexSetup(), and setupLightMapPass().
Definition at line 949 of file driver_opengl.h.
Referenced by activeVertexBuffer(), CDriverGL(), endLightMapMultiPass(), resetLightMapVertexSetup(), setupLightMapPass(), and setupMaterial().
bool NL3D::CDriverGL::_LightDirty[MaxLight] [private] |
Definition at line 778 of file driver_opengl.h.
Referenced by CDriverGL(), cleanLightSetup(), enableLightInternal(), setLightInternal(), setupViewMatrix(), and setupViewMatrixEx().
CLight NL3D::CDriverGL::_LightMapDynamicLight [private] |
Definition at line 780 of file driver_opengl.h.
Referenced by setLightMapDynamicLight(), and setupLightMapDynamicLighting().
Definition at line 782 of file driver_opengl.h.
Referenced by beginLightMapMultiPass(), CDriverGL(), enableLight(), setLight(), setLightMapDynamicLight(), and setupLightMapDynamicLighting().
Definition at line 781 of file driver_opengl.h.
Referenced by CDriverGL(), setLightMapDynamicLight(), and setupLightMapDynamicLighting().
Definition at line 946 of file driver_opengl.h.
Referenced by CDriverGL(), and setupLightMapPass().
std::vector<uint> NL3D::CDriverGL::_LightMapLUT [private] |
Definition at line 943 of file driver_opengl.h.
Referenced by CDriverGL(), computeLightMapInfos(), and setupLightMapPass().
Definition at line 941 of file driver_opengl.h.
Referenced by computeLightMapInfos(), and setupLightMapPass().
Definition at line 950 of file driver_opengl.h.
Referenced by CDriverGL(), resetLightMapVertexSetup(), and setupLightMapPass().
uint NL3D::CDriverGL::_LightMode[MaxLight] [private] |
Definition at line 775 of file driver_opengl.h.
Referenced by cleanLightSetup(), and setLightInternal().
bool NL3D::CDriverGL::_LightSetupDirty [private] |
Definition at line 722 of file driver_opengl.h.
Referenced by CDriverGL(), cleanLightSetup(), doRefreshRenderSetup(), enableLightInternal(), setLightInternal(), setupViewMatrix(), and setupViewMatrixEx().
Definition at line 842 of file driver_opengl.h.
Referenced by CDriverGL(), and setupMaterial().
uint NL3D::CDriverGL::_MaxDriverLight [private] |
Definition at line 773 of file driver_opengl.h.
Referenced by cleanLightSetup(), enableLight(), enableLightInternal(), getMaxLight(), setLightInternal(), and setupLightMapDynamicLighting().
uint32 NL3D::CDriverGL::_MaxVerticesByVBHard [private] |
Definition at line 1081 of file driver_opengl.h.
Referenced by CDriverGL(), createVertexBufferHard(), getMaxVerticesByVertexBufferHard(), and initVertexBufferHard().
CMatrix NL3D::CDriverGL::_ModelViewMatrix [private] |
Definition at line 753 of file driver_opengl.h.
Referenced by doRefreshRenderSetup(), setConstantFog(), setConstantMatrix(), and setupModelMatrix().
bool NL3D::CDriverGL::_ModelViewMatrixDirty [private] |
Definition at line 725 of file driver_opengl.h.
Referenced by CDriverGL(), doRefreshRenderSetup(), setupModelMatrix(), setupViewMatrix(), and setupViewMatrixEx().
uint32 NL3D::CDriverGL::_NbSetupMaterialCall [private] |
Definition at line 1102 of file driver_opengl.h.
Referenced by profileSetupedMaterials(), setupMaterial(), and swapBuffers().
Definition at line 1103 of file driver_opengl.h.
Referenced by profileSetupedModelMatrix(), setupModelMatrix(), and swapBuffers().
uint NL3D::CDriverGL::_NLightMapPass [private] |
Definition at line 940 of file driver_opengl.h.
Referenced by beginLightMapMultiPass(), computeLightMapInfos(), endLightMapMultiPass(), and setupLightMapPass().
uint NL3D::CDriverGL::_NLightMapPerPass [private] |
Definition at line 939 of file driver_opengl.h.
Referenced by computeLightMapInfos(), endLightMapMultiPass(), and setupLightMapPass().
uint NL3D::CDriverGL::_NLightMaps [private] |
Temp Variables computed in beginLightMapMultiPass(). Reused in setupLightMapPass().
Definition at line 938 of file driver_opengl.h.
Referenced by computeLightMapInfos(), endLightMapMultiPass(), and setupLightMapPass().
uint NL3D::CDriverGL::_NumVBHardProfileFrame [private] |
Definition at line 1125 of file driver_opengl.h.
Referenced by CDriverGL(), endProfileVBHardLock(), startProfileVBHardLock(), and swapBuffers().
void* NL3D::CDriverGL::_NVCurrentVARPtr [private] |
Definition at line 1075 of file driver_opengl.h.
Referenced by CDriverGL(), and NL3D::CVertexArrayRangeNVidia::enable().
uint32 NL3D::CDriverGL::_NVCurrentVARSize [private] |
Definition at line 1076 of file driver_opengl.h.
Referenced by CDriverGL(), and NL3D::CVertexArrayRangeNVidia::enable().
bool NL3D::CDriverGL::_NVTextureShaderEnabled [private] |
Definition at line 835 of file driver_opengl.h.
Referenced by CDriverGL(), enableNVTextureShader(), resetTextureShaders(), and swapBuffers().
Definition at line 1295 of file driver_opengl.h.
Referenced by createOcclusionQuery(), deleteOcclusionQuery(), and release().
bool NL3D::CDriverGL::_OffScreen [private] |
Definition at line 669 of file driver_opengl.h.
Referenced by CDriverGL(), getWindowPos(), getWindowSize(), and release().
CViewport NL3D::CDriverGL::_OldViewport [private] |
Definition at line 767 of file driver_opengl.h.
Referenced by setRenderTarget().
float NL3D::CDriverGL::_OODeltaZ [private] |
Definition at line 737 of file driver_opengl.h.
Referenced by setFrustum(), and setupMaterial().
bool NL3D::CDriverGL::_PolygonSmooth [private] |
Definition at line 1271 of file driver_opengl.h.
Referenced by CDriverGL(), enablePolygonSmoothing(), and isPolygonSmoothingEnabled().
float NL3D::CDriverGL::_PPLExponent [private] |
Definition at line 792 of file driver_opengl.h.
Referenced by setPerPixelLightingLight().
Definition at line 793 of file driver_opengl.h.
Referenced by setPerPixelLightingLight(), setupPPLNoSpecPass(), and setupPPLPass().
Definition at line 794 of file driver_opengl.h.
Referenced by setPerPixelLightingLight(), and setupPPLPass().
Definition at line 1099 of file driver_opengl.h.
Referenced by profileRenderedPrimitives(), renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), renderSimpleTriangles(), renderTriangles(), and swapBuffers().
Definition at line 1100 of file driver_opengl.h.
Referenced by profileRenderedPrimitives(), renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), renderSimpleTriangles(), renderTriangles(), and swapBuffers().
bool NL3D::CDriverGL::_ProjMatDirty [private] |
Definition at line 728 of file driver_opengl.h.
Referenced by CDriverGL(), refreshProjMatrixFromGL(), and setFrustum().
CVector NL3D::CDriverGL::_PZBCameraPos [private] |
Definition at line 747 of file driver_opengl.h.
Referenced by cleanLightSetup(), setupModelMatrix(), setupViewMatrix(), and setupViewMatrixEx().
bool NL3D::CDriverGL::_RenderSetupDirty [private] |
Definition at line 734 of file driver_opengl.h.
Referenced by CDriverGL(), doRefreshRenderSetup(), enableLightInternal(), refreshRenderSetup(), setLightInternal(), setupModelMatrix(), setupViewMatrix(), and setupViewMatrixEx().
bool NL3D::CDriverGL::_RenderTargetFBO [private] |
Definition at line 769 of file driver_opengl.h.
Referenced by CDriverGL(), and setRenderTarget().
bool NL3D::CDriverGL::_SlowUnlockVBHard [private] |
Definition at line 1080 of file driver_opengl.h.
Referenced by CDriverGL(), and slowUnlockVertexBufferHard().
bool NL3D::CDriverGL::_SpecularBatchOn [private] |
Definition at line 964 of file driver_opengl.h.
Referenced by beginSpecularMultiPass(), CDriverGL(), endSpecularBatch(), endSpecularMultiPass(), and startSpecularBatch().
CMatrix NL3D::CDriverGL::_SpecularTexMtx [private] |
Definition at line 745 of file driver_opengl.h.
Referenced by setupSpecularBegin(), setupViewMatrix(), and setupViewMatrixEx().
Definition at line 989 of file driver_opengl.h.
Referenced by getSpecularCubeMap().
Definition at line 837 of file driver_opengl.h.
Referenced by CDriverGL(), initEMBM(), and isEMBMSupportedAtStage().
bool NL3D::CDriverGL::_SumTextureMemoryUsed [private] |
Definition at line 1104 of file driver_opengl.h.
Referenced by activateTexture(), CDriverGL(), and enableUsedTextureMemorySum().
bool NL3D::CDriverGL::_SupportPerPixelShader [private] |
Definition at line 790 of file driver_opengl.h.
Referenced by checkForPerPixelLightingSupport(), getSupportedShader(), and supportPerPixelLighting().
Definition at line 791 of file driver_opengl.h.
Referenced by checkForPerPixelLightingSupport(), getSupportedShader(), and supportPerPixelLighting().
bool NL3D::CDriverGL::_SupportVBHard [private] |
Definition at line 1079 of file driver_opengl.h.
Referenced by CDriverGL(), and supportVertexBufferHard().
uint64 NL3D::CDriverGL::_SwapBufferCounter [protected] |
Definition at line 1300 of file driver_opengl.h.
Referenced by CDriverGL(), getSwapBufferCounter(), release(), and swapBuffers().
Definition at line 1293 of file driver_opengl.h.
Referenced by activateTexture(), and CDriverGL().
CSmartPtr<ITexture> NL3D::CDriverGL::_TextureTarget [private] |
to texture
Definition at line 1281 of file driver_opengl.h.
Referenced by copyTargetToTexture(), getRenderTargetSize(), setRenderTarget(), setupScissor(), and setupViewport().
uint NL3D::CDriverGL::_TextureTargetCubeFace [private] |
Definition at line 1288 of file driver_opengl.h.
Referenced by CDriverGL(), and setRenderTarget().
uint32 NL3D::CDriverGL::_TextureTargetHeight [private] |
Definition at line 1286 of file driver_opengl.h.
Referenced by setRenderTarget().
uint32 NL3D::CDriverGL::_TextureTargetLevel [private] |
Definition at line 1282 of file driver_opengl.h.
Referenced by setRenderTarget().
bool NL3D::CDriverGL::_TextureTargetUpload [private] |
Definition at line 1287 of file driver_opengl.h.
Referenced by CDriverGL(), copyTargetToTexture(), and setRenderTarget().
uint32 NL3D::CDriverGL::_TextureTargetWidth [private] |
Definition at line 1285 of file driver_opengl.h.
Referenced by setRenderTarget().
uint32 NL3D::CDriverGL::_TextureTargetX [private] |
Definition at line 1283 of file driver_opengl.h.
Referenced by setRenderTarget().
uint32 NL3D::CDriverGL::_TextureTargetY [private] |
Definition at line 1284 of file driver_opengl.h.
Referenced by setRenderTarget().
std::set<CTextureDrvInfosGL*> NL3D::CDriverGL::_TextureUsed [private] |
Definition at line 1105 of file driver_opengl.h.
Referenced by activateTexture(), getUsedTextureMemory(), swapBuffers(), and NL3D::CTextureDrvInfosGL::~CTextureDrvInfosGL().
CLight NL3D::CDriverGL::_UserLight0 [private] |
Definition at line 784 of file driver_opengl.h.
Referenced by CDriverGL(), setLight(), and setupLightMapDynamicLighting().
bool NL3D::CDriverGL::_UserLightEnable[MaxLight] [private] |
Definition at line 785 of file driver_opengl.h.
Referenced by enableLight(), and setupLightMapDynamicLighting().
Definition at line 1189 of file driver_opengl.h.
uint NL3D::CDriverGL::_UserTexMatEnabled [private] |
Definition at line 1190 of file driver_opengl.h.
Referenced by CDriverGL(), disableUserTextureMatrix(), and setupUserTextureMatrix().
CMatrix NL3D::CDriverGL::_UserViewMtx [private] |
Definition at line 740 of file driver_opengl.h.
Referenced by getViewMatrix(), setupViewMatrix(), and setupViewMatrixEx().
std::vector<CVBHardProfile> NL3D::CDriverGL::_VBHardProfiles [private] |
Definition at line 1123 of file driver_opengl.h.
Referenced by appendVBHardLockProfile(), endProfileVBHardLock(), and startProfileVBHardLock().
bool NL3D::CDriverGL::_VBHardProfiling [private] |
Definition at line 1122 of file driver_opengl.h.
Referenced by CDriverGL(), endProfileVBHardLock(), NL3D::CVertexBufferHardARB::lock(), NL3D::CVertexBufferHardGLNVidia::lock(), startProfileVBHardLock(), swapBuffers(), and NL3D::CVertexBufferHardARB::unlock().
Definition at line 1059 of file driver_opengl.h.
Referenced by createVertexBufferHard(), profileVBHardAllocation(), resetVertexArrayRange(), swapBuffers(), and NL3D::CVBDrvInfosGL::~CVBDrvInfosGL().
bool NL3D::CDriverGL::_VertexProgramEnabled [private] |
Definition at line 1174 of file driver_opengl.h.
Referenced by activeARBVertexProgram(), activeEXTVertexShader(), activeNVVertexProgram(), and isVertexProgramEnabled().
CMatrix NL3D::CDriverGL::_ViewMtx [private] |
Definition at line 743 of file driver_opengl.h.
Referenced by cleanLightSetup(), setupModelMatrix(), setupViewMatrix(), and setupViewMatrixEx().
Definition at line 1086 of file driver_opengl.h.
Referenced by CDriverGL(), createVertexBufferHard(), getAvailableVertexVRAMMemory(), initVertexBufferHard(), release(), resetVertexArrayRange(), and swapBuffers().
sint32 NL3D::CDriverGL::_WindowHeight [private] |
Definition at line 672 of file driver_opengl.h.
Referenced by getRenderTargetSize(), getWindowSize(), setMode(), setMousePos(), setupScissor(), and setupViewport().
sint32 NL3D::CDriverGL::_WindowWidth [private] |
Definition at line 672 of file driver_opengl.h.
Referenced by getRenderTargetSize(), getWindowSize(), setMode(), setMousePos(), setupScissor(), and setupViewport().
sint32 NL3D::CDriverGL::_WindowX [private] |
Definition at line 672 of file driver_opengl.h.
Referenced by getWindowPos(), setMode(), and setWindowPos().
sint32 NL3D::CDriverGL::_WindowY [private] |
Definition at line 672 of file driver_opengl.h.
Referenced by getWindowPos(), setMode(), and setWindowPos().
bool NL3D::CDriverGL::_WndActive [protected] |
Definition at line 1299 of file driver_opengl.h.
Referenced by CDriverGL(), isWndActive(), and swapBuffers().
CVector NL3D::CDriverGL::_WorldLightDirection[MaxLight] [private] |
Definition at line 777 of file driver_opengl.h.
Referenced by cleanLightSetup(), and setLightInternal().
CVector NL3D::CDriverGL::_WorldLightPos[MaxLight] [private] |
Definition at line 776 of file driver_opengl.h.
Referenced by cleanLightSetup(), and setLightInternal().
GLuint NL3D::CDriverGL::ARBWaterShader[4] [private] |
Definition at line 1258 of file driver_opengl.h.
Referenced by CDriverGL(), deleteARBFragmentPrograms(), endWaterMultiPass(), initFragmentShaders(), isWaterShaderSupported(), setupWaterPass(), and setupWaterPassARB().
GLuint NL3D::CDriverGL::ATICloudShaderHandle [private] |
Definition at line 1256 of file driver_opengl.h.
Referenced by CDriverGL(), deleteFragmentShaders(), endCloudMultiPass(), initFragmentShaders(), and setupCloudPass().
GLuint NL3D::CDriverGL::ATIWaterShaderHandle [private] |
Definition at line 1255 of file driver_opengl.h.
Referenced by CDriverGL(), deleteFragmentShaders(), initFragmentShaders(), and setupWaterPassR200().
GLuint NL3D::CDriverGL::ATIWaterShaderHandleNoDiffuseMap [private] |
shaders
Definition at line 1254 of file driver_opengl.h.
Referenced by CDriverGL(), deleteFragmentShaders(), endWaterMultiPass(), initFragmentShaders(), setupWaterPass(), and setupWaterPassR200().
GLXContext NL3D::CDriverGL::ctx [private] |
Definition at line 693 of file driver_opengl.h.
Referenced by activate(), and release().
Cursor NL3D::CDriverGL::cursor [private] |
Definition at line 695 of file driver_opengl.h.
Referenced by CDriverGL(), and showCursor().
Display* NL3D::CDriverGL::dpy [private] |
Definition at line 692 of file driver_opengl.h.
Referenced by activate(), getCurrentScreenMode(), getModes(), getRenderTargetSize(), getWindowSize(), init(), release(), setCapture(), setMousePos(), setupScissor(), setupViewport(), setWindowPos(), setWindowTitle(), showCursor(), showWindow(), and swapBuffers().
const uint NL3D::CDriverGL::GLMatrix [static, private] |
{
GL_MODELVIEW,
GL_PROJECTION,
GL_MODELVIEW_PROJECTION_NV
}
Definition at line 1198 of file driver_opengl.h.
Referenced by setConstantMatrix().
const uint NL3D::CDriverGL::GLTransform [static, private] |
Definition at line 1199 of file driver_opengl.h.
Referenced by setConstantMatrix().
const uint NL3D::CDriverGL::GLType [static, private] |
{
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_UNSIGNED_BYTE
}
Definition at line 1195 of file driver_opengl.h.
Referenced by setupGlArraysForARBVertexProgram(), setupGlArraysForEXTVertexShader(), and setupGlArraysForNVVertexProgram().
const bool NL3D::CDriverGL::GLTypeIsIntegral [static, private] |
{
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
true
}
Definition at line 1197 of file driver_opengl.h.
Referenced by setupGlArraysForARBVertexProgram().