mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Removed some dead code and fixed luax_pushtype when the object argument is null.
This commit is contained in:
@@ -579,58 +579,6 @@ float OpenGL::setTextureFilter(graphics::Texture::Filter &f)
|
||||
return f.anisotropy;
|
||||
}
|
||||
|
||||
graphics::Texture::Filter OpenGL::getTextureFilter()
|
||||
{
|
||||
GLint gmin, gmag;
|
||||
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &gmin);
|
||||
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &gmag);
|
||||
|
||||
Texture::Filter f;
|
||||
|
||||
switch (gmin)
|
||||
{
|
||||
case GL_NEAREST:
|
||||
f.min = Texture::FILTER_NEAREST;
|
||||
f.mipmap = Texture::FILTER_NONE;
|
||||
break;
|
||||
case GL_NEAREST_MIPMAP_NEAREST:
|
||||
f.min = f.mipmap = Texture::FILTER_NEAREST;
|
||||
break;
|
||||
case GL_NEAREST_MIPMAP_LINEAR:
|
||||
f.min = Texture::FILTER_NEAREST;
|
||||
f.mipmap = Texture::FILTER_LINEAR;
|
||||
break;
|
||||
case GL_LINEAR_MIPMAP_NEAREST:
|
||||
f.min = Texture::FILTER_LINEAR;
|
||||
f.mipmap = Texture::FILTER_NEAREST;
|
||||
break;
|
||||
case GL_LINEAR_MIPMAP_LINEAR:
|
||||
f.min = f.mipmap = Texture::FILTER_LINEAR;
|
||||
break;
|
||||
case GL_LINEAR:
|
||||
default:
|
||||
f.min = Texture::FILTER_LINEAR;
|
||||
f.mipmap = Texture::FILTER_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (gmag)
|
||||
{
|
||||
case GL_NEAREST:
|
||||
f.mag = Texture::FILTER_NEAREST;
|
||||
break;
|
||||
case GL_LINEAR:
|
||||
default:
|
||||
f.mag = Texture::FILTER_LINEAR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (GLEE_EXT_texture_filter_anisotropic)
|
||||
glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, &f.anisotropy);
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w)
|
||||
{
|
||||
GLint gs, gt;
|
||||
|
||||
@@ -264,11 +264,6 @@ public:
|
||||
**/
|
||||
float setTextureFilter(graphics::Texture::Filter &f);
|
||||
|
||||
/**
|
||||
* Returns the texture filter mode for the currently bound texture.
|
||||
**/
|
||||
graphics::Texture::Filter getTextureFilter();
|
||||
|
||||
/**
|
||||
* Sets the texture wrap mode for the currently bound texture.
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user