Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Bug fixes to the OpenGL renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 22, 2006
1 parent 02e111a commit e38ce0d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/video/SDL_renderer_gl.c
Expand Up @@ -70,7 +70,7 @@ SDL_RenderDriver GL_RenderDriver = {
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,
Expand Down Expand Up @@ -285,7 +285,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
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:
Expand Down Expand Up @@ -502,7 +502,6 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
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;
Expand All @@ -514,7 +513,7 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
glTexCoord2f(maxu, minv);
glVertex2i(maxx, miny);
glTexCoord2f(minu, maxv);
glVertex2i(miny, maxy);
glVertex2i(minx, maxy);
glTexCoord2f(maxu, maxv);
glVertex2i(maxx, maxy);
glEnd();
Expand Down
2 changes: 1 addition & 1 deletion src/video/win32/SDL_d3drender.c
Expand Up @@ -68,7 +68,7 @@ SDL_RenderDriver D3D_RenderDriver = {
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,
Expand Down
3 changes: 3 additions & 0 deletions test/common.c
Expand Up @@ -304,6 +304,9 @@ PrintRendererFlag(Uint32 flag)
case SDL_Renderer_PresentVSync:
fprintf(stderr, "PresentVSync");
break;
case SDL_Renderer_Accelerated:
fprintf(stderr, "Accelerated");
break;
default:
fprintf(stderr, "0x%8.8x", flag);
break;
Expand Down

0 comments on commit e38ce0d

Please sign in to comment.