Removed some dead code and fixed luax_pushtype when the object argument is null.

This commit is contained in:
Alex Szpakowski
2014-08-28 00:48:32 -03:00
parent e26abb417e
commit 40c6821048
4 changed files with 4 additions and 58 deletions
-52
View File
@@ -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;
-5
View File
@@ -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.
**/
+1 -1
View File
@@ -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.