diff options
author | Araq <rumpf_a@web.de> | 2012-04-06 00:41:27 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-04-06 00:41:27 +0200 |
commit | 0f96e72b1808c15c31a05b2915a88ce0a355045a (patch) | |
tree | d2d63ee94c21823e2eb77b8dab91c9ef85b64363 /lib/wrappers/opengl/glut.nim | |
parent | 07b355bea4dd604e967bbf7f8fdd3fa025e0233c (diff) | |
download | Nim-0f96e72b1808c15c31a05b2915a88ce0a355045a.tar.gz |
fixed another docgen bug; initial mongodb wrapper
Diffstat (limited to 'lib/wrappers/opengl/glut.nim')
-rwxr-xr-x | lib/wrappers/opengl/glut.nim | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/wrappers/opengl/glut.nim b/lib/wrappers/opengl/glut.nim index 43bee3382..ff157c327 100755 --- a/lib/wrappers/opengl/glut.nim +++ b/lib/wrappers/opengl/glut.nim @@ -27,9 +27,7 @@ elif defined(macosx): else: const dllname = "libglut.so.3" -type - PInteger* = ptr int - PPChar* = ptr cstring +type TGlutVoidCallback* = proc (){.cdecl.} TGlut1IntCallback* = proc (value: cint){.cdecl.} TGlut2IntCallback* = proc (v1, v2: cint){.cdecl.} @@ -231,8 +229,16 @@ const # glutGet parameters. GLUT_GAME_MODE_REFRESH_RATE* = 5 GLUT_GAME_MODE_DISPLAY_CHANGED* = 6 # GLUT initialization sub-API. -proc glutInit*(argcp: PInteger, argv: PPChar){.dynlib: dllname, +proc glutInit*(argcp: ptr cint, argv: pointer){.dynlib: dllname, importc: "glutInit".} + +proc glutInit*() = + ## version that passes `argc` and `argc` implicitely. + var + cmdLine {.importc: "cmdLine".}: array[0..255, cstring] + cmdCount {.importc: "cmdCount".}: cint + glutInit(addr(cmdCount), addr(cmdLine)) + proc glutInitDisplayMode*(mode: int16){.dynlib: dllname, importc: "glutInitDisplayMode".} proc glutInitDisplayString*(str: cstring){.dynlib: dllname, |