init centering matrix with identity by default; reinit other stacks, too, so

we're consistent if DISPLAY is recreated
This commit is contained in:
Glenn Maynard
2006-09-10 08:34:50 +00:00
parent c374b10233
commit dda0e12deb
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -407,6 +407,16 @@ static MatrixStack g_ViewStack;
static MatrixStack g_WorldStack;
static MatrixStack g_TextureStack;
RageDisplay::RageDisplay()
{
RageMatrixIdentity( &g_CenteringMatrix );
g_ProjectionStack = MatrixStack();
g_ViewStack = MatrixStack();
g_WorldStack = MatrixStack();
g_TextureStack = MatrixStack();
}
const RageMatrix* RageDisplay::GetCentering() const
{
return &g_CenteringMatrix;
+1 -1
View File
@@ -152,7 +152,7 @@ public:
virtual const PixelFormatDesc *GetPixelFormatDesc( PixelFormat pf ) const = 0;
/* This is needed or the overridden classes' dtors will not be called. */
RageDisplay();
virtual ~RageDisplay() { }
virtual RString Init( const VideoModeParams &p, bool bAllowUnacceleratedRenderer ) = 0;