mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
moar cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1694 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -18,29 +18,33 @@
|
||||
#ifndef __H_RENDER__
|
||||
#define __H_RENDER__
|
||||
|
||||
#include "PluginSpecs_Video.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "D3DBase.h"
|
||||
|
||||
#include "pluginspecs_video.h"
|
||||
#include "D3DBase.h"
|
||||
|
||||
class Renderer
|
||||
{
|
||||
// screen offset
|
||||
static float m_x,m_y,m_width, m_height,xScale,yScale;
|
||||
static float m_x;
|
||||
static float m_y;
|
||||
static float m_width;
|
||||
static float m_height;
|
||||
static float xScale;
|
||||
static float yScale;
|
||||
const static int MaxTextureStages = 9;
|
||||
const static int MaxRenderStates = 210;
|
||||
const static DWORD MaxTextureTypes = 33;
|
||||
const static DWORD MaxSamplerSize = 13;
|
||||
const static DWORD MaxSamplerTypes = 15;
|
||||
static std::vector<LPDIRECT3DBASETEXTURE9> m_Textures;
|
||||
static DWORD m_RenderStates[MaxRenderStates];
|
||||
static DWORD m_RenderStates[MaxRenderStates+46];
|
||||
static DWORD m_TextureStageStates[MaxTextureStages][MaxTextureTypes];
|
||||
static DWORD m_SamplerStates[MaxSamplerSize][MaxSamplerTypes];
|
||||
static DWORD m_FVF;
|
||||
|
||||
public:
|
||||
|
||||
static void Init(SVideoInitialize &_VideoInitialize);
|
||||
static void Shutdown();
|
||||
|
||||
@ -58,64 +62,17 @@ public:
|
||||
static void SetViewport(float* _Viewport);
|
||||
static void SetProjection(float* _pProjection, int constantIndex = -1);
|
||||
|
||||
|
||||
// The little status display.
|
||||
static void AddMessage(const std::string &message, unsigned int ms);
|
||||
static void ProcessMessages();
|
||||
static void RenderText(const std::string &text, int left, int top, unsigned int color);
|
||||
|
||||
/**
|
||||
* Assigns a texture to a device stage.
|
||||
* @param Stage Stage to assign to.
|
||||
* @param pTexture Texture to be assigned.
|
||||
*/
|
||||
// The following are "filtered" versions of the corresponding D3Ddev-> functions.
|
||||
static void SetTexture( DWORD Stage, IDirect3DBaseTexture9 *pTexture );
|
||||
|
||||
/**
|
||||
* Sets the current vertex stream declaration.
|
||||
* @param FVF Fixed function vertex type
|
||||
*/
|
||||
static void SetFVF( DWORD FVF );
|
||||
|
||||
/**
|
||||
* Sets a single device render-state parameter.
|
||||
* @param State Device state variable that is being modified.
|
||||
* @param Value New value for the device render state to be set.
|
||||
*/
|
||||
static void SetRenderState( D3DRENDERSTATETYPE State, DWORD Value );
|
||||
|
||||
/**
|
||||
* Sets the state value for the currently assigned texture.
|
||||
* @param Stage Stage identifier of the texture for which the state value is set.
|
||||
* @param Type Texture state to set.
|
||||
* @param Value State value to set.
|
||||
*/
|
||||
static void SetTextureStageState( DWORD Stage, D3DTEXTURESTAGESTATETYPE Type,DWORD Value );
|
||||
|
||||
/**
|
||||
* Sets the sampler state value.
|
||||
* @param Sampler The sampler stage index.
|
||||
* @param Type Type of the sampler.
|
||||
* @param Value State value to set.
|
||||
*/
|
||||
static void SetSamplerState( DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value );
|
||||
|
||||
/**
|
||||
* Renders data specified by a user memory pointer as a sequence of geometric primitives of the specified type.
|
||||
* @param PrimitiveType Type of primitive to render.
|
||||
* @param PrimitiveCount Number of primitives to render.
|
||||
* @param pVertexStreamZeroData User memory pointer to the vertex data.
|
||||
* @param VertexStreamZeroStride The number of bytes of data for each vertex.
|
||||
*/
|
||||
static void DrawPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount,
|
||||
const void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
|
||||
|
||||
/**
|
||||
* Renders a sequence of non indexed, geometric primitives of the specified type from the current set of data input streams.
|
||||
* @param PrimitiveType Type of primitive to render.
|
||||
* @param StartVertex Index of the first vertex to load.
|
||||
* @param PrimitiveCount Number of primitives to render.
|
||||
*/
|
||||
static void DrawPrimitive(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount);
|
||||
};
|
||||
|
||||
#endif // __H_RENDER__
|
||||
|
Reference in New Issue
Block a user