Mercurial > games > semicongine
changeset 49:f70f7b3878e4
fix: unusable function at compile time
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 19 Jan 2023 16:24:54 +0700 |
parents | 8305f8619a27 |
children | 73d5e3c9a569 |
files | src/semicongine/shader.nim |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: