Fixed reloading shader which failed to compile at start up but succeeded at runtime caused crash due to Model expecting access to attribute location of shader inputs

This commit is contained in:
2020-03-24 10:32:32 -05:00
parent 578c00673d
commit d839811cfd
3 changed files with 20 additions and 12 deletions

View File

@@ -25,6 +25,8 @@ class IMICFPS
return
when 1
name = arguments.first
Shader.delete(name)
shader = Shader.new(
name: name,
includes_dir: "shaders/include",
@@ -34,6 +36,8 @@ class IMICFPS
when 2
vertex = arguments.first
fragment = arguments.last
Shader.remove(vertex)
shader = Shader.new(
name: vertex,
includes_dir: "shaders/include",
@@ -52,6 +56,7 @@ class IMICFPS
end
ensure
$stdout = stdout
puts string if string
end
def usage