mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
fixed a bug in Image::setFilter where it switched the min/mag parameters
This commit is contained in:
@@ -123,6 +123,7 @@ namespace opengl
|
|||||||
void Image::setFilter(Image::Filter f)
|
void Image::setFilter(Image::Filter f)
|
||||||
{
|
{
|
||||||
GLint gmin, gmag;
|
GLint gmin, gmag;
|
||||||
|
gmin = gmag = 0; // so that they're not used uninitialized
|
||||||
|
|
||||||
switch(f.min)
|
switch(f.min)
|
||||||
{
|
{
|
||||||
@@ -146,8 +147,8 @@ namespace opengl
|
|||||||
|
|
||||||
bind();
|
bind();
|
||||||
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gmin);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gmin);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gmag);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gmag);
|
||||||
}
|
}
|
||||||
|
|
||||||
Image::Filter Image::getFilter() const
|
Image::Filter Image::getFilter() const
|
||||||
|
|||||||
Reference in New Issue
Block a user