Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
13
Task/Window-creation/Nim/window-creation-4.nim
Normal file
13
Task/Window-creation/Nim/window-creation-4.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import glut
|
||||
|
||||
var win: int = 0
|
||||
|
||||
proc myOnKeyPress(c: int8, v1, v2: cint) {.cdecl.} =
|
||||
echo(c)
|
||||
if c == 27:
|
||||
glutDestroyWindow(win)
|
||||
|
||||
glutInit()
|
||||
win = glutCreateWindow("Goodbye, World!")
|
||||
glutKeyboardFunc(TGlut1Char2IntCallback(myOnKeyPress))
|
||||
glutMainLoop()
|
||||
Loading…
Add table
Add a link
Reference in a new issue