2 #include "RenderDevice.h" 10 class RenderDevice :
public RenderDeviceBase
14 static RenderDevice* GetInstance();
16 static HRESULT DrawPrimitive(RenderDevicePtr pd3dDevice,
int nStatisticsType, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount);
18 static HRESULT DrawPrimitiveUP(RenderDevicePtr pd3dDevice,
int nStatisticsType,
19 D3DPRIMITIVETYPE PrimitiveType,
21 const void* pVertexStreamZeroData,
22 UINT VertexStreamZeroStride);
25 static HRESULT DrawIndexedPrimitive(RenderDevicePtr pd3dDevice,
int nStatisticsType, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT indexStart, UINT PrimitiveCount);
27 static HRESULT DrawIndexedPrimitiveUP(RenderDevicePtr pd3dDevice,
int nStatisticsType,
28 D3DPRIMITIVETYPE PrimitiveType,
32 const void * pIndexData,
33 D3DFORMAT IndexDataFormat,
34 const void* pVertexStreamZeroData,
35 UINT VertexStreamZeroStride);
38 static bool CheckRenderError(
const char* filename = NULL,
const char* func = NULL,
int nLine = 0);
42 static bool ReadPixels(
int nLeft,
int nTop,
int nWidth,
int nHeight,
void* pDataOut, DWORD nDataFormat = 0, DWORD nDataType = 0);
45 HRESULT RendererRecreated();
47 HRESULT SetRenderState(D3DRENDERSTATETYPE State, DWORD
Value);
48 HRESULT SetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD
Value);
49 HRESULT SetClipPlane(DWORD Index,
const float* pPlane);
50 HRESULT SetTexture(DWORD Stage, DeviceTexturePtr_type pTexture);
51 HRESULT SetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD
Value);
52 HRESULT GetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue);
53 HRESULT SetIndices(IndexBufferDevicePtr_type pIndexData);
54 HRESULT SetStreamSource(UINT StreamNumber, VertexBufferDevicePtr_type pStreamData, UINT OffsetInBytes, UINT Stride);
55 HRESULT SetTransform(D3DTRANSFORMSTATETYPE State, DeviceMatrix_ptr pMatrix);
56 HRESULT SetFVF(DWORD FVF);
57 void SetCursorPosition(
int X,
int Y, DWORD Flags);
58 HRESULT SetVertexDeclaration(VertexDeclarationPtr pDecl);
59 HRESULT CreateVertexDeclaration(VertexElement* pVertexElements, VertexDeclarationPtr* ppDecl);
62 HRESULT Clear(DWORD Count,
const void* pRects, DWORD Flags, DWORD Color,
float Z, DWORD Stencil);
64 HRESULT SetViewport(
const D3DVIEWPORT9* pViewport);
65 HRESULT GetViewport(D3DVIEWPORT9* pViewport);
67 HRESULT SetScissorRect(
RECT* pRect);
68 HRESULT GetScissorRect(
RECT* pRect);
72 void EndRenderTarget();
73 bool IsUsingRenderTarget();
76 static uint32 GetStencilBits();
80 void GetScreenSize(
int &nScreenWidth,
int &nScreenHeight);
81 static void ApplyBlendingModeChange();
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: ManagedDef.h:18
Definition: minilua.c:225
void BeginRenderTarget(int nWidth, int nHeight)
this is only used by Opengl render target.
Definition: RenderDeviceOpenGL.cpp:455
static bool ReadPixels(int nLeft, int nTop, int nWidth, int nHeight, void *pDataOut, DWORD nDataFormat=0, DWORD nDataType=0)
read a block of pixels from the frame buffer this emulate: glReadPixels().
Definition: RenderDeviceOpenGL.cpp:710
static bool CheckRenderError(const char *filename=NULL, const char *func=NULL, int nLine=0)
check render error and print to log.
Definition: RenderDeviceOpenGL.cpp:385