diff --git a/src/common/runtime.cpp b/src/common/runtime.cpp index 6e4c34130..34b9719eb 100644 --- a/src/common/runtime.cpp +++ b/src/common/runtime.cpp @@ -398,7 +398,10 @@ void luax_rawnewtype(lua_State *L, const char *name, bits flags, love::Object *o void luax_pushtype(lua_State *L, const char *name, bits flags, love::Object *object) { if (object == nullptr) + { lua_pushnil(L); + return; + } // Fetch the registry table of instantiated types. luax_getregistry(L, REGISTRY_TYPES); diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index ec13d9b4f..86dc51204 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -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; diff --git a/src/modules/graphics/opengl/OpenGL.h b/src/modules/graphics/opengl/OpenGL.h index 9d9ad6497..416199d78 100644 --- a/src/modules/graphics/opengl/OpenGL.h +++ b/src/modules/graphics/opengl/OpenGL.h @@ -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. **/ diff --git a/src/modules/image/magpie/ddsHandler.h b/src/modules/image/magpie/ddsHandler.h index f8d711801..414a3b923 100644 --- a/src/modules/image/magpie/ddsHandler.h +++ b/src/modules/image/magpie/ddsHandler.h @@ -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.