diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index dc79f7299..682650568 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -158,7 +158,7 @@ StringMap::Entry Graphics::suppor { { "canvas", Graphics::SUPPORT_CANVAS }, { "hdrcanvas", Graphics::SUPPORT_HDR_CANVAS }, - { "mrtcanvas", Graphics::SUPPORT_MRT_CANVAS }, + { "multicanvas", Graphics::SUPPORT_MULTI_CANVAS }, { "shader", Graphics::SUPPORT_SHADER }, { "npot", Graphics::SUPPORT_NPOT }, { "subtractive", Graphics::SUPPORT_SUBTRACTIVE }, diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index 29212e2d8..e2c73ae62 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -87,7 +87,7 @@ public: { SUPPORT_CANVAS = 1, SUPPORT_HDR_CANVAS, - SUPPORT_MRT_CANVAS, + SUPPORT_MULTI_CANVAS, SUPPORT_SHADER, SUPPORT_NPOT, SUPPORT_SUBTRACTIVE, diff --git a/src/modules/graphics/opengl/Canvas.cpp b/src/modules/graphics/opengl/Canvas.cpp index a8e283635..04361ff74 100644 --- a/src/modules/graphics/opengl/Canvas.cpp +++ b/src/modules/graphics/opengl/Canvas.cpp @@ -423,7 +423,7 @@ bool Canvas::isHDRSupported() return GLEE_VERSION_3_0 || GLEE_ARB_texture_float; } -bool Canvas::isMRTSupported() +bool Canvas::isMultiCanvasSupported() { if (!(isSupported() && (GLEE_VERSION_2_0 || GLEE_ARB_draw_buffers || GLEE_ATI_draw_buffers))) return false; @@ -434,7 +434,7 @@ bool Canvas::isMRTSupported() glGetIntegerv(GL_MAX_DRAW_BUFFERS, &maxDrawBuffers); } - // system must support at least 4 simultanious render targets + // system must support at least 4 simultanious active canvases return maxFBOColorAttachments >= 4 && maxDrawBuffers >= 4; } @@ -478,11 +478,11 @@ void Canvas::startGrab(const std::vector &canvases) { if (canvases.size() > 0) { - if (!isMRTSupported()) - throw love::Exception("Multiple render targets are not supported on this system."); + if (!isMultiCanvasSupported()) + throw love::Exception("Multi-canvas rendering is not supported on this system."); - if (canvases.size() + 1 > maxDrawBuffers || canvases.size() + 1 > maxFBOColorAttachments) - throw love::Exception("This system can't support %d simultanious render targets.", canvases.size() + 1); + if (canvases.size()+1 > maxDrawBuffers || canvases.size()+1 > maxFBOColorAttachments) + throw love::Exception("This system can't simultaniously render to %d canvases.", canvases.size()+1); } for (size_t i = 0; i < canvases.size(); i++) @@ -500,7 +500,7 @@ void Canvas::startGrab(const std::vector &canvases) if (canvases.size() == 0 && attachedCanvases.size() == 0) return; - // attach the canvas textures to this FBO and set up multiple render targets + // attach the canvas textures to the active FBO and set up multiple render targets strategy->setAttachments(canvases); // retain newly attached canvases @@ -521,7 +521,7 @@ void Canvas::startGrab() if (attachedCanvases.size() == 0) return; - // make sure the FBO is only using a single render target + // make sure the FBO is only using a single canvas strategy->setAttachments(); // release any previously attached canvases @@ -548,16 +548,31 @@ void Canvas::stopGrab() void Canvas::clear(const Color &c) { GLuint previous = 0; - if (current != NULL) - previous = current->fbo; - strategy->bindFBO(fbo); - glPushAttrib(GL_COLOR_BUFFER_BIT); + if (current != this) + { + if (current != NULL) + previous = current->fbo; + + strategy->bindFBO(fbo); + glPushAttrib(GL_COLOR_BUFFER_BIT); + } + + // Make sure only this canvas is cleared when multi-canvas rendering is set + if (attachedCanvases.size() > 0) + strategy->setAttachments(); + glClearColor((float)c.r/255.0f, (float)c.g/255.0f, (float)c.b/255.0f, (float)c.a/255.0f); glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - glPopAttrib(); - strategy->bindFBO(previous); + if (attachedCanvases.size() > 0) + strategy->setAttachments(attachedCanvases); + + if (current != this) + { + glPopAttrib(); + strategy->bindFBO(previous); + } } void Canvas::draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const diff --git a/src/modules/graphics/opengl/Canvas.h b/src/modules/graphics/opengl/Canvas.h index 44a63a962..b7b071bbe 100644 --- a/src/modules/graphics/opengl/Canvas.h +++ b/src/modules/graphics/opengl/Canvas.h @@ -101,7 +101,7 @@ public: static bool isSupported(); static bool isHDRSupported(); - static bool isMRTSupported(); + static bool isMultiCanvasSupported(); static bool getConstant(const char *in, TextureType &out); static bool getConstant(TextureType in, const char *&out); diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index a69407354..90cfc7649 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -1083,8 +1083,8 @@ int w_isSupported(lua_State *L) if (!Canvas::isHDRSupported()) supported = false; break; - case Graphics::SUPPORT_MRT_CANVAS: - if (!Canvas::isMRTSupported()) + case Graphics::SUPPORT_MULTI_CANVAS: + if (!Canvas::isMultiCanvasSupported()) supported = false; break; case Graphics::SUPPORT_SHADER: diff --git a/src/scripts/graphics.lua b/src/scripts/graphics.lua index c423b0246..1a318b9a6 100644 --- a/src/scripts/graphics.lua +++ b/src/scripts/graphics.lua @@ -1338,7 +1338,7 @@ void main() { gl_FragColor = effect(VaryingColor, _tex0_, VaryingTexCoord.st, gl_FragCoord.xy); }]], - FOOTER_MRT = [[ + FOOTER_MULTI_CANVAS = [[ void main() { // fix crashing issue in OSX when _tex0_ is unused within effect() float dummy = texture2D(_tex0_, vec2(.5)).r; @@ -1357,13 +1357,13 @@ void main() { return table_concat(vertexcodes, "\n") end - local function createPixelCode(pixelcode, is_mrt) + local function createPixelCode(pixelcode, is_multicanvas) local pixelcodes = { GLSL_VERSION, GLSL_SYNTAX, GLSL_PIXEL.HEADER, GLSL_UNIFORMS, "#line 0", pixelcode, - is_mrt and GLSL_PIXEL.FOOTER_MRT or GLSL_PIXEL.FOOTER, + is_multicanvas and GLSL_PIXEL.FOOTER_MULTI_CANVAS or GLSL_PIXEL.FOOTER, } return table_concat(pixelcodes, "\n") end @@ -1375,7 +1375,7 @@ void main() { local function isPixelCode(code) if code:match("vec4%s*effect%(") then return true - elseif code:match("void%s*effects%(") then -- multiple render targets (MRT) + elseif code:match("void%s*effects%(") then -- render to multiple canvases simultaniously return true, true else return false @@ -1384,7 +1384,7 @@ void main() { function love.graphics._shaderCodeToGLSL(arg1, arg2) local vertexcode, pixelcode - local is_mrt = false -- whether pixel code has "effects" function instead of "effect" + local is_multicanvas = false -- whether pixel code has "effects" function instead of "effect" if arg1 then local s = arg1:gsub("\r\n\t", " ") -- convert whitespace to spaces for parsing @@ -1394,10 +1394,10 @@ void main() { vertexcode = arg1 -- first arg contains vertex shader code end - local ispixel, isMRT = isPixelCode(s) + local ispixel, isMultiCanvas = isPixelCode(s) if ispixel then pixelcode = arg1 -- first arg contains pixel shader code - is_mrt = isMRT + is_multicanvas = isMultiCanvas end end @@ -1409,10 +1409,10 @@ void main() { vertexcode = arg2 -- second arg contains vertex shader code end - local ispixel, isMRT = isPixelCode(s) + local ispixel, isMultiCanvas = isPixelCode(s) if ispixel then pixelcode = arg2 -- second arg contains pixel shader code - is_mrt = isMRT + is_multicanvas = isMultiCanvas end end @@ -1420,7 +1420,7 @@ void main() { vertexcode = createVertexCode(vertexcode) end if pixelcode then - pixelcode = createPixelCode(pixelcode, is_mrt) + pixelcode = createPixelCode(pixelcode, is_multicanvas) end return vertexcode, pixelcode diff --git a/src/scripts/graphics.lua.h b/src/scripts/graphics.lua.h index 73c5001b7..e2f2752fb 100644 --- a/src/scripts/graphics.lua.h +++ b/src/scripts/graphics.lua.h @@ -6348,7 +6348,8 @@ const unsigned char graphics_lua[] = 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x73, 0x74, 0x2c, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a, 0x7d, 0x5d, 0x5d, 0x2c, 0x0a, - 0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x52, 0x54, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a, + 0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x43, 0x41, 0x4e, + 0x56, 0x41, 0x53, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x78, 0x20, 0x63, 0x72, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4f, 0x53, 0x58, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x5f, @@ -6383,7 +6384,8 @@ const unsigned char graphics_lua[] = 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, - 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x72, 0x74, 0x29, 0x0a, + 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, + 0x76, 0x61, 0x73, 0x29, 0x0a, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x2c, 0x0a, @@ -6392,10 +6394,11 @@ const unsigned char graphics_lua[] = 0x4c, 0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x53, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x22, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x30, 0x22, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x0a, - 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x72, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x47, 0x4c, 0x53, 0x4c, - 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x52, 0x54, 0x20, - 0x6f, 0x72, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f, 0x54, - 0x45, 0x52, 0x2c, 0x0a, + 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f, + 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x43, 0x41, 0x4e, 0x56, 0x41, 0x53, 0x20, 0x6f, + 0x72, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f, 0x54, 0x45, + 0x52, 0x2c, 0x0a, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2c, 0x20, 0x22, 0x5c, @@ -6415,9 +6418,9 @@ const unsigned char graphics_lua[] = 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, 0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x76, 0x6f, 0x69, 0x64, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x25, - 0x28, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, - 0x6c, 0x65, 0x20, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x20, - 0x28, 0x4d, 0x52, 0x54, 0x29, 0x0a, + 0x28, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, + 0x73, 0x65, 0x73, 0x20, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x74, 0x61, 0x6e, 0x69, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x0a, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, 0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x0a, @@ -6429,11 +6432,12 @@ const unsigned char graphics_lua[] = 0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x28, 0x61, 0x72, 0x67, 0x31, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x32, 0x29, 0x0a, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x0a, - 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x69, - 0x78, 0x65, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x68, 0x61, 0x73, 0x20, 0x22, 0x65, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x73, 0x22, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, - 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x22, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x22, 0x0a, + 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, + 0x6e, 0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x68, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x68, + 0x61, 0x73, 0x20, 0x22, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x22, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x22, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x22, 0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x72, 0x67, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x31, 0x3a, @@ -6453,14 +6457,15 @@ const unsigned char graphics_lua[] = 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x2c, 0x20, - 0x69, 0x73, 0x4d, 0x52, 0x54, 0x20, 0x3d, 0x20, 0x69, 0x73, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, - 0x65, 0x28, 0x73, 0x29, 0x0a, + 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x73, + 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x73, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x31, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x73, 0x4d, 0x52, 0x54, 0x0a, + 0x09, 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, + 0x20, 0x3d, 0x20, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x0a, @@ -6482,14 +6487,15 @@ const unsigned char graphics_lua[] = 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x2c, 0x20, - 0x69, 0x73, 0x4d, 0x52, 0x54, 0x20, 0x3d, 0x20, 0x69, 0x73, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, - 0x65, 0x28, 0x73, 0x29, 0x0a, + 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x73, + 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x73, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x32, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x73, 0x4d, 0x52, 0x54, 0x0a, + 0x09, 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, + 0x20, 0x3d, 0x20, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, @@ -6502,7 +6508,8 @@ const unsigned char graphics_lua[] = 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c, - 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x72, 0x74, 0x29, 0x0a, + 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, + 0x61, 0x73, 0x29, 0x0a, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x0a,