Add condition for compilation without threads in gl.nim.

This commit is contained in:
Alberto Torres 2024-09-13 18:39:47 +02:00
parent 6180767bf2
commit 7efd3bb160

View file

@ -20,10 +20,12 @@ proc get_program_info_log*(program: GLuint): string =
glGetProgramInfoLog(program, logSize.GLsizei, nil, s.cstring)
return s
let main_thread_id = getThreadID()
when compileOption("threads"):
let main_thread_id = getThreadID()
template handleError(x: untyped, t: string) =
assert main_thread_id == getThreadID()
when compileOption("threads"):
assert main_thread_id == getThreadID()
try:
x
except: