mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Backout changeset b3928e24add23da69dcd90c34985cd6a05454be0
This commit is contained in:
+12
-22
@@ -1365,35 +1365,25 @@ void main() {
|
||||
}
|
||||
|
||||
local function createVertexCode(vertexcode)
|
||||
-- If we return an array, each string in the array is considered separate to GLSL,
|
||||
-- and the line numbers in GLSL errors/warnings maintain this.
|
||||
local vertexcodes = {
|
||||
table_concat({
|
||||
GLSL_VERSION,
|
||||
GLSL_SYNTAX, GLSL_VERTEX.HEADER, GLSL_UNIFORMS,
|
||||
}, "\n") .. "\n",
|
||||
table_concat({
|
||||
vertexcode,
|
||||
GLSL_VERTEX.FOOTER
|
||||
}, "\n"),
|
||||
GLSL_VERSION,
|
||||
GLSL_SYNTAX, GLSL_VERTEX.HEADER, GLSL_UNIFORMS,
|
||||
"#line 1",
|
||||
vertexcode,
|
||||
GLSL_VERTEX.FOOTER,
|
||||
}
|
||||
return vertexcodes
|
||||
return table_concat(vertexcodes, "\n")
|
||||
end
|
||||
|
||||
local function createPixelCode(pixelcode, is_multicanvas)
|
||||
-- If we return an array, each string in the array is considered separate to GLSL,
|
||||
-- and the line numbers in GLSL errors/warnings maintain this.
|
||||
local pixelcodes = {
|
||||
table_concat({
|
||||
GLSL_VERSION,
|
||||
GLSL_SYNTAX, GLSL_PIXEL.HEADER, GLSL_UNIFORMS,
|
||||
}, "\n") .. "\n",
|
||||
table_concat({
|
||||
pixelcode,
|
||||
is_multicanvas and GLSL_PIXEL.FOOTER_MULTI_CANVAS or GLSL_PIXEL.FOOTER,
|
||||
}, "\n"),
|
||||
GLSL_VERSION,
|
||||
GLSL_SYNTAX, GLSL_PIXEL.HEADER, GLSL_UNIFORMS,
|
||||
"#line 1",
|
||||
pixelcode,
|
||||
is_multicanvas and GLSL_PIXEL.FOOTER_MULTI_CANVAS or GLSL_PIXEL.FOOTER,
|
||||
}
|
||||
return pixelcodes
|
||||
return table_concat(pixelcodes, "\n")
|
||||
end
|
||||
|
||||
local function isVertexCode(code)
|
||||
|
||||
Reference in New Issue
Block a user