Bug fixes to the OpenGL renderer
authorSam Lantinga <slouken@libsdl.org>
Sat, 22 Jul 2006 18:01:56 +0000
changeset 1921f3399f779a1d
parent 1920 8a162bfdc838
child 1922 4905cac7a4bd
Bug fixes to the OpenGL renderer
src/video/SDL_renderer_gl.c
src/video/win32/SDL_d3drender.c
test/common.c
     1.1 --- a/src/video/SDL_renderer_gl.c	Sat Jul 22 08:33:18 2006 +0000
     1.2 +++ b/src/video/SDL_renderer_gl.c	Sat Jul 22 18:01:56 2006 +0000
     1.3 @@ -70,7 +70,7 @@
     1.4        SDL_TextureBlendMode_Blend | SDL_TextureBlendMode_Add |
     1.5        SDL_TextureBlendMode_Mod),
     1.6       (SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast |
     1.7 -      SDL_TextureScaleMode_Best),
     1.8 +      SDL_TextureScaleMode_Slow),
     1.9       18,
    1.10       {
    1.11        SDL_PixelFormat_Index1LSB,
    1.12 @@ -285,7 +285,7 @@
    1.13          break;
    1.14      case SDL_PixelFormat_RGBA8888:
    1.15          internalFormat = GL_RGBA8;
    1.16 -        format = GL_BGRA;
    1.17 +        format = GL_RGBA;
    1.18          type = GL_UNSIGNED_INT_8_8_8_8;
    1.19          break;
    1.20      case SDL_PixelFormat_ABGR8888:
    1.21 @@ -502,7 +502,6 @@
    1.22          glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    1.23          break;
    1.24      case SDL_TextureScaleMode_Slow:
    1.25 -    case SDL_TextureScaleMode_Best:
    1.26          glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    1.27          glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    1.28          break;
    1.29 @@ -514,7 +513,7 @@
    1.30      glTexCoord2f(maxu, minv);
    1.31      glVertex2i(maxx, miny);
    1.32      glTexCoord2f(minu, maxv);
    1.33 -    glVertex2i(miny, maxy);
    1.34 +    glVertex2i(minx, maxy);
    1.35      glTexCoord2f(maxu, maxv);
    1.36      glVertex2i(maxx, maxy);
    1.37      glEnd();
     2.1 --- a/src/video/win32/SDL_d3drender.c	Sat Jul 22 08:33:18 2006 +0000
     2.2 +++ b/src/video/win32/SDL_d3drender.c	Sat Jul 22 18:01:56 2006 +0000
     2.3 @@ -68,7 +68,7 @@
     2.4        SDL_TextureBlendMode_Blend | SDL_TextureBlendMode_Add |
     2.5        SDL_TextureBlendMode_Mod),
     2.6       (SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast |
     2.7 -      SDL_TextureScaleMode_Best),
     2.8 +      SDL_TextureScaleMode_Slow | SDL_TextureScaleMode_Best),
     2.9       12,
    2.10       {
    2.11        SDL_PixelFormat_Index8,
     3.1 --- a/test/common.c	Sat Jul 22 08:33:18 2006 +0000
     3.2 +++ b/test/common.c	Sat Jul 22 18:01:56 2006 +0000
     3.3 @@ -304,6 +304,9 @@
     3.4      case SDL_Renderer_PresentVSync:
     3.5          fprintf(stderr, "PresentVSync");
     3.6          break;
     3.7 +    case SDL_Renderer_Accelerated:
     3.8 +        fprintf(stderr, "Accelerated");
     3.9 +        break;
    3.10      default:
    3.11          fprintf(stderr, "0x%8.8x", flag);
    3.12          break;