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