From 3d34e3a8e814d0ce1fcd2108f4457ec811604033 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 15 Jul 2003 23:55:56 +0000 Subject: [PATCH] Don't take a reference to a pointer in CreateTexture. It might be useful to save some conversions--that is, if a conversion to a native format is needed, it'll be available to the caller--but it's confusing and it's never helpful in practice. It was causing some banner-related crashes, so let's just remove it. --- stepmania/src/RageDisplay.h | 2 +- stepmania/src/RageDisplay_D3D.cpp | 2 +- stepmania/src/RageDisplay_D3D.h | 2 +- stepmania/src/RageDisplay_OGL.cpp | 3 ++- stepmania/src/RageDisplay_OGL.h | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index f75ba143af..4e886fc674 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -129,7 +129,7 @@ public: * (unsigned in OpenGL, texture pointer in D3D) */ virtual unsigned CreateTexture( PixelFormat pixfmt, // format of img and of texture in video mem - SDL_Surface*& img // must be in pixfmt + SDL_Surface* img // must be in pixfmt ) = 0; virtual void UpdateTexture( unsigned uTexHandle, diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index e3b423b0c9..e0bbeffd41 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -902,7 +902,7 @@ void RageDisplay_D3D::DeleteTexture( unsigned uTexHandle ) unsigned RageDisplay_D3D::CreateTexture( PixelFormat pixfmt, - SDL_Surface*& img ) + SDL_Surface* img ) { // texture must be power of two ASSERT( img->w == power_of_two(img->w) ); diff --git a/stepmania/src/RageDisplay_D3D.h b/stepmania/src/RageDisplay_D3D.h index bc33af33a3..1a81e336f1 100644 --- a/stepmania/src/RageDisplay_D3D.h +++ b/stepmania/src/RageDisplay_D3D.h @@ -21,7 +21,7 @@ public: VideoModeParams GetVideoModeParams() const; void SetBlendMode( BlendMode mode ); bool SupportsTextureFormat( PixelFormat pixfmt ); - unsigned CreateTexture( PixelFormat pixfmt, SDL_Surface*& img ); + unsigned CreateTexture( PixelFormat pixfmt, SDL_Surface* img ); void UpdateTexture( unsigned uTexHandle, SDL_Surface* img, diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index b856134e6b..e5023fe16e 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -318,6 +318,7 @@ RageDisplay_OGL::RageDisplay_OGL( VideoModeParams p, bool bAllowUnacceleratedRen LOG->Info("OGL Renderer: %s", glGetString(GL_RENDERER)); LOG->Info("OGL Version: %s", glGetString(GL_VERSION)); LOG->Info("OGL Extensions: %s", glGetString(GL_EXTENSIONS)); + LOG->Info("OGL Max texture size: %i", GetMaxTextureSize() ); if( IsSoftwareRenderer() ) { @@ -1074,7 +1075,7 @@ PixelFormat RageDisplay_OGL::GetImgPixelFormat( SDL_Surface* &img, bool &FreeImg unsigned RageDisplay_OGL::CreateTexture( PixelFormat pixfmt, - SDL_Surface*& img ) + SDL_Surface* img ) { unsigned int uTexHandle; glGenTextures(1, reinterpret_cast(&uTexHandle)); diff --git a/stepmania/src/RageDisplay_OGL.h b/stepmania/src/RageDisplay_OGL.h index b2ff5034cc..c56358895c 100644 --- a/stepmania/src/RageDisplay_OGL.h +++ b/stepmania/src/RageDisplay_OGL.h @@ -17,7 +17,7 @@ public: VideoModeParams GetVideoModeParams() const; void SetBlendMode( BlendMode mode ); bool SupportsTextureFormat( PixelFormat pixfmt ); - unsigned CreateTexture( PixelFormat pixfmt, SDL_Surface*& img ); + unsigned CreateTexture( PixelFormat pixfmt, SDL_Surface* img ); void UpdateTexture( unsigned uTexHandle, SDL_Surface* img,