cleanup
This commit is contained in:
@@ -1690,12 +1690,11 @@ unsigned RageDisplay_OGL::CreateTexture(
|
|||||||
|
|
||||||
if( pixfmt == FMT_PAL )
|
if( pixfmt == FMT_PAL )
|
||||||
{
|
{
|
||||||
/* The image is paletted. Let's try to set up a paletted texture. */
|
/* The texture is paletted; set the texture palette. */
|
||||||
GLubyte palette[256*4];
|
GLubyte palette[256*4];
|
||||||
memset(palette, 0, sizeof(palette));
|
memset(palette, 0, sizeof(palette));
|
||||||
int p = 0;
|
int p = 0;
|
||||||
/* Copy the palette to the simple, unpacked data OGL expects. If
|
/* Copy the palette to the format OpenGL expects. */
|
||||||
* we're color keyed, change it over as we go. */
|
|
||||||
for(int i = 0; i < img->format->palette->ncolors; ++i)
|
for(int i = 0; i < img->format->palette->ncolors; ++i)
|
||||||
{
|
{
|
||||||
palette[p++] = img->format->palette->colors[i].r;
|
palette[p++] = img->format->palette->colors[i].r;
|
||||||
|
|||||||
Reference in New Issue
Block a user