Add condition for compilation without threads in gl.nim
.
This commit is contained in:
parent
6180767bf2
commit
7efd3bb160
1 changed files with 4 additions and 2 deletions
|
@ -20,9 +20,11 @@ proc get_program_info_log*(program: GLuint): string =
|
||||||
glGetProgramInfoLog(program, logSize.GLsizei, nil, s.cstring)
|
glGetProgramInfoLog(program, logSize.GLsizei, nil, s.cstring)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
when compileOption("threads"):
|
||||||
let main_thread_id = getThreadID()
|
let main_thread_id = getThreadID()
|
||||||
|
|
||||||
template handleError(x: untyped, t: string) =
|
template handleError(x: untyped, t: string) =
|
||||||
|
when compileOption("threads"):
|
||||||
assert main_thread_id == getThreadID()
|
assert main_thread_id == getThreadID()
|
||||||
try:
|
try:
|
||||||
x
|
x
|
||||||
|
|
Loading…
Reference in a new issue