From 8f1d5d34a6191346d7f8cb5e012053bcd19795c4 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Wed, 3 Jul 2013 02:22:39 +0200 Subject: Move generateTextureFromMesh to TextureSource to fix a texture leak TextureSource has a list of textures to delete (m_texture_trash) so this provides a proper, non-hacky way to delete RTT textures. Also, the prior, hacky way of deleting them seems to be broken (see pull request #803). To avoid header file clutter by repeating the same long list of arguments over and over again, store the arguments of generateTextureFromMesh in a struct called TextureFromMeshParams. Also fix issue #782 (Only use bilinear (and others) on item textures when settings allow it). --- src/mesh.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/mesh.h') diff --git a/src/mesh.h b/src/mesh.h index cf46e7f8f..a89bea385 100644 --- a/src/mesh.h +++ b/src/mesh.h @@ -69,20 +69,4 @@ void setMeshColorByNormalXYZ(scene::IMesh *mesh, const video::SColor &colorY, const video::SColor &colorZ); -/* - Render a mesh to a texture. - Returns NULL if render-to-texture failed. -*/ -video::ITexture *generateTextureFromMesh(scene::IMesh *mesh, - IrrlichtDevice *device, - core::dimension2d dim, - std::string texture_name, - v3f camera_position, - v3f camera_lookat, - core::CMatrix4 camera_projection_matrix, - video::SColorf ambient_light, - v3f light_position, - video::SColorf light_color, - f32 light_radius); - #endif -- cgit v1.2.3