Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

RageDisplay_D3D.h

Go to the documentation of this file.
00001 /* RageDisplay_D3D - Direct3D renderer. */ 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 * Copyright (c) 2001-2004 Chris Danford, Glenn Maynard 00089 * All rights reserved. 00090 * 00091 * Permission is hereby granted, free of charge, to any person obtaining a 00092 * copy of this software and associated documentation files (the 00093 * "Software"), to deal in the Software without restriction, including 00094 * without limitation the rights to use, copy, modify, merge, publish, 00095 * distribute, and/or sell copies of the Software, and to permit persons to 00096 * whom the Software is furnished to do so, provided that the above 00097 * copyright notice(s) and this permission notice appear in all copies of 00098 * the Software and that both the above copyright notice(s) and this 00099 * permission notice appear in supporting documentation. 00100 * 00101 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00102 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00103 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00104 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00105 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00106 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00107 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00108 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00109 * PERFORMANCE OF THIS SOFTWARE. 00110 */

Generated on Thu Jan 27 20:57:27 2005 for StepMania by doxygen 1.3.7