mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51: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.
|
||||
**/
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
* a single block of memory containing all the images.
|
||||
*
|
||||
* @param[in] filedata The data to parse.
|
||||
* @param[out] image The list of sub-images generated. Byte data is a pointer
|
||||
* @param[out] images The list of sub-images generated. Byte data is a pointer
|
||||
* to the returned data.
|
||||
* @param[out] dataSize The total size in bytes of the returned data.
|
||||
* @param[out] format The format of the Compressed Data.
|
||||
|
||||
Reference in New Issue
Block a user