#define MIN_EXTRUSION_MESH_RESOLUTION 16
#define MAX_EXTRUSION_MESH_RESOLUTION 512
-static scene::IMesh* createExtrusionMesh(int resolution_x, int resolution_y)
+static scene::IMesh *createExtrusionMesh(int resolution_x, int resolution_y)
{
const f32 r = 0.5;
mesh->addMeshBuffer(buf);
buf->drop();
scaleMesh(mesh, scale); // also recalculates bounding box
- mesh = (scene::SMesh *)createForsythOptimizedMesh(mesh);
- return mesh;
+ scene::IMesh *newmesh = createForsythOptimizedMesh(mesh);
+ mesh->drop();
+ return newmesh;
}
/*
material.setFlag(video::EMF_USE_MIP_MAPS, false);
#endif
if (m_enable_shaders) {
- material.setTexture(2, tsrc->getShaderFlagsTexture(false, true, true));
+ material.setTexture(2, tsrc->getShaderFlagsTexture(false));
}
}