406 static TBOOL CreateVertexShader(
const DWORD* a_ShaderDeclaration,
const DWORD* a_pFunction, DWORD* a_pOutVertexShader );
462 void OnD3DDeviceLost();
467 void OnD3DDeviceFound();
470 IDirect3D8* m_pDirect3D;
471 IDirect3DDevice8* m_pDirectDevice;
472 D3DPRESENT_PARAMETERS m_PresentParams;
473 D3DSURFACE_DESC m_SurfaceDesk;
474 float m_fPixelAspectRatio;
475 HACCEL m_AcceleratorTable;
477 DISPLAYPARAMS m_oDisplayParams;
484 TBOOL m_bChangedColourSettings;
485 TBOOL m_bCheckedCapableColourCorrection;
486 TBOOL m_bCapableColourCorrection;
487 TBOOL m_bEnableColourCorrection;
488 D3DGAMMARAMP m_GammaRamp;
ADDRESSINGMODE
Texture addressing modes.
TEXCOORD
Texture coordinate types for addressing modes.
Rendering system interface for the Toshi engine.
#define TSTATICCAST(POINTERTYPE, VALUE)
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
#define TDECLARE_CLASS(THIS_CLASS, PARENT_CLASS)
static const TCHAR * GetErrorDescription(TINT32 a_eError)
Gets the error description for an error code.
virtual TBOOL Supports32BitTextures() OVERRIDE
Checks if 32-bit textures are supported.
virtual void DestroyDebugText() OVERRIDE
Destroys debug text.
virtual void RenderIndexPrimitive(TINT param_2, TINT param_3, TINT param_4, TINT param_5, TINT param_6, TINT param_7) OVERRIDE
Renders an indexed primitive.
virtual TBOOL Create() OVERRIDE
Creates the render interface.
virtual void FlushOrderTables() OVERRIDE
Flushes all order tables.
void RegisterOrderTable(TOrderTable *a_pOrderTable)
Registers an order table.
virtual TBOOL Destroy() OVERRIDE
Destroys the render interface and releases all resources.
void BuildAdapterDatabase()
Builds the adapter database.
virtual TBOOL SetPixelAspectRatio(float a_fPixelAspectRatio) OVERRIDE
Sets the pixel aspect ratio.
virtual void * CreateUnknown(const TCHAR *a_szName, TINT a_iUnk1, TINT a_iUnk2, TINT a_iUnk3) OVERRIDE
Creates an unknown object.
TFORCEINLINE TMSWindow * GetMSWindow()
Gets the MS window.
virtual TBOOL IsTextureFormatSupported(TINT a_eTextureFormat) OVERRIDE
Checks if a texture format is supported.
TFORCEINLINE IDirect3D8 * GetDirect3D() const
Gets the Direct3D interface.
static void PrintError(TINT32 a_eError, const TCHAR *a_szInfo)
Prints error text caused by some directx call.
virtual void UpdateColourSettings()
Updates color correction settings.
void ClearRegion(TINT a_iX, TINT a_iY, TINT a_iWidth, TINT a_iHeight, TUINT8 a_eClearFlags, TUINT8 a_uiColorR, TUINT8 a_uiColorG, TUINT8 a_uiColorB, TFLOAT a_fZ, TUINT a_uiStencil)
Clears a region of the screen.
virtual TBOOL RecreateDisplay(const DISPLAYPARAMS &a_rDisplayParams)
Recreates the display with new parameters.
virtual TBOOL IsCapableColourCorrection()
Checks if color correction is supported.
virtual void SetContrast(TFLOAT a_fConstrast)
Sets the contrast value.
virtual TBOOL IsColourCorrection()
Checks if color correction is enabled.
virtual TFLOAT GetBrightness() const
Gets the current brightness value.
virtual TRenderCapture * CreateCapture() OVERRIDE
Creates a new render capture.
virtual void ForceEnableColourCorrection(TBOOL a_bEnable)
Forces color correction on or off.
static TBOOL CreateVertexShader(const DWORD *a_ShaderDeclaration, const DWORD *a_pFunction, DWORD *a_pOutVertexShader)
Creates a vertex shader.
TFORCEINLINE IDirect3DDevice8 * GetDirect3DDevice() const
Gets the Direct3D device.
void Exit()
Signals the render interface to exit.
static void FlushShaders()
Flushes all order tables and shaders.
virtual void DestroyCapture(TRenderCapture *a_pRenderCapture) OVERRIDE
Destroys a render capture.
virtual void SetSaturate(TFLOAT a_fSaturate)
Sets the saturation value.
void DestroyAccelTable()
Destroys the accelerator table.
virtual TBOOL BeginScene() OVERRIDE
Begins a new rendering scene.
virtual void SetBrightness(TFLOAT a_fBrightness)
Sets the brightness value.
virtual TRenderContext * CreateRenderContext() OVERRIDE
Creates a new render context.
static TFORCEINLINE TRenderD3DInterface * Interface()
Gets the render interface singleton.
virtual void EnableColourCorrection(TBOOL a_bEnable)
Enables or disables color correction.
void GetCurrentColourRamp()
Gets the current color ramp.
virtual TBOOL Update(float a_fDeltaTime) OVERRIDE
Updates the render interface state.
void SetTextureAddress(TINT a_iStage, ADDRESSINGMODE a_eAddressing, TEXCOORD a_eTextureCoordinate=TEXCOORD_UV)
Sets texture addressing mode.
virtual TFLOAT GetGamma() const
Gets the current gamma value.
TFORCEINLINE TPriList< TOrderTable > & GetOrderTables()
Gets the order tables.
virtual float GetPixelAspectRatio() OVERRIDE
Gets the pixel aspect ratio.
static void DestroyPixelShader(DWORD a_hPixelShader)
Destroys a pixel shader.
virtual TFLOAT GetContrast() const
Gets the current contrast value.
static const TCHAR * GetErrorString(TINT32 a_eError)
Gets the error string for an error code.
void CreateAccelTable()
Creates the accelerator table.
virtual DISPLAYPARAMS * GetCurrentDisplayParams() OVERRIDE
Gets the current display parameters.
virtual TModel * CreateModel(TTMD *a_pTMD, TBOOL a_bLoad) OVERRIDE
Creates a model from a TMD file.
TDebugD3DText * InitDebugText(TINT a_iBufferSize)
Initializes debug text.
virtual TDebugText * CreateDebugText() OVERRIDE
Creates debug text.
TBOOL IsTextureFormatSupportedImpl(D3DFORMAT a_eFormat)
Checks if a specific D3D format is supported.
virtual void SetGamma(TFLOAT a_fGamma)
Sets the gamma value.
virtual TBOOL DestroyDisplay() OVERRIDE
Destroys the current display and releases associated resources.
void SetDeviceDefaultStates()
Sets default device states.
virtual TRenderAdapter::Mode::Device * GetCurrentDevice() OVERRIDE
Gets the current rendering device.
virtual void OnInitializationFailureDisplay() OVERRIDE
Called when display initialization fails.
static TBOOL CreatePixelShader(const DWORD *a_pFunction, DWORD *a_pOutPixelShader)
Creates a pixel shader.
virtual TBOOL EndScene() OVERRIDE
Ends the current rendering scene and presents the results.
static void DestroyVertexShader(DWORD a_hVertexShader)
Destroys a vertex shader.
virtual TFLOAT GetSaturate() const
Gets the current saturation value.
virtual void OnInitializationFailureDevice() OVERRIDE
Called when device initialization fails.
static TFORCEINLINE TRenderInterface * GetSingleton()