# HG changeset patch # User Sam # Date 1674120294 -25200 # Node ID f70f7b3878e409ece21b64a298c1fc19686c6c95 # Parent 8305f8619a27f8b288a0a9471650df49bb16e283 fix: unusable function at compile time diff -r 8305f8619a27 -r f70f7b3878e4 src/semicongine/shader.nim --- a/src/semicongine/shader.nim Thu Jan 19 00:47:12 2023 +0700 +++ b/src/semicongine/shader.nim Thu Jan 19 16:24:54 2023 +0700 @@ -39,14 +39,14 @@ stagename = stage2string(stage) shaderHash = hash(shaderSource) # cross compilation for windows workaround, sorry computer - shaderfile = getTempDir().replace("\\", "/") & "/" & fmt"shader_{shaderHash}.{stagename}" + shaderfile = getTempDir() / fmt"shader_{shaderHash}.{stagename}" projectPath = querySetting(projectPath) let (output, exitCode_glsl) = gorgeEx(command=fmt"{projectPath}/glslangValidator --entry-point {entrypoint} -V --stdin -S {stagename} -o {shaderfile}", input=shaderSource) if exitCode_glsl != 0: raise newException(Exception, output) let shaderbinary = staticRead shaderfile - removeFile(shaderfile) + # removeFile(shaderfile) TODO: remove file at compile time? var i = 0 while i < shaderbinary.len: