diff --git a/src/modules/graphics/Canvas.cpp b/src/modules/graphics/Canvas.cpp index 3401a5292..58d992b0f 100644 --- a/src/modules/graphics/Canvas.cpp +++ b/src/modules/graphics/Canvas.cpp @@ -45,8 +45,6 @@ Canvas::Canvas(const Settings &settings) depth = settings.layers; else if (texType == TEXTURE_2D_ARRAY) layers = settings.layers; - else - layers = 1; if (width <= 0 || height <= 0 || layers <= 0) throw love::Exception("Canvas dimensions must be greater than 0."); diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index 7ae831431..fb931f19c 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -371,6 +371,7 @@ public: RenderTarget() : canvas(nullptr) , slice(0) + , mipmap(0) {} bool operator != (const RenderTarget &other) const diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index e98be2c6a..6a7c8bc4b 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -1654,7 +1654,7 @@ OpenGL::TextureFormat OpenGL::convertPixelFormat(PixelFormat pixelformat, bool r break; default: - printf("Unhandled pixel format when converting to OpenGL enums!"); + printf("Unhandled pixel format %d when converting to OpenGL enums!", pixelformat); break; }