GFXNullDevice Class Reference#include <gfxNullDevice.h>
Inheritance diagram for GFXNullDevice:
[legend]List of all members.
|
State Initalization. |
| virtual void | copyBBToSfxBuff () |
| virtual GFXCubemap * | createCubemap () |
| virtual F32 | getFillConventionOffset () const |
| | Get the fill convention for this device.
|
| virtual void | initStates () |
| | State initalization.
|
| virtual void | setMatrix (GFXMatrixType mtype, const MatrixF &mat) |
| | This function must be implemented differently per API and it should set ONLY the current matrix.
|
| virtual GFXVertexBuffer * | allocVertexBuffer (U32 numVerts, U32 vertFlags, U32 vertSize, GFXBufferType bufferType) |
| | This allocates a vertex buffer and returns a pointer to the allocated buffer.
|
| virtual GFXPrimitiveBuffer * | allocPrimitiveBuffer (U32 numIndices, U32 numPrimitives, GFXBufferType bufferType) |
| | This allocates a primitive buffer and returns a pointer to the allocated buffer.
|
Public Member Functions |
| | GFXNullDevice () |
| virtual | ~GFXNullDevice () |
| void | init (const GFXVideoMode &mode, PlatformWindow *window=NULL) |
| | Initialize this GFXDevice, optionally specifying a platform window to bind to.
|
| virtual void | activate () |
| virtual void | deactivate () |
| virtual GFXAdapterType | getAdapterType () |
| | Returns active graphics adapter type.
|
| virtual void | enumerateVideoModes () |
| | Enumerates the supported video modes of the device.
|
| virtual void | setVideoMode (const GFXVideoMode &mode) |
| | Sets the video mode for the device.
|
| virtual GFXTextureTarget * | allocRenderToTextureTarget () |
| | Allocate a target for doing render to texture operations, with no depth/stencil buffer.
|
| virtual GFXWindowTarget * | allocWindowTarget (PlatformWindow *window) |
| | Allocate a target for a given window.
|
| virtual void | pushActiveRenderTarget () |
| | Save current render target states - note this works with MRT's.
|
| virtual void | popActiveRenderTarget () |
| | Restore all render targets - supports MRT's.
|
| virtual void | setActiveRenderTarget (GFXTarget *target) |
| | Start rendering to to a specified render target.
|
| virtual GFXTarget * | getActiveRenderTarget () |
| | Return a pointer to the current active render target.
|
| virtual F32 | getPixelShaderVersion () const |
| virtual void | setPixelShaderVersion (F32 version) |
| virtual U32 | getNumSamplers () const |
| | Returns the number of texture samplers that can be used in a shader rendering pass.
|
| virtual GFXShader * | createShader (const char *vertFile, const char *pixFile, F32 pixVersion, const Vector< GFXShaderMacro > ¯os) |
| | Creates a shader.
|
| virtual void | clear (U32 flags, ColorI color, F32 z, U32 stencil) |
| virtual bool | beginSceneInternal () |
| virtual void | endSceneInternal () |
| virtual void | drawPrimitive (GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount) |
| virtual void | drawIndexedPrimitive (GFXPrimitiveType primType, U32 minIndex, U32 numVerts, U32 startIndex, U32 primitiveCount) |
| virtual void | setViewport (const RectI &rect) |
| virtual const RectI & | getViewport () const |
| virtual void | setClipRect (const RectI &rect) |
| virtual const RectI & | getClipRect () const |
| virtual void | preDestroy () |
| | This is called before this, or any other device, is deleted in the global destroy() method.
|
| virtual U32 | getMaxDynamicVerts () |
| virtual U32 | getMaxDynamicIndices () |
| virtual GFXFormat | selectSupportedFormat (GFXTextureProfile *profile, const Vector< GFXFormat > &formats, bool texture, bool mustblend) |
| GFXFence * | createFence () |
| | Allocate a fence.
|
|
| virtual void | enterDebugEvent (ColorI color, const char *name) |
| virtual void | leaveDebugEvent () |
| virtual void | setDebugMarker (ColorI color, const char *name) |
Static Public Member Functions |
| static GFXDevice * | createInstance (U32 adapterIndex) |
| static void | enumerateAdapters (Vector< GFXAdapter * > &adapterList) |
Protected Member Functions |
| virtual GFXStateBlockRef | createStateBlockInternal (const GFXStateBlockDesc &desc) |
| | Called by GFXDevice to create a device specific stateblock.
|
| virtual void | setStateBlockInternal (GFXStateBlock *block, bool force) |
| | Called by GFXDevice to actually set a stateblock.
|
| virtual void | setShaderConstBufferInternal (GFXShaderConstBuffer *buffer) |
| | Called by base GFXDevice to actually set a const buffer.
|
| virtual void | setTextureInternal (U32 textureUnit, const GFXTextureObject *texture) |
| virtual void | setLightInternal (U32 lightStage, const GFXLightInfo light, bool lightEnable) |
| virtual void | setLightMaterialInternal (const GFXLightMaterial mat) |
| virtual void | setGlobalAmbientInternal (ColorF color) |
Static Protected Attributes |
| static GFXAdapter::CreateDeviceInstanceDelegate | mCreateDeviceInstance |
Private Types |
| typedef GFXDevice | Parent |
Private Attributes |
| RectI | viewport |
| RectI | clip |
| GFXStateBlockRef | mNullStateBlock |
Member Typedef Documentation
Constructor & Destructor Documentation
| GFXNullDevice::GFXNullDevice |
( |
|
) |
|
| virtual GFXNullDevice::~GFXNullDevice |
( |
|
) |
[virtual] |
Member Function Documentation
| static GFXDevice* GFXNullDevice::createInstance |
( |
U32 |
adapterIndex |
) |
[static] |
Initialize this GFXDevice, optionally specifying a platform window to bind to.
Implements GFXDevice.
| virtual void GFXNullDevice::activate |
( |
|
) |
[inline, virtual] |
| virtual void GFXNullDevice::deactivate |
( |
|
) |
[inline, virtual] |
| virtual GFXAdapterType GFXNullDevice::getAdapterType |
( |
|
) |
[inline, virtual] |
Returns active graphics adapter type.
Implements GFXDevice.
| virtual void GFXNullDevice::enterDebugEvent |
( |
ColorI |
color, |
|
|
const char * |
name | |
|
) |
| | [inline, virtual] |
| virtual void GFXNullDevice::leaveDebugEvent |
( |
|
) |
[inline, virtual] |
| virtual void GFXNullDevice::setDebugMarker |
( |
ColorI |
color, |
|
|
const char * |
name | |
|
) |
| | [inline, virtual] |
| virtual void GFXNullDevice::enumerateVideoModes |
( |
|
) |
[inline, virtual] |
Enumerates the supported video modes of the device.
Implements GFXDevice.
| virtual void GFXNullDevice::setVideoMode |
( |
const GFXVideoMode & |
mode |
) |
[inline, virtual] |
Sets the video mode for the device.
| virtual void GFXNullDevice::setStateBlockInternal |
( |
GFXStateBlock * |
block, |
|
|
bool |
force | |
|
) |
| | [inline, protected, virtual] |
| virtual void GFXNullDevice::setTextureInternal |
( |
U32 |
textureUnit, |
|
|
const GFXTextureObject * |
texture | |
|
) |
| | [inline, protected, virtual] |
| virtual void GFXNullDevice::setLightInternal |
( |
U32 |
lightStage, |
|
|
const GFXLightInfo |
light, |
|
|
bool |
lightEnable | |
|
) |
| | [protected, virtual] |
| virtual void GFXNullDevice::setLightMaterialInternal |
( |
const GFXLightMaterial |
mat |
) |
[inline, protected, virtual] |
| virtual void GFXNullDevice::setGlobalAmbientInternal |
( |
ColorF |
color |
) |
[inline, protected, virtual] |
| virtual void GFXNullDevice::initStates |
( |
|
) |
[inline, protected, virtual] |
State initalization.
This MUST BE CALLED in setVideoMode after the device is created.
Implements GFXDevice.
This function must be implemented differently per API and it should set ONLY the current matrix.
For example, in OpenGL, there should be NO matrix stack activity, all the stack stuff is managed in the GFX layer.
OpenGL does not have separate world and view matrices. It has ModelView which is world * view. You must take this into consideration.
- Parameters:
-
| mtype | Which matrix to set, world/view/projection |
| mat | Matrix to assign |
Implements GFXDevice.
This allocates a vertex buffer and returns a pointer to the allocated buffer.
This function should not be called directly - rather it should be used by the GFXVertexBufferHandle class.
Implements GFXDevice.
This allocates a primitive buffer and returns a pointer to the allocated buffer.
A primitive buffer's type argument refers to the index data - the primitive data will always be preserved from call to call.
- Note:
- All index buffers use 16-bit indices.
Implements GFXDevice.
| virtual void GFXNullDevice::copyBBToSfxBuff |
( |
|
) |
[inline, virtual] |
| virtual GFXCubemap* GFXNullDevice::createCubemap |
( |
|
) |
[virtual] |
| virtual F32 GFXNullDevice::getFillConventionOffset |
( |
|
) |
const [inline, virtual] |
Get the fill convention for this device.
Implements GFXDevice.
| virtual GFXTextureTarget* GFXNullDevice::allocRenderToTextureTarget |
( |
|
) |
[inline, virtual] |
Allocate a target for doing render to texture operations, with no depth/stencil buffer.
Implements GFXDevice.
Allocate a target for a given window.
Implements GFXDevice.
| virtual void GFXNullDevice::pushActiveRenderTarget |
( |
|
) |
[inline, virtual] |
Save current render target states - note this works with MRT's.
Reimplemented from GFXDevice.
| virtual void GFXNullDevice::popActiveRenderTarget |
( |
|
) |
[inline, virtual] |
Restore all render targets - supports MRT's.
Reimplemented from GFXDevice.
| virtual void GFXNullDevice::setActiveRenderTarget |
( |
GFXTarget * |
target |
) |
[inline, virtual] |
Start rendering to to a specified render target.
Implements GFXDevice.
| virtual GFXTarget* GFXNullDevice::getActiveRenderTarget |
( |
|
) |
[inline, virtual] |
Return a pointer to the current active render target.
Reimplemented from GFXDevice.
| virtual F32 GFXNullDevice::getPixelShaderVersion |
( |
|
) |
const [inline, virtual] |
| virtual void GFXNullDevice::setPixelShaderVersion |
( |
F32 |
version |
) |
[inline, virtual] |
| virtual U32 GFXNullDevice::getNumSamplers |
( |
|
) |
const [inline, virtual] |
Returns the number of texture samplers that can be used in a shader rendering pass.
Implements GFXDevice.
| virtual GFXShader* GFXNullDevice::createShader |
( |
const char * |
vertFile, |
|
|
const char * |
pixFile, |
|
|
F32 |
pixVersion, |
|
|
const Vector< GFXShaderMacro > & |
macros | |
|
) |
| | [inline, virtual] |
Creates a shader.
- Parameters:
-
| vertFile | Vertex shader filename |
| pixFile | Pixel shader filename |
| pixVersion | Pixel shader version |
| macros | Macros passed to the shader compiler. |
Implements GFXDevice.
| virtual void GFXNullDevice::clear |
( |
U32 |
flags, |
|
|
ColorI |
color, |
|
|
F32 |
z, |
|
|
U32 |
stencil | |
|
) |
| | [inline, virtual] |
| virtual bool GFXNullDevice::beginSceneInternal |
( |
|
) |
[inline, virtual] |
| virtual void GFXNullDevice::endSceneInternal |
( |
|
) |
[inline, virtual] |
| virtual void GFXNullDevice::drawIndexedPrimitive |
( |
GFXPrimitiveType |
primType, |
|
|
U32 |
minIndex, |
|
|
U32 |
numVerts, |
|
|
U32 |
startIndex, |
|
|
U32 |
primitiveCount | |
|
) |
| | [inline, virtual] |
| virtual void GFXNullDevice::setViewport |
( |
const RectI & |
rect |
) |
[inline, virtual] |
| virtual const RectI& GFXNullDevice::getViewport |
( |
|
) |
const [inline, virtual] |
| virtual void GFXNullDevice::setClipRect |
( |
const RectI & |
rect |
) |
[inline, virtual] |
| virtual const RectI& GFXNullDevice::getClipRect |
( |
|
) |
const [inline, virtual] |
| virtual void GFXNullDevice::preDestroy |
( |
|
) |
[inline, virtual] |
This is called before this, or any other device, is deleted in the global destroy() method.
It allows the device to clean up anything while everything is still valid.
Reimplemented from GFXDevice.
| virtual U32 GFXNullDevice::getMaxDynamicVerts |
( |
|
) |
[inline, virtual] |
| virtual U32 GFXNullDevice::getMaxDynamicIndices |
( |
|
) |
[inline, virtual] |
| GFXFence* GFXNullDevice::createFence |
( |
|
) |
[inline, virtual] |
Allocate a fence.
The API specific implementation of GFXDevice is responsible to make sure that the proper type is used. GFXGeneralFence should work in all cases.
Implements GFXDevice.
Member Data Documentation
|