Files
itgmania212121/stepmania/src/RageDisplay_OGL.h
T

78 lines
2.5 KiB
C++
Raw Normal View History

2003-05-26 22:25:23 +00:00
#ifndef RAGEDISPLAY_OGL_H
#define RAGEDISPLAY_OGL_H
class RageDisplay_OGL: public RageDisplay
{
public:
RageDisplay_OGL( VideoModeParams params, bool bAllowUnacceleratedRenderer );
2003-06-14 04:15:35 +00:00
virtual ~RageDisplay_OGL();
2003-05-26 22:25:23 +00:00
void Update(float fDeltaTime);
bool IsSoftwareRenderer();
void ResolutionChanged();
const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;
void BeginFrame();
void EndFrame();
2003-06-05 19:29:27 +00:00
VideoModeParams GetVideoModeParams() const;
2003-05-26 22:25:23 +00:00
void SetBlendMode( BlendMode mode );
bool SupportsTextureFormat( PixelFormat pixfmt, bool realtime=false );
2003-10-09 06:33:11 +00:00
bool Supports4BitPalettes();
unsigned CreateTexture( PixelFormat pixfmt, SDL_Surface* img );
2003-05-26 22:25:23 +00:00
void UpdateTexture(
unsigned uTexHandle,
SDL_Surface* img,
2003-05-26 22:25:23 +00:00
int xoffset, int yoffset, int width, int height
);
void DeleteTexture( unsigned uTexHandle );
void SetTexture( RageTexture* pTexture );
void SetTextureModeModulate();
void SetTextureModeGlow( GlowMode m=GLOW_WHITEN );
void SetTextureWrapping( bool b );
int GetMaxTextureSize() const;
void SetTextureFiltering( bool b);
2003-11-18 20:33:18 +00:00
bool IsZWriteEnabled() const;
bool IsZTestEnabled() const;
void SetZWrite( bool b );
void SetZTest( bool b );
2003-05-26 22:25:23 +00:00
void ClearZBuffer();
void SetBackfaceCull( bool b );
void SetAlphaTest( bool b );
void SetMaterial(
2004-01-06 21:25:46 +00:00
const RageColor &emissive,
const RageColor &ambient,
const RageColor &diffuse,
const RageColor &specular,
2003-05-26 22:25:23 +00:00
float shininess
);
void SetLighting( bool b );
void SetLightOff( int index );
void SetLightDirectional(
int index,
2004-01-06 21:25:46 +00:00
const RageColor &ambient,
const RageColor &diffuse,
const RageColor &specular,
const RageVector3 &dir );
2003-05-26 22:25:23 +00:00
2004-01-06 19:54:13 +00:00
void SetSphereEnironmentMapping( bool b );
void DrawQuads( const RageSpriteVertex v[], int iNumVerts );
void DrawFan( const RageSpriteVertex v[], int iNumVerts );
void DrawStrip( const RageSpriteVertex v[], int iNumVerts );
void DrawTriangles( const RageSpriteVertex v[], int iNumVerts );
void DrawIndexedTriangles( const RageModelVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices );
void DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth );
2003-05-26 22:25:23 +00:00
2003-06-22 01:20:58 +00:00
CString GetTextureDiagnostics( unsigned id ) const;
2003-05-26 22:25:23 +00:00
void SaveScreenshot( CString sPath );
protected:
CString TryVideoMode( VideoModeParams params, bool &bNewDeviceOut );
2003-05-26 22:25:23 +00:00
void SetViewport(int shift_left, int shift_down);
RageMatrix GetOrthoMatrix( float l, float r, float b, float t, float zn, float zf );
PixelFormat GetImgPixelFormat( SDL_Surface* &img, bool &FreeImg, int width, int height );
bool SupportsSurfaceFormat( PixelFormat pixfmt );
2003-05-26 22:25:23 +00:00
};
#endif