opengl wrapper compiles under windows
This commit is contained in:
parent
95cf849954
commit
3bcf9f4e53
3 changed files with 8 additions and 9 deletions
|
|
@ -558,16 +558,13 @@ proc SymInDynamicLib(m: BModule, sym: PSym) =
|
|||
initLocExpr(m.initProc, n[i], a)
|
||||
params.app(rdLoc(a))
|
||||
params.app(", ")
|
||||
#app(m.s[cfsVars], p.s(cpsLocals))
|
||||
#app(m.s[cfsDynLibInit], p.s(cpsInit))
|
||||
#app(m.s[cfsDynLibInit], p.s(cpsStmts))
|
||||
appcg(m, m.initProc.s(cpsStmts),
|
||||
"$1 = ($2) ($3$4));$n",
|
||||
"\t$1 = ($2) ($3$4));$n",
|
||||
[tmp, getTypeDesc(m, sym.typ),
|
||||
params, cstringLit(m, m.s[cfsDynLibInit], ropeToStr(extname))])
|
||||
else:
|
||||
appcg(m, m.s[cfsDynLibInit],
|
||||
"$1 = ($2) #nimGetProcAddr($3, $4);$n",
|
||||
"\t$1 = ($2) #nimGetProcAddr($3, $4);$n",
|
||||
[tmp, getTypeDesc(m, sym.typ),
|
||||
lib.name, cstringLit(m, m.s[cfsDynLibInit], ropeToStr(extname))])
|
||||
appff(m.s[cfsVars], "$2 $1;$n",
|
||||
|
|
|
|||
|
|
@ -9093,8 +9093,9 @@ proc glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN*(rc: GLuint,
|
|||
proc glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN*(rc: PGLuint,
|
||||
tc: PGLfloat, c: PGLfloat, n: PGLfloat, v: PGLfloat){.stdcall, importc, ogl.}
|
||||
# window support functions
|
||||
when defined(windows):
|
||||
proc wglGetProcAddress*(ProcName: cstring): Pointer{.stdcall, importc, wgl.}
|
||||
when defined(windows):
|
||||
when not defined(wglGetProcAddress):
|
||||
proc wglGetProcAddress*(ProcName: cstring): Pointer{.stdcall, importc, wgl.}
|
||||
proc wglCopyContext*(p1: HGLRC, p2: HGLRC, p3: int): BOOL{.stdcall, importc, wgl.}
|
||||
proc wglCreateContext*(DC: HDC): HGLRC{.stdcall, importc, wgl.}
|
||||
proc wglCreateLayerContext*(p1: HDC, p2: int): HGLRC{.stdcall, importc, wgl.}
|
||||
|
|
@ -9597,7 +9598,7 @@ when defined(windows):
|
|||
dwVisibleMask: DWORD
|
||||
dwDamageMask: DWORD
|
||||
|
||||
proc GetObjectType(h: int32): DWORD{.stdcall, dynlib: "gdi32",
|
||||
proc GetObjectType(h: HDC): DWORD{.stdcall, dynlib: "gdi32",
|
||||
importc: "GetObjectType".}
|
||||
proc ChoosePixelFormat(para1: HDC, para2: ptr TPIXELFORMATDESCRIPTOR): int32{.
|
||||
stdcall, dynlib: "gdi32", importc: "ChoosePixelFormat".}
|
||||
|
|
@ -9626,7 +9627,7 @@ when defined(windows):
|
|||
PFD_UNDERLAY_PLANE = int32(- 1)
|
||||
var
|
||||
PFDescriptor: TPixelFormatDescriptor
|
||||
PixelFormat: int
|
||||
PixelFormat: int32
|
||||
AType: int32
|
||||
PFDescriptor.nSize = SizeOf(PFDescriptor).int16
|
||||
PFDescriptor.nVersion = 1'i16
|
||||
|
|
|
|||
1
todo.txt
1
todo.txt
|
|
@ -1,6 +1,7 @@
|
|||
version 0.9.2
|
||||
=============
|
||||
|
||||
- implement the compiler as a service
|
||||
- fix broken expr/stmt handling for proc bodies
|
||||
- make 'bind' default for templates and introduce 'mixin'
|
||||
- implicit deref for parameter matching; overloading based on 'var T'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue