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.
This commit is contained in:
Glenn Maynard
2003-07-15 23:55:56 +00:00
parent 1a9ca9b002
commit 3d34e3a8e8
5 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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) );
+1 -1
View File
@@ -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,
+2 -1
View File
@@ -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<GLuint*>(&uTexHandle));
+1 -1
View File
@@ -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,