mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +02:00
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:
@@ -24,6 +24,14 @@ namespace love
|
|||||||
{
|
{
|
||||||
namespace graphics
|
namespace graphics
|
||||||
{
|
{
|
||||||
|
Image::Filter::Filter() : min(FILTER_LINEAR), mag(FILTER_LINEAR)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Image::Wrap::Wrap() : s(WRAP_CLAMP), t(WRAP_CLAMP)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Image::~Image()
|
Image::~Image()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,12 +51,14 @@ namespace graphics
|
|||||||
|
|
||||||
struct Filter
|
struct Filter
|
||||||
{
|
{
|
||||||
|
Filter();
|
||||||
FilterMode min;
|
FilterMode min;
|
||||||
FilterMode mag;
|
FilterMode mag;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Wrap
|
struct Wrap
|
||||||
{
|
{
|
||||||
|
Wrap();
|
||||||
WrapMode s;
|
WrapMode s;
|
||||||
WrapMode t;
|
WrapMode t;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ namespace opengl
|
|||||||
switch(w.s)
|
switch(w.s)
|
||||||
{
|
{
|
||||||
case WRAP_CLAMP:
|
case WRAP_CLAMP:
|
||||||
gs = GL_CLAMP;
|
gs = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case WRAP_REPEAT:
|
case WRAP_REPEAT:
|
||||||
default:
|
default:
|
||||||
@@ -209,7 +209,7 @@ namespace opengl
|
|||||||
switch(w.t)
|
switch(w.t)
|
||||||
{
|
{
|
||||||
case WRAP_CLAMP:
|
case WRAP_CLAMP:
|
||||||
gt = GL_CLAMP;
|
gt = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case WRAP_REPEAT:
|
case WRAP_REPEAT:
|
||||||
default:
|
default:
|
||||||
@@ -236,7 +236,7 @@ namespace opengl
|
|||||||
|
|
||||||
switch(gs)
|
switch(gs)
|
||||||
{
|
{
|
||||||
case GL_CLAMP:
|
case GL_CLAMP_TO_EDGE:
|
||||||
w.s = WRAP_CLAMP;
|
w.s = WRAP_CLAMP;
|
||||||
break;
|
break;
|
||||||
case GL_REPEAT:
|
case GL_REPEAT:
|
||||||
@@ -247,7 +247,7 @@ namespace opengl
|
|||||||
|
|
||||||
switch(gt)
|
switch(gt)
|
||||||
{
|
{
|
||||||
case GL_CLAMP:
|
case GL_CLAMP_TO_EDGE:
|
||||||
w.t = WRAP_CLAMP;
|
w.t = WRAP_CLAMP;
|
||||||
break;
|
break;
|
||||||
case GL_REPEAT:
|
case GL_REPEAT:
|
||||||
|
|||||||
Reference in New Issue
Block a user