|
@@ -31,7 +31,7 @@ namespace graphics
|
|
namespace opengl
|
|
namespace opengl
|
|
{
|
|
{
|
|
|
|
|
|
-static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat format, GLuint texture, int layers, int mips)
|
|
|
|
|
|
+static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat format, GLuint texture, int layers, int nb_mips)
|
|
{
|
|
{
|
|
// get currently bound fbo to reset to it later
|
|
// get currently bound fbo to reset to it later
|
|
GLuint current_fbo = gl.getFramebuffer(OpenGL::FRAMEBUFFER_ALL);
|
|
GLuint current_fbo = gl.getFramebuffer(OpenGL::FRAMEBUFFER_ALL);
|
|
@@ -60,7 +60,7 @@ static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat fo
|
|
// Make sure all faces and layers of the texture are initialized to
|
|
// Make sure all faces and layers of the texture are initialized to
|
|
// transparent black. This is unfortunately probably pretty slow for
|
|
// transparent black. This is unfortunately probably pretty slow for
|
|
// 2D-array and 3D textures with a lot of layers...
|
|
// 2D-array and 3D textures with a lot of layers...
|
|
- for (int mip = mips - 1; mip >= 0; mip--)
|
|
|
|
|
|
+ for (int mip = nb_mips - 1; mip >= 0; mip--)
|
|
{
|
|
{
|
|
int nlayers = layers;
|
|
int nlayers = layers;
|
|
if (texType == TEXTURE_VOLUME)
|
|
if (texType == TEXTURE_VOLUME)
|