changeset 1921:f3399f779a1d

Bug fixes to the OpenGL renderer
author Sam Lantinga <slouken@libsdl.org>
date Sat, 22 Jul 2006 18:01:56 +0000
parents 8a162bfdc838
children 4905cac7a4bd
files src/video/SDL_renderer_gl.c src/video/win32/SDL_d3drender.c test/common.c
diffstat 3 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_renderer_gl.c	Sat Jul 22 08:33:18 2006 +0000
+++ b/src/video/SDL_renderer_gl.c	Sat Jul 22 18:01:56 2006 +0000
@@ -70,7 +70,7 @@
       SDL_TextureBlendMode_Blend | SDL_TextureBlendMode_Add |
       SDL_TextureBlendMode_Mod),
      (SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast |
-      SDL_TextureScaleMode_Best),
+      SDL_TextureScaleMode_Slow),
      18,
      {
       SDL_PixelFormat_Index1LSB,
@@ -285,7 +285,7 @@
         break;
     case SDL_PixelFormat_RGBA8888:
         internalFormat = GL_RGBA8;
-        format = GL_BGRA;
+        format = GL_RGBA;
         type = GL_UNSIGNED_INT_8_8_8_8;
         break;
     case SDL_PixelFormat_ABGR8888:
@@ -502,7 +502,6 @@
         glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
         break;
     case SDL_TextureScaleMode_Slow:
-    case SDL_TextureScaleMode_Best:
         glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
         glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
         break;
@@ -514,7 +513,7 @@
     glTexCoord2f(maxu, minv);
     glVertex2i(maxx, miny);
     glTexCoord2f(minu, maxv);
-    glVertex2i(miny, maxy);
+    glVertex2i(minx, maxy);
     glTexCoord2f(maxu, maxv);
     glVertex2i(maxx, maxy);
     glEnd();
--- a/src/video/win32/SDL_d3drender.c	Sat Jul 22 08:33:18 2006 +0000
+++ b/src/video/win32/SDL_d3drender.c	Sat Jul 22 18:01:56 2006 +0000
@@ -68,7 +68,7 @@
       SDL_TextureBlendMode_Blend | SDL_TextureBlendMode_Add |
       SDL_TextureBlendMode_Mod),
      (SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast |
-      SDL_TextureScaleMode_Best),
+      SDL_TextureScaleMode_Slow | SDL_TextureScaleMode_Best),
      12,
      {
       SDL_PixelFormat_Index8,
--- a/test/common.c	Sat Jul 22 08:33:18 2006 +0000
+++ b/test/common.c	Sat Jul 22 18:01:56 2006 +0000
@@ -304,6 +304,9 @@
     case SDL_Renderer_PresentVSync:
         fprintf(stderr, "PresentVSync");
         break;
+    case SDL_Renderer_Accelerated:
+        fprintf(stderr, "Accelerated");
+        break;
     default:
         fprintf(stderr, "0x%8.8x", flag);
         break;