Fixed artifacts exposed (not really caused) by a0d18b527fb1. GL_CLAMP is deprecated in OpenGL ES. Image::Filter and Image::Wrap did not have reasonable default.

This commit is contained in:
rude
2010-09-14 20:41:14 +02:00
parent 712bab2b34
commit 1eca14ed9e
3 changed files with 14 additions and 4 deletions
+8
View File
@@ -24,6 +24,14 @@ namespace love
{
namespace graphics
{
Image::Filter::Filter() : min(FILTER_LINEAR), mag(FILTER_LINEAR)
{
}
Image::Wrap::Wrap() : s(WRAP_CLAMP), t(WRAP_CLAMP)
{
}
Image::~Image()
{
}
+2
View File
@@ -51,12 +51,14 @@ namespace graphics
struct Filter
{
Filter();
FilterMode min;
FilterMode mag;
};
struct Wrap
{
Wrap();
WrapMode s;
WrapMode t;
};
+4 -4
View File
@@ -198,7 +198,7 @@ namespace opengl
switch(w.s)
{
case WRAP_CLAMP:
gs = GL_CLAMP;
gs = GL_CLAMP_TO_EDGE;
break;
case WRAP_REPEAT:
default:
@@ -209,7 +209,7 @@ namespace opengl
switch(w.t)
{
case WRAP_CLAMP:
gt = GL_CLAMP;
gt = GL_CLAMP_TO_EDGE;
break;
case WRAP_REPEAT:
default:
@@ -236,7 +236,7 @@ namespace opengl
switch(gs)
{
case GL_CLAMP:
case GL_CLAMP_TO_EDGE:
w.s = WRAP_CLAMP;
break;
case GL_REPEAT:
@@ -247,7 +247,7 @@ namespace opengl
switch(gt)
{
case GL_CLAMP:
case GL_CLAMP_TO_EDGE:
w.t = WRAP_CLAMP;
break;
case GL_REPEAT: