Remove old API restriction. (I've had this sitting in my WC for so long
I don't remember why I needed it, but it's an arbitrary restriction, anyway.)
This commit is contained in:
@@ -1877,8 +1877,6 @@ unsigned RageDisplay_OGL::CreateTexture(
|
|||||||
return uTexHandle;
|
return uTexHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This doesn't support img being paletted if the surface itself isn't paletted.
|
|
||||||
* This is only used for movies anyway, which are never paletted. */
|
|
||||||
void RageDisplay_OGL::UpdateTexture(
|
void RageDisplay_OGL::UpdateTexture(
|
||||||
unsigned uTexHandle,
|
unsigned uTexHandle,
|
||||||
RageSurface* pImg,
|
RageSurface* pImg,
|
||||||
@@ -1891,10 +1889,18 @@ void RageDisplay_OGL::UpdateTexture(
|
|||||||
|
|
||||||
glPixelStorei( GL_UNPACK_ROW_LENGTH, pImg->pitch / pImg->format->BytesPerPixel );
|
glPixelStorei( GL_UNPACK_ROW_LENGTH, pImg->pitch / pImg->format->BytesPerPixel );
|
||||||
|
|
||||||
// GLenum glTexFormat = g_GLPixFmtInfo[pixfmt].internalfmt;
|
|
||||||
GLenum glImageFormat = g_GLPixFmtInfo[SurfacePixFmt].format;
|
GLenum glImageFormat = g_GLPixFmtInfo[SurfacePixFmt].format;
|
||||||
GLenum glImageType = g_GLPixFmtInfo[SurfacePixFmt].type;
|
GLenum glImageType = g_GLPixFmtInfo[SurfacePixFmt].type;
|
||||||
|
|
||||||
|
/* If the image is paletted, but we're not sending it to a paletted image,
|
||||||
|
* set up glPixelMap. */
|
||||||
|
if( pImg->format->palette )
|
||||||
|
{
|
||||||
|
GLenum glTexFormat = 0;
|
||||||
|
glGetTexLevelParameteriv( GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INTERNAL_FORMAT), (GLint *) &glTexFormat );
|
||||||
|
SetPixelMapForSurface( glImageFormat, glTexFormat, pImg->format->palette );
|
||||||
|
}
|
||||||
|
|
||||||
glTexSubImage2D( GL_TEXTURE_2D, 0,
|
glTexSubImage2D( GL_TEXTURE_2D, 0,
|
||||||
iXOffset, iYOffset,
|
iXOffset, iYOffset,
|
||||||
iWidth, iHeight,
|
iWidth, iHeight,
|
||||||
|
|||||||
Reference in New Issue
Block a user