RageDisplay_D3D.h
Go to the documentation of this file.00001
00002
00003
#ifndef RAGEDISPLAY_D3D_H
00004
#define RAGEDISPLAY_D3D_H
00005
00006 class RageDisplay_D3D:
public RageDisplay
00007 {
00008
public:
00009
RageDisplay_D3D();
00010
~RageDisplay_D3D();
00011
CString Init( VideoModeParams p );
00012
void Update(
float fDeltaTime);
00013
00014
void ResolutionChanged();
00015
const PixelFormatDesc *
GetPixelFormatDesc(PixelFormat pf)
const;
00016
00017
bool BeginFrame();
00018
void EndFrame();
00019 VideoModeParams
GetVideoModeParams()
const;
00020
void SetBlendMode(
BlendMode mode );
00021
bool SupportsTextureFormat( PixelFormat pixfmt,
bool realtime=
false );
00022
unsigned CreateTexture(
00023 PixelFormat pixfmt,
00024
RageSurface* img,
00025
bool bGenerateMipMaps );
00026
void UpdateTexture(
00027
unsigned uTexHandle,
00028
RageSurface* img,
00029
int xoffset,
int yoffset,
int width,
int height
00030 );
00031
void DeleteTexture(
unsigned uTexHandle );
00032
void ClearAllTextures();
00033
int GetNumTextureUnits();
00034
void SetTexture(
int iTextureUnitIndex,
RageTexture* pTexture );
00035
void SetTextureModeModulate();
00036
void SetTextureModeGlow();
00037
void SetTextureModeAdd();
00038
void SetTextureWrapping(
bool b );
00039
int GetMaxTextureSize()
const;
00040
void SetTextureFiltering(
bool b);
00041
bool IsZWriteEnabled()
const;
00042
bool IsZTestEnabled()
const;
00043
void SetZWrite(
bool b );
00044
void SetZTestMode(
ZTestMode mode );
00045
void ClearZBuffer();
00046
void SetCullMode(
CullMode mode );
00047
void SetAlphaTest(
bool b );
00048
void SetMaterial(
00049
const RageColor &emissive,
00050
const RageColor &ambient,
00051
const RageColor &diffuse,
00052
const RageColor &specular,
00053
float shininess
00054 );
00055
void SetLighting(
bool b );
00056
void SetLightOff(
int index );
00057
void SetLightDirectional(
00058
int index,
00059
const RageColor &ambient,
00060
const RageColor &diffuse,
00061
const RageColor &specular,
00062
const RageVector3 &dir );
00063
00064
void SetSphereEnvironmentMapping(
bool b );
00065
00066
RageCompiledGeometry*
CreateCompiledGeometry();
00067
void DeleteCompiledGeometry(
RageCompiledGeometry* p );
00068
00069
protected:
00070
void DrawQuadsInternal(
const RageSpriteVertex v[],
int iNumVerts );
00071
void DrawQuadStripInternal(
const RageSpriteVertex v[],
int iNumVerts );
00072
void DrawFanInternal(
const RageSpriteVertex v[],
int iNumVerts );
00073
void DrawStripInternal(
const RageSpriteVertex v[],
int iNumVerts );
00074
void DrawTrianglesInternal(
const RageSpriteVertex v[],
int iNumVerts );
00075
void DrawCompiledGeometryInternal(
const RageCompiledGeometry *p,
int iMeshIndex );
00076
00077
CString TryVideoMode( VideoModeParams params,
bool &bNewDeviceOut );
00078
RageSurface*
CreateScreenshot();
00079
void SetViewport(
int shift_left,
int shift_down);
00080
RageMatrix GetOrthoMatrix(
float l,
float r,
float b,
float t,
float zn,
float zf );
00081
00082
void SendCurrentMatrices();
00083 };
00084
00085
#endif
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
Generated on Thu Jan 27 20:57:27 2005 for StepMania by
1.3.7