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:
@@ -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,
|
||||
|
||||
@@ -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) );
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user