From 141395e1d52130b49da84b794be4e78eb658a094 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 20 Mar 2007 07:46:05 +0000 Subject: [PATCH] fix RageDisplay_OGL::GetTexture --- stepmania/src/RageDisplay_OGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index d9f3df6332..57fa410334 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -776,7 +776,7 @@ RageSurface *RageDisplay_OGL::GetTexture( unsigned iTexture ) glBindTexture( GL_TEXTURE_2D, iTexture ); GLint iHeight, iWidth, iAlphaBits; glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &iHeight ); - glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &iWidth ); + glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &iWidth ); glGetTexLevelParameteriv( GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_SIZE, &iAlphaBits ); int iFormat = iAlphaBits? PixelFormat_RGBA8:PixelFormat_RGB8; @@ -784,7 +784,7 @@ RageSurface *RageDisplay_OGL::GetTexture( unsigned iTexture ) RageSurface *pImage = CreateSurface( iWidth, iHeight, desc.bpp, desc.masks[0], desc.masks[1], desc.masks[2], desc.masks[3] ); - glGetTexImage( GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, pImage->pixels ); + glGetTexImage( GL_TEXTURE_2D, 0, g_GLPixFmtInfo[iFormat].format, GL_UNSIGNED_BYTE, pImage->pixels ); AssertNoGLError(); return pImage;