Skip to content

Commit ee4be0c

Browse files
authored
Merge pull request #105 from guzba/master
fix shader paths
2 parents ab980a2 + 9c1177e commit ee4be0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fidget/opengl/shaders.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import buffers, opengl, os, strformat, strutils, vmath
1+
import buffers, opengl, os, strformat, strutils, vmath, macros
22

33
type
44
ShaderAttrib = object
@@ -216,7 +216,7 @@ template newShaderStatic*(computePath: string): Shader =
216216
## so it is compiled into the binary.
217217
const
218218
computeCode = staticRead(computePath)
219-
dir = currentSourcePath().parentDir()
219+
dir = getProjectPath()
220220
computePathFull = dir / computePath
221221
newShader((computePathFull, computeCode))
222222

@@ -241,7 +241,7 @@ template newShaderStatic*(vertPath, fragPath: string): Shader =
241241
const
242242
vertCode = staticRead(vertPath)
243243
fragCode = staticRead(fragPath)
244-
dir = currentSourcePath().parentDir()
244+
dir = getProjectPath()
245245
vertPathFull = dir / vertPath
246246
fragPathFull = dir / fragPath
247247
newShader((vertPathFull, vertCode), (fragPathFull, fragCode))

0 commit comments

Comments
 (0)