dead code elimination

This commit is contained in:
EXetoC 2014-10-04 13:23:42 +02:00
commit 03e5209195
6 changed files with 1293 additions and 1282 deletions

View file

@ -17,8 +17,11 @@ when defined(windows):
{.push, callconv: stdcall.} {.push, callconv: stdcall.}
else: else:
{.push, callconv: cdecl.} {.push, callconv: cdecl.}
import opengl import opengl
{.deadCodeElim: on.}
type type
GLcharARB* = Char GLcharARB* = Char
TGLcharARB* = GLcharARB TGLcharARB* = GLcharARB

View file

@ -10,6 +10,8 @@
import opengl import opengl
{.deadCodeElim: on.}
when defined(windows): when defined(windows):
{.push, callconv: stdcall.} {.push, callconv: stdcall.}
else: else:

View file

@ -17,6 +17,8 @@
import opengl import opengl
{.deadCodeElim: on.}
when defined(windows): when defined(windows):
const const
dllname = "glut32.dll" dllname = "glut32.dll"

View file

@ -25,6 +25,8 @@
import X, XLib, XUtil, opengl import X, XLib, XUtil, opengl
{.deadCodeElim: on.}
when defined(windows): when defined(windows):
const const
dllname = "GL.dll" dllname = "GL.dll"

View file

@ -1,5 +1,7 @@
import opengl, windows import opengl, windows
{.deadCodeElim: on.}
proc wglGetExtensionsStringARB*(hdc: HDC): cstring{.dynlib: dllname, proc wglGetExtensionsStringARB*(hdc: HDC): cstring{.dynlib: dllname,
importc: "wglGetExtensionsStringARB".} importc: "wglGetExtensionsStringARB".}
const const