#include <RendererTypes.h>
Public Member Functions | |
virtual BOOL | CreateTextureImage (DWORD width, DWORD height, DWORD levels, EnumGraphicFormat format, EnumGraphicPool pool, TRendererTextureImage **texture)=0 |
Creates image texture as MANAGED or in RAM. | |
virtual BOOL | CreateTextureImageDynamic (DWORD width, DWORD height, EnumGraphicFormat format, TRendererTextureImage **texture)=0 |
Creates DYNAMIC image texture. | |
virtual BOOL | CreateTextureImageAsRenderTarget (DWORD width, DWORD height, DWORD levels, EnumGraphicFormat format, TRendererTextureImage **texture)=0 |
Creates image texture as rendertarget. | |
virtual BOOL | CreateTextureCube (DWORD length, DWORD levels, EnumGraphicFormat format, EnumGraphicPool pool, TRendererTextureCube **texture)=0 |
Creates cubemap texture as MANAGED or in RAM. | |
virtual BOOL | CreateTextureCubeAsRenderTarget (DWORD length, DWORD levels, EnumGraphicFormat format, TRendererTextureCube **texture)=0 |
Creates cubemap texture in VIDEO memory as render target. | |
virtual BOOL | SetTexture (DWORD stage, TRendererTexture *texture)=0 |
Sets texture to given texture stage. | |
virtual BOOL | GetTexture (DWORD stage, TRendererTexture **texture)=0 |
Gets texture from given texture stage. | |
virtual BOOL | UpdateTextureImage (TRendererTextureImage *destination, const TGraphicTexture *source) const =0 |
Updates entire renderer texture from software texture. | |
virtual BOOL | UpdateTextureImageDynamic (TRendererTextureImage *destination, const TGraphicTexture *source) const =0 |
Updates entire renderer dynamic texture from software texture. | |
virtual BOOL | ReadTextureImage (TGraphicTexture *destination, TRendererTextureImage *source) const =0 |
Reads data from entire renderer texture and store it in software texture. | |
virtual BOOL | UpdateTextureCube (EnumGraphicCubemapFaces face, TRendererTextureCube *destination, const TGraphicTexture *source) const =0 |
Updates specified side of cubemap with data from software texture. | |
virtual BOOL | ReadTextureCube (EnumGraphicCubemapFaces face, TGraphicTexture *destination, TRendererTextureCube *source) const =0 |
Reads data from specified side of renderer cubemap texture and store it in software texture. | |
virtual BOOL | UpdateRenderTargetTextureImage (TRendererTextureImage *destination, TRendererTextureImage *source) const =0 |
Updates entire renderer render-target texture with data from texture created in RAM pool. | |
virtual BOOL | ReadRenderTargetTextureImage (TRendererTextureImage *destination, TRendererTextureImage *source) const =0 |
Reads entire renderer render-target texture and data store into texture created in RAM pool. | |
virtual BOOL | UpdateRenderTargetTextureCube (EnumGraphicCubemapFaces face, TRendererTextureCube *destination, TRendererTextureImage *source) const =0 |
Updates one side from render-target cubemap texture with data from texture created in RAM pool. | |
virtual BOOL | ReadRenderTargetTextureCube (EnumGraphicCubemapFaces face, TRendererTextureImage *destination, TRendererTextureCube *source) const =0 |
Reads one side from render-target texture and data store into texture created in RAM pool. | |
virtual BOOL | CreateSurfaceAsDepthStencil (DWORD width, DWORD height, EnumGraphicFormat format, TRendererSurface **surface)=0 |
This method creates surface which may be used as depth-stencil buffer in renderer. | |
virtual BOOL | CreateSurfaceAsRenderTarget (DWORD width, DWORD height, EnumGraphicFormat format, TRendererSurface **surface)=0 |
This method creates surface which may be used as render-target surface in renderer. | |
virtual BOOL | CreateSurfaceAsImage (DWORD width, DWORD height, EnumGraphicFormat format, TRendererSurface **surface)=0 |
This method creates surface in system RAM which may be used as source for update operations. | |
virtual BOOL | GetRenderTarget (TRendererSurface **surface)=0 |
Gets pointer to actual render-target which is used in renderer. | |
virtual BOOL | SetRenderTarget (TRendererSurface *surface)=0 |
Sets new render-target to renderer. | |
virtual BOOL | GetDepthStencil (TRendererSurface **surface)=0 |
Gets pointer to actual depth-stencil surface which is used in renderer. | |
virtual BOOL | SetDepthStencil (TRendererSurface *surface)=0 |
Sets new depth-stencil surface to renderer. | |
virtual BOOL | IsDepthStencilCompatible (TRendererSurface *surface) const =0 |
This method only checks whether specified surface may be used as depth-stencil surface with actual render-target. | |
virtual BOOL | IsRenderTargetCompatible (TRendererSurface *surface) const =0 |
This method only checks whether specified surface may be used as render-target surface with actual depth-stencil surface. | |
virtual BOOL | UpdateSurface (TRendererSurface *destination, const TGraphicSurface *source) const =0 |
Copy data from software surface (TGraphicSurface) into renderer surface. | |
virtual BOOL | UpdateSurfaceDynamic (TRendererSurface *destination, const TGraphicSurface *source) const =0 |
Update entire dynamic surface. | |
virtual BOOL | UpdateSurfaceRect (TRendererSurface *destination, const TGraphicSurface *source, const TRect *dest_rect, const TRect *src_rect) const =0 |
Copy data from specified rectangle on software surface (TGraphicSurface) into specified rectangle renderer surface. | |
virtual BOOL | ReadSurface (TGraphicSurface *destination, TRendererSurface *source) const =0 |
Copy data from renderer surface into software surface (TGraphicSurface). | |
virtual BOOL | ReadSurfaceRect (TGraphicSurface *destination, TRendererSurface *source, const TRect *dest_rect, const TRect *src_rect) const =0 |
Copy data from specified rectangle on renderer surface into specified rectangle in software surface (TGraphicSurface). | |
virtual BOOL | UpdateRenderTargetSurface (TRendererSurface *destination, TRendererSurface *source) const =0 |
Update surface created as render-target in VIDEO memory from surface created in RAM memory. | |
virtual BOOL | ReadRenderTargetSurface (TRendererSurface *destination, TRendererSurface *source) const =0 |
Read data from surface created as render-target in VIDEO memory and save it into surface created in RAM memory. | |
virtual BOOL | CreateVertexBuffer (DWORD vertexSize, DWORD numberVertices, BOOL isStatic, TRendererVertexBuffer **vertexBuffer)=0 |
This method creates vertex buffer. | |
virtual BOOL | CreateIndexBuffer (DWORD numberIndices, BOOL isStatic, TRendererIndexBuffer **indexBuffer)=0 |
This method creates 16-bits index buffer. | |
virtual BOOL | SetVertexBuffer (TRendererVertexBuffer *vertexBuffer)=0 |
Sets new vertex buffer to renderer. | |
virtual BOOL | SetIndexBuffer (TRendererIndexBuffer *indexBuffer)=0 |
Sets new index buffer to renderer. | |
virtual BOOL | GetVertexBuffer (TRendererVertexBuffer **vertexBuffer)=0 |
Gets pointer to vertex buffer stored in renderer. | |
virtual BOOL | GetIndexBuffer (TRendererIndexBuffer **indexBuffer)=0 |
Gets pointer to index buffer stored in renderer. | |
virtual BOOL | UpdateVertexBuffer (TRendererVertexBuffer *vertexBuffer, void *data, DWORD startVertex, DWORD vertices)=0 |
Updates vertex buffer. | |
virtual BOOL | DiscardDynamicVertexBuffer (TRendererVertexBuffer *vertexBuffer, void *data, DWORD startVertex, DWORD vertices)=0 |
This method update dynamic vertex buffer thus cannot be used for static vertex buffers. | |
virtual BOOL | AddToDynamicVertexBuffer (TRendererVertexBuffer *vertexBuffer, void *data, DWORD vertices)=0 |
This method updates dynamic vertex buffer thus cannot be used for static vertex buffer. | |
virtual BOOL | UpdateIndexBuffer (TRendererIndexBuffer *indexBuffer, void *data, DWORD startIndex, DWORD indices)=0 |
Updates index buffer. | |
virtual BOOL | DiscardDynamicIndexBuffer (TRendererIndexBuffer *indexBuffer, void *data, DWORD startIndex, DWORD indices)=0 |
This method update dynamic index buffer thus cannot be used for static index buffers. | |
virtual BOOL | AddToDynamicIndexBuffer (TRendererIndexBuffer *indexBuffer, void *data, DWORD indices)=0 |
This method updates dynamic index buffer thus cannot be used for static index buffer. | |
virtual BOOL | CreateVertexShader (const char *buffer, const DWORD &size, TRendererVertexShader **shader)=0 |
Creates vertex shader from specified string of bytes which represent compiled shader in bytecode. | |
virtual BOOL | CreatePixelShader (const char *buffer, const DWORD &size, TRendererPixelShader **shader)=0 |
Creates pixel shader from specified string of bytes which represents compiled shader in bytecode. | |
virtual BOOL | SetVertexShader (TRendererVertexShader *shader)=0 |
Sets new vertex shader to renderer. | |
virtual BOOL | SetPixelShader (TRendererPixelShader *shader)=0 |
Sets new pixel shader to renderer. | |
virtual BOOL | GetVertexShader (TRendererVertexShader **shader)=0 |
Gets pointer to vertex shader stored in renderer. | |
virtual BOOL | GetPixelShader (TRendererPixelShader **shader)=0 |
Gets pointer to pixel shader stored in renderer. | |
virtual BOOL | SetVertexShaderConstantFloat (DWORD startBank, DWORD bankCount, const float *bankArray)=0 |
This method set vertex shader constants to float shader registers. | |
virtual BOOL | SetPixelShaderConstantFloat (DWORD startBank, DWORD bankCount, const float *bankArray)=0 |
This method set pixel shader constants to float shader registers. | |
virtual BOOL | GetVertexShaderConstantFloat (DWORD startBank, DWORD bankCount, float *bankArray)=0 |
This method get vertex shader constants from float shader registers. | |
virtual BOOL | GetPixelShaderConstantFloat (DWORD startBank, DWORD bankCount, float *bankArray)=0 |
This method get pixel shader constants from float shader registers. | |
virtual BOOL | AssembleVertexShader (const char *filename, TRendererVertexShader **shader)=0 |
Creates vertex shader from specified file which contains vertex shader in assembler. | |
virtual BOOL | AssembleVertexShader (const char *data, const DWORD &dataSize, TRendererVertexShader **shader)=0 |
Creates vertex shader from specified array of bytes. | |
virtual BOOL | CompileVertexShader (const char *filename, const char *funcName, EnumGraphicVertexShaderVersion version, TRendererVertexShader **shader)=0 |
Creates vertex shader from specified file which contains vertex shader in shader language. | |
virtual BOOL | CompileVertexShader (const char *data, const DWORD &dataSize, const char *funcName, EnumGraphicVertexShaderVersion version, TRendererVertexShader **shader)=0 |
Creates vertex shader from specified array of bytes which contains vertex shader in shader language. | |
virtual BOOL | AssemblePixelShader (const char *filename, TRendererPixelShader **shader)=0 |
Creates pixel shader from specified file which contains pixel shader in assembler. | |
virtual BOOL | AssemblePixelShader (const char *data, const DWORD &dataSize, TRendererPixelShader **shader)=0 |
Creates pixel shader from specified array of bytes. | |
virtual BOOL | CompilePixelShader (const char *filename, const char *funcName, EnumGraphicPixelShaderVersion version, TRendererPixelShader **shader)=0 |
Creates vertex shader from specified file which contains vertex shader in shader language. | |
virtual BOOL | CompilePixelShader (const char *data, const DWORD &dataSize, const char *funcName, EnumGraphicPixelShaderVersion version, TRendererPixelShader **shader)=0 |
Creates pixel shader from specified array of bytes which contains pixel shader in shader language. | |
virtual BOOL | CreateVertexDeclaration (const TRendererVertexElementArray *elements, TRendererVertexDeclaration **declaration)=0 |
Creates vertex declaration. | |
virtual BOOL | SetVertexDeclaration (TRendererVertexDeclaration *declaration)=0 |
Sets vertex declaration to renderer. | |
virtual BOOL | GetVertexDeclaration (TRendererVertexDeclaration **declaration)=0 |
Gets pointer to vertex declaration stored in renderer. | |
virtual BOOL | SetRenderState (EnumGraphicRenderState state, DWORD value)=0 |
This method set specified renderer state value. | |
virtual BOOL | GetRenderState (EnumGraphicRenderState state, DWORD *value)=0 |
This method get specified renderer state value. | |
virtual BOOL | SetSamplerState (DWORD sampler, EnumGraphicSamplerState state, DWORD value)=0 |
This method set specified sampler state. | |
virtual BOOL | GetSamplerState (DWORD sampler, EnumGraphicSamplerState state, DWORD *value)=0 |
This method get specified sampler state. | |
virtual BOOL | BeginScene (void)=0 |
This method begins rendering of current frame. | |
virtual BOOL | EndScene (void)=0 |
This method finishes rendering to back buffer. | |
virtual EnumRetValue | Present (void)=0 |
This method flip backbuffer to front buffer and scene is displayed at screen. | |
virtual BOOL | Clear (BOOL renderTarget, BOOL depth, BOOL stencil, TColor colorValue, float zValue, DWORD stencilValue)=0 |
This method clears actual render target, depth and stencil surface. | |
virtual BOOL | DrawTriangleList (DWORD triangles, DWORD zeroVertex, DWORD firstIndexInIB, DWORD firstVertexIndexInVB, DWORD verticesProceeded)=0 |
This method draws triangle list with using actually set VB,IB and vertex declaration. | |
virtual BOOL | DrawTriangleStrip (DWORD triangles, DWORD zeroVertex, DWORD firstIndexInIB, DWORD firstVertexIndexInVB, DWORD verticesProceeded)=0 |
This method draws triangle strip with using actually set VB,IB and vertex declaration. | |
virtual BOOL | DrawLineList (DWORD lines, DWORD zeroVertex, DWORD firstIndexInIB, DWORD firstVertexIndexInVB, DWORD verticesProceeded)=0 |
This method draws line list with using actually set VB,IB and vertex declaration. | |
virtual BOOL | DrawLineStrip (DWORD lines, DWORD zeroVertex, DWORD firstIndexInIB, DWORD firstVertexIndexInVB, DWORD verticesProceeded)=0 |
This method draws line strip with using actually set VB,IB and vertex declaration. | |
virtual BOOL | DrawNIPointList (DWORD points, DWORD startVertex)=0 |
This method renders list of points without index buffer (non-indexed rendering). | |
virtual BOOL | DrawNITriangleList (DWORD triangles, DWORD startVertex)=0 |
This method renders list of triangles without index buffer (non-indexed rendering). | |
virtual BOOL | DrawNITriangleStrip (DWORD triangles, DWORD startVertex)=0 |
This method renders strip of triangles without index buffer (non-indexed rendering). | |
virtual BOOL | DrawNILineList (DWORD lines, DWORD startVertex)=0 |
This method renders list of lines without index buffer (non-indexed rendering). | |
virtual BOOL | DrawNILineStrip (DWORD lines, DWORD startVertex)=0 |
This method renders strip of lines without index buffer (non-indexed rendering). | |
virtual BOOL | IsFormatCompressed (EnumGraphicFormat format) const =0 |
Determines whether specified renderer format is compressed. | |
virtual DWORD | GetFormatBlockSize (EnumGraphicFormat format) const =0 |
Returns size of compressed format's block. | |
virtual DWORD | GetWidth (void) const =0 |
Returns resolution width. | |
virtual DWORD | GetHeight (void) const =0 |
Returns resolution height. | |
virtual DWORD | GetRefreshRate (void) const =0 |
Returns display refresh rate. | |
virtual BOOL | EvictManagedResources (void)=0 |
Calling this method causes all resources allocated as MANAGED will be copy to system memory thus VIDEO memory will be contains only resourcs allocated in VIDEO memory. | |
virtual EnumGraphicVertexShaderVersion | GetVertexShaderVersion (void) const =0 |
Return used vertex shader version. | |
virtual EnumGraphicPixelShaderVersion | GetPixelShaderVersion (void) const =0 |
Return used pixel shader version. | |
virtual DWORD | GetVertexShaderRegisterBanks (void) const =0 |
Return number of vertex shader float constant registers. | |
virtual DWORD | GetPixelShaderRegisterBanks (void) const =0 |
Return number of pixel shader float constant registers. | |
virtual DWORD | GetSamplerCount (void) const =0 |
Return number of texture samplers in this device. | |
virtual const TRendererCaps * | GetCaps (void) const =0 |
Return pointer to structure with information about device capabilites. | |
virtual DWORD | GetVertexBufferCount (void) const =0 |
This method returns number of allocated vertex buffer. | |
virtual DWORD | GetIndexBufferCount (void) const =0 |
This method returns number of allocated index buffer. | |
virtual DWORD | GetTexturesCount (void) const =0 |
This method returns number of allocated textures. | |
virtual DWORD | GetSurfacesCount (void) const =0 |
This method returns number of allocated surfaces. | |
virtual DWORD | GetVertexShaderCount (void) const =0 |
This method returns number of allocated vertex shaders. | |
virtual DWORD | GetPixelShaderCount (void) const =0 |
This method returns number of allocated pixel shaders. | |
virtual DWORD | GetDeclarationsCount (void) const =0 |
This method returns number of allocated vertex declarations. | |
virtual DWORD | GetVideoResources (void) const =0 |
This method returns number of resources allocated in VIDEO memory. | |
virtual DWORD | GetManagedResources (void) const =0 |
This method returns number of resources allocated in MANAGED memory. | |
virtual DWORD | GetRAMResources (void) const =0 |
This method returns number o resources allocated in RAM memory. | |
virtual EnumRendererType | GetRendererType (void) const =0 |
Returns type of renderer. | |
virtual EnumRetValue | Reset (void)=0 |
This method resets renderer from lost state into operational state. | |
virtual EnumRetValue | ChangeResolution (DWORD width, DWORD height, DWORD refreshRate, BOOL window)=0 |
Change renderer display mode. | |
virtual EnumRetValue | SwapWindowMode (void)=0 |
Change from fullscreen to window mode and vice versa. | |
virtual BOOL | IsFullscreen (void) const =0 |
Determines whether application runs in fullscreen. | |
virtual EnumRetValue | GetState (void)=0 |
Returns renderer status. | |
virtual BOOL | IsDebugMode (void) const =0 |
Determines whether render is in DEBUG mode. | |
virtual BOOL | IsRetailMode (void) const =0 |
Determines whether render is in RETAIL mode. | |
virtual BOOL | Release (BOOL force=FALSE)=0 |
This method releases renderer if no resources are already allocated. |
This class is pure virtual.
TRenderer object may be created only via TRendererCreator object. Each TRendererCreator object may create only one TRenderer object and may be destroyed only after this TRenderer object is destroyed.
Definition at line 1660 of file RendererTypes.h.
|
This method updates dynamic index buffer thus cannot be used for static index buffer. Method adds data after last valid index in IB, but there must be enough space (see TRendererIndexBuffer::GetFreeCapacity()). If there isn't enough space for vertices then FASLE is returned. In this case you should add data to index buffer via calling TRendererIndexBuffer::DiscardDynamicIndexBuffer(), but be carefull, this method destroys previous data in index buffer!!!
|
|
This method updates dynamic vertex buffer thus cannot be used for static vertex buffer. Method adds data after last valid vertex in VB, but there must be enough space (see TRendererVertexBuffer::GetFreeCapacity()). If there isn't enough space for vertices then FASLE is returned. In this case you should add data to vertex buffer via calling TRendererVertexBuffer::DiscardDynamicVertexBuffer(), but be carefull, this method destroys previous data in vertex buffer.
|
|
Creates pixel shader from specified array of bytes. This array contains pixel shader in assembler load from file or resource.
|
|
Creates pixel shader from specified file which contains pixel shader in assembler.
|
|
Creates vertex shader from specified array of bytes. This array contains vertex shader in assembler load from file or resource.
|
|
Creates vertex shader from specified file which contains vertex shader in assembler.
|
|
This method begins rendering of current frame. In one frame should be only one calling of this type. Rendering is finished by calling EndScene() and presented to front buffer with Present(). In block BeginScene() and EndScene() you can change render targets for rendering to textures etc. thus no more than one this block is required This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Change renderer display mode. Before calling this method all resources created in VIDEO memory must be released. This method always returns valid values.
|
|
This method clears actual render target, depth and stencil surface. It's good habit clear all surfaces together, especially depth and stencil, which are stored together on today graphic hardware. Method should clear only these surface which are created, if method clears nonxistent surface error may occured. This method always returns valid values - in DEBUG and RETAIL mode.
Referenced by MainLoop(). |
|
Creates pixel shader from specified array of bytes which contains pixel shader in shader language. For this renderer shader language must be HLSL.
|
|
Creates vertex shader from specified file which contains vertex shader in shader language. For this renderer shder language must be HLSL.
|
|
Creates vertex shader from specified array of bytes which contains vertex shader in shader language. For this renderer shader language must be HLSL.
|
|
Creates vertex shader from specified file which contains vertex shader in shader language. For this renderer shder language must be HLSL.
|
|
This method creates 16-bits index buffer. All index buffers are created in VIDEO memory and are write-only. When renderer is lost then application must restore contents of index buffer!!! Application also may create dynamic index buffer which may be useful for dynamic data. This method always returns valid values - IN DEBUG and RETAIL mode.
|
|
Creates pixel shader from specified string of bytes which represents compiled shader in bytecode. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method creates surface which may be used as depth-stencil buffer in renderer. Depth-stencil surfaces are always create in VIDEO memory and NEVER are lockable and there is no way how to read data from depth-stencil surface. Depth-stencil surface size needn't be square. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method creates surface in system RAM which may be used as source for update operations. This type of surface is ALWAYS lockable. This surface can create only format compatible with texture format (no render targets or depth-stencil formats) This surface may have arbitrary dimensions but compressed formats must be power of 2 (most often compressed formats are not supported for plain surface - see CheckSurfaceFormat() in TRendererCaps structure) This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method creates surface which may be used as render-target surface in renderer. Depth-stencil surfaces are always create in VIDEO memory and NEVER are lockable. Compressed formats cannot be never used as render-target! This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Creates cubemap texture as MANAGED or in RAM. This method cannot create texture in VIDEO memory! Thus textures created by this method are ALWAYS lockable. Texture dimensions must be equal to power of two! This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Creates cubemap texture in VIDEO memory as render target. Format must be compatible with render target. Thus textures created by this method are NEVER lockable. This methods always returns valid values - in DEBUG and RETAIL mode.
|
|
Creates image texture as MANAGED or in RAM. This method cannot create texture in VIDEO memory! Thus textures created by this method are ALWAYS lockable. All texture formats must have dimension power of 2, but needn't be square (for example 512x256 is valid). This methods return valid values in DEBUG and RETAIL mode!
|
|
Creates image texture as rendertarget. This method create texture always in VIDEO memory! Thus textures created by this method are NEVER lockable. Texture dimensions must be equal to power of two! This method returns always valid values in toth modes - DEBUG and RETAIL.
|
|
Creates DYNAMIC image texture. This texture is always created in VIDEO pool and has only one surface Thus textures created by this method are ALWAYS lockable. All texture formats must have dimension power of 2, but needn't be square (for example 512x256 is valid). This methods return valid values in DEBUG and RETAIL mode!
|
|
This method creates vertex buffer. All vertex buffers are created in VIDEO memory and are write-only. When renderer is lost then application must restore contents of vertex buffer!!! Application also may create dynamic vertex buffer which may be useful for dynamic data. This method always returns valid values - IN DEBUG and RETAIL mode.
|
|
Creates vertex declaration. This method always return valid values - in DEBUG and RETAIN mode.
|
|
Creates vertex shader from specified string of bytes which represent compiled shader in bytecode. This method always return valid values - in DEBUG and RETAIL mode.
|
|
This method update dynamic index buffer thus cannot be used for static index buffers. After calling this method previous data in buffer are destroyed, but this method doesnt wait for device, thus device can render from previous index buffer and method copy data to new allocated buffer, which replace old buffer after rendering operation. It's good idea set STARTINDEX to 0 and INDICES to TRendererIndexxBuffer::GetCapacity(), but at this moment DATA must contain enough data bytes. If STARTINDEX or INDICES parameter do not cover entire buffer then there will be undefined areas in index buffer. Last valid index (method TRendererIndexBuffer::GetIndicesCount()) is set always to (startIndexx+indices).
|
|
This method update dynamic vertex buffer thus cannot be used for static vertex buffers. After calling this method previous data in buffer are destroyed, but this method doesnt wait for device, thus device can render from previous vertex buffer and method copy data to new allocated buffer, which replace old buffer after rendering operation. It's good idea set STARTVERTEX to 0 and VERTICES to TRendererVertexBuffer::GetCapacity(), but at this moment DATA must contain enough data bytes. If STARTVERTEX or VERTICES parameter do not cover entire buffer then there will be undefined areas in vertex buffer. Last valid vertex (method TRendererVertexBuffer::GetVerticesCount()) is set always to (startVertex+vertices).
|
|
This method draws line list with using actually set VB,IB and vertex declaration. If VB,IB or vertex declaration are not presented, then error occurs. This method returns valid values only in DEBUG mode, in RETAIL mode always return TRUE
|
|
This method draws line strip with using actually set VB,IB and vertex declaration. If VB,IB or vertex declaration are not presented, then error occurs. This method returns valid values only in DEBUG mode, in RETAIL mode always return TRUE
|
|
This method renders list of lines without index buffer (non-indexed rendering).
|
|
This method renders strip of lines without index buffer (non-indexed rendering).
|
|
This method renders list of points without index buffer (non-indexed rendering).
|
|
This method renders list of triangles without index buffer (non-indexed rendering).
|
|
This method renders strip of triangles without index buffer (non-indexed rendering).
|
|
This method draws triangle list with using actually set VB,IB and vertex declaration. If VB,IB or vertex declaration are not presented, then error occurs. This method returns valid values only in DEBUG mode, in RETAIL mode always return TRUE
|
|
This method draws triangle strip with using actually set VB,IB and vertex declaration. If VB,IB or vertex declaration are not presented, then error occurs. This method returns valid values only in DEBUG mode, in RETAIL mode always return TRUE
|
|
This method finishes rendering to back buffer. It must be called only after successfull calling BeginScene(). This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Calling this method causes all resources allocated as MANAGED will be copy to system memory thus VIDEO memory will be contains only resourcs allocated in VIDEO memory. Thus is useful for correct resource-allocation strategy where VIDEO resources should be allocated first in row without fragmentation. While you allocating an resource in VIDEO memory you should call this method. Example: You have allocated some resources in VIDEO memory: VRES1,VRES2,EMPTY,EMPTY,... Now you create managed resources and at time of its first use it will be copy to VIDEO memory: VRES1,VRES2,MRES1,EMPTY,... Now you want create next VIDEO resources, but if you don't call this method memory will be like this: VRES1,VRES2,MRES1,VRES3,... If you use EvictManagedResources situation will be like this: VRES1,VRES2,VRES3,EMPTY,... // MRES1 was copy to RAM and video memory was deallocated When you use MRES1 it will be copied into VIDEO memory thus situation will look like this: VRES1,VRES2,VRES3,MRES1,... This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Return pointer to structure with information about device capabilites.
|
|
This method returns number of allocated vertex declarations.
|
|
Gets pointer to actual depth-stencil surface which is used in renderer. Renderer must have always set depth-stencil thus if method returns FALSE then critical error occured! This method always returns valid value - in DEBUG and RETAIL mode.
|
|
Returns size of compressed format's block. For non-compressed format size of one block is always 1x1, thus returns 1. But for example DXTn formats have size of block equal to 4x4 (4 is returned). This size determines allowed dimension of created textures and surfaces and also size of locked rectangles on surfaces. For example size of DXTn surface must be multiply of 4 and format may be locked only at 4x4 boundary - for size 1x1 DXTn you must use 4x4 rect to lock too!
|
|
Returns resolution height.
|
|
Gets pointer to index buffer stored in renderer. This method automatically increase number of references to returned index buffer. This method always return TRUE in RETAIL mode, in DEBUG mode FALSE is returned if address of pointer is invalid
|
|
This method returns number of allocated index buffer.
|
|
This method returns number of resources allocated in MANAGED memory.
|
|
Gets pointer to pixel shader stored in renderer. This method automatically increase number of references to returned pixel shader. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method get pixel shader constants from float shader registers. Shader registers are organised into banks, where each bank contains four float values. You must get constant registers in entire banks, thus array bankArray must have size multiple of 4. See GetPixelShaderRegisterBanks() method. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method returns number of allocated pixel shaders.
|
|
Return number of pixel shader float constant registers.
|
|
Return used pixel shader version.
|
|
This method returns number o resources allocated in RAM memory.
|
|
Returns display refresh rate.
|
|
Returns type of renderer.
|
|
This method get specified renderer state value. For information about state types and their values see EnumGraphicRenderState. This method always returns TRUE in DEBUG and RETAIL mode.
|
|
Gets pointer to actual render-target which is used in renderer. Renderer must have always set render-target thus if method returns FALSE then critical error occured! This method always returns valid value - in DEBUG and RETAIL mode.
|
|
Return number of texture samplers in this device.
|
|
This method get specified sampler state. For information about sampler state types and their values see EnumGraphicSamplerState. This method returns valid values only in DEBUG mode, in RETAIL mode always returns TRUE.
|
|
Returns renderer status. Calling this method may determine if renderer is lost or if is prepared for reset or rendering.
|
|
This method returns number of allocated surfaces.
|
|
Gets texture from given texture stage. See GetTextureStagesCount(). This method increase number of references to texture. If given stage has no set texture then NULL is returned. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method returns number of allocated textures.
|
|
Gets pointer to vertex buffer stored in renderer. This method automatically increase number of references to returned vertex buffer. This method always return TRUE in RETAIL mode, in DEBUG mode FALSE is returned if address of pointer is invalid
|
|
This method returns number of allocated vertex buffer.
|
|
Gets pointer to vertex declaration stored in renderer. This method automatically increase number of references to returned vertex declaration. This method always return valid values - in DEBUG and RETAIN mode.
|
|
Gets pointer to vertex shader stored in renderer. This method automatically increase number of references to returned vertex shader. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method get vertex shader constants from float shader registers. Shader registers are organised into banks, where each bank contains four float values. You must get constant registers in entire banks, thus array bankArray must have size multiple of 4. See GetVertexShaderRegisterBanks() method. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method returns number of allocated vertex shaders.
|
|
Return number of vertex shader float constant registers.
|
|
Return used vertex shader version.
|
|
This method returns number of resources allocated in VIDEO memory. Initial value returned by this method must be 2, because there is always allocated render target and depth-stencil surface. Renderer may be reset ar resolution may be changed only if number of this is equal to 2 (no VIDEO resources allocated except render-target and depth-stencil which are deallocated automatically by reset method etc.). |
|
Returns resolution width.
|
|
Determines whether render is in DEBUG mode.
|
|
This method only checks whether specified surface may be used as depth-stencil surface with actual render-target. This method always returns valid value - in DEBUG and RETAIL mode.
|
|
Determines whether specified renderer format is compressed.
|
|
Determines whether application runs in fullscreen.
|
|
This method only checks whether specified surface may be used as render-target surface with actual depth-stencil surface.
|
|
Determines whether render is in RETAIL mode.
|
|
This method flip backbuffer to front buffer and scene is displayed at screen. This method mustn't be called in block BeginScene()/EndScene(). This method always returns valid values.
Referenced by MainLoop(). |
|
Read data from surface created as render-target in VIDEO memory and save it into surface created in RAM memory. This is the only one way how to read data from render-target surface in VIDEO memory. Both surfaces must have identical pixel format and dimensions! This method always returns valid values. Source and destination surface cannot be identical.
|
|
Reads one side from render-target texture and data store into texture created in RAM pool. Source texture must be render-target type, thus must be created in VIDEO pool. Destination texture must be created in RAM memory. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. This method call methods for surface updating.
|
|
Reads entire renderer render-target texture and data store into texture created in RAM pool. Source texture must be render-target type, thus must be created in VIDEO pool. Destination texture must be created in RAM memory. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. This method call methods for surface updating.
|
|
Copy data from renderer surface into software surface (TGraphicSurface). Both surfaces must have the same pixelformat and size. Source surface must be lockable - see TRendererSurface::IsLockable() method. It means that must be created as MANAGED or in RAM. Surfaces stored in VIDEO memory cannot be readed with this method. \TODO link to method to read other surfaces This method always returns valid values.
|
|
Copy data from specified rectangle on renderer surface into specified rectangle in software surface (TGraphicSurface). Both surfaces must have the same pixelformat, size may be different, but size of both rectangles must be identical and both rectangles must be inside their surfaces. Source surface must be lockable - see TRendererSurface::IsLockable() method. It means that must be created as MANAGED or in RAM. Surfaces stored in VIDEO memory cannot be read with this method. This method always returns valid values.
|
|
Reads data from specified side of renderer cubemap texture and store it in software texture. Renderer texture must be lockable!!! Both textures must have identical format, number mipmap levels and dimensions for each mipmap. Destination texture must be valid - see TGraphicSurface::IsLoaded() method. This method call methods for surface updating.
|
|
Reads data from entire renderer texture and store it in software texture. Renderer texture must be lockable!!! Both textures must have identical format, number mipmap levels and dimensions for each mipmap. Destination texture must be valid - see TGraphicSurface::IsLoaded() method. This method calls methods for surface updating.
|
|
This method releases renderer if no resources are already allocated. Before calling this method all resources should be released, only actual render-target and depth-stencil buffer may be active, thus number of VIDEO resources may be equal 2. This method always returns valid values - in DEBUG and RETAIL mode.
Referenced by TGlobalsGraphic::Destroy(). |
|
This method resets renderer from lost state into operational state. Before calling this method all resources created in VIDEO memory must be released. Only actual render-target and depth-stencil buffer may be allocated (thus GetVideoResources() method returns 2) This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Sets new depth-stencil surface to renderer. At first method check whether surface contains correct depth-stencil surface and if success, new depth-stencil is set. Old depth-stencil is released via Release() method. This method always returns valid value - in DEBUG and RETAIL mode.
|
|
Sets new index buffer to renderer. Old index buffer is released via Release() method. This method always returns valid values - IN DEBUG and RETAIL mode.
|
|
Sets new pixel shader to renderer. Old pixel shader is released via Release() method. This method returns valid values only in DEBUG mode - in RELEASE mode always return TRUE
|
|
This method set pixel shader constants to float shader registers. Shader registers are organised into banks, where each bank contains four float values. You must set constant registers in entire banks, thus array bankArray must have size multiple of 4. See GetPixelShaderRegisterBanks() method. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
This method set specified renderer state value. For information about state types and their values see EnumGraphicRenderState. This method return valid values only in DEBUG mode, in RETAIL mode always return TRUE
|
|
Sets new render-target to renderer. At first method check whether surface contains correct render-target and if success, new render-target is set. Old render-target is released via Release() method. This method always returns valid value - in DEBUG and RETAIL mode.
|
|
This method set specified sampler state. For information about sampler state types and their values see EnumGraphicSamplerState. This method returns valid values only in DEBUG mode, in RETAIL mode always returns TRUE
|
|
Sets texture to given texture stage. See GetTextureStagesCount(). This method increases number of references to texture in parameter if this is valid. If texture parameter is NULL then given texture stage has no texture. Old texture in given stage is released (via method Release()) If error occurs then state in given texture stage may be undefined, thus you must call this method again. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Sets new vertex buffer to renderer. Old vertex buffer is released via Release() method. If new VB is NULL old VB is released and into vertex buffer stream is set NULL (no VB) This method always returns valid values - IN DEBUG and RETAIL mode.
|
|
Sets vertex declaration to renderer. Old vertex declaration is released via Release() method (if exists). This method always return valid values - in DEBUG and RETAIN mode.
|
|
Sets new vertex shader to renderer. Old vertex shader is released via Release() method. This method returns valid values only in DEBUG mode - in RELEASE mode always return TRUE
|
|
This method set vertex shader constants to float shader registers. Shader registers are organised into banks, where each bank contains four float values. You must set constant registers in entire banks, thus array bankArray must have size multiple of 4. See GetPixelShaderRegisterBanks() method. This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Change from fullscreen to window mode and vice versa. Function may failed if backbuffer format doesnt support both display modes (fullscreen and window). This method always returns valid values - in DEBUG and RETAIL mode.
|
|
Updates index buffer. Index buffer may be static or dynamic. ITS RECOMMNEDED USE THIS METHOD ONLY FOR STATIC INDEX BUFFER, THERE ARE SPECIAL METHODS FOR DYNAMIC INDEX BUFFERS. In static buffer method check whether desired interval for indices <indexBuffer,indexBuffer+indices-1> is valid and then update this indices. In dynamic buffer method does the same and moreover it change information about number of valid indices in buffer (method TRendererIndexBuffer::GetIndicesCount()). New interval of valid indices is set as <0,startIndex+indices-1> (method TRendererVertexBuffer::GetIndicesCount() returns startIndex+indices) if original interval was less than new interval. In other case (original interval was higher) new interval is set to original interval - thus no change. Indices outside changed interval are staying unchanged. This method is only way how to change static index buffer, for dynamic buffer is its efficiency low, its better idea use specialized method for changing dynamic index buffers.
|
|
Update surface created as render-target in VIDEO memory from surface created in RAM memory. This is the only one way how to upload data into render-target surface in VIDEO memory. Both surfaces must have identical pixel format and dimensions! This method always returns valid values. Destination and source surface cannot be identical.
|
|
Updates one side from render-target cubemap texture with data from texture created in RAM pool. Destination texture must be render-target type, thus must be created in VIDEO pool. Source texture must be created in RAM memory. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. This method call methods for surface updating.
|
|
Updates entire renderer render-target texture with data from texture created in RAM pool. Destination texture must be render-target type, thus must be created in VIDEO pool. Source texture must be created in RAM memory. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. This method call methods for surface updating.
|
|
Copy data from software surface (TGraphicSurface) into renderer surface. Both surfaces must have the same pixelformat and size. Destination surface must be lockable - see TRendererSurface::IsLockable() method. It means that must be created as MANAGED or in RAM. Surfaces stored in VIDEO memory cannot be updated with this method. This method always returns valid values.
|
|
Update entire dynamic surface. This method directly call TRenderer::UpdateSurfaceDynamic method. This method can be called only on surface created as DYNAMIC (thus created in dynamic texture)
|
|
Copy data from specified rectangle on software surface (TGraphicSurface) into specified rectangle renderer surface. Both surfaces must have the same pixelformat, size may be different, but size of both rectangles must be identical and both rectabgles must be inside their surfaces. Destination surface must be lockable - see TRendererSurface::IsLockable() method. It means that must be created as MANAGED or in RAM. Surfaces stored in VIDEO memory cannot be updated with this method. This method always returns valid values.
|
|
Updates specified side of cubemap with data from software texture. Cubemap texture must be lockable!!! Both textures must have identical format, number mipmap levels and dimensions for each mipmap (side of cubemap). Source texture must be valid - see TGraphicSurface::IsLoaded() method. This method call methods for surface updating.
|
|
Updates entire renderer texture from software texture. Renderer texture must be lockable. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. Source texture must be valid - see TGraphicSurface::IsLoaded() method. This method calls methods for surface updating.
|
|
Updates entire renderer dynamic texture from software texture. Renderer texture must be lockable and dynamic!!! Source texture must be valid - see TGraphicSurface::IsLoaded() method. This method calls methods for surface updating.
|
|
Updates vertex buffer. Vertex buffer may be static or dynamic. ITS RECOMMNEDED USE THIS METHOD ONLY FOR STATIC VERTEX BUFFER, THERE ARE SPECIAL METHODS FOR DYNAMIC VERTEX BUFFERS. In static buffer method check whether desired interval for vertices <startVertex,startVertex+vertices-1> is valid and then update this vertices. In dynamic buffer method does the same and moreover it change information about number of valid vertices in vertex buffer (method TRendererVertexBuffer::GetVerticesCount()). New interval of valid vertices is set as <0,startVertex+vertices-1> (method TRendererVertexBuffer::GetVerticesCount() returns startVertex+vertices) if original interval was less than new interval. In other case (original interval was higher) new interval is set to original interval - thus no change. Vertices outside changed interval are staying unchanged. This method is only way how to change static vertex buffer, for dynamic buffer is its efficiency low, its better idea use specialized method for changing dynamic vertex buffers.
|