opengl.gl.extensions: simpler definition of gl-calling-convention
parent
078f576769
commit
74bb9e1bc2
|
@ -0,0 +1,7 @@
|
|||
USING: alien kernel opengl.gl.extensions system tools.test ;
|
||||
IN: opengl.gl.extensions.tests
|
||||
|
||||
{ t } [
|
||||
gl-function-calling-convention
|
||||
os windows? [ stdcall ] [ cdecl ] if =
|
||||
] unit-test
|
|
@ -46,6 +46,9 @@ reset-gl-function-number-counter
|
|||
names return function-effect
|
||||
define-declared ;
|
||||
|
||||
: gl-function-calling-convention ( -- symbol )
|
||||
os windows? [ stdcall ] [ cdecl ] if ;
|
||||
|
||||
SYNTAX: GL-FUNCTION:
|
||||
gl-function-calling-convention
|
||||
scan-function-name
|
||||
|
|
|
@ -9,5 +9,3 @@ IN: opengl.gl.gtk
|
|||
|
||||
: gl-function-address ( name -- address )
|
||||
ascii string>alien gdk_gl_get_proc_address ; inline
|
||||
|
||||
: gl-function-calling-convention ( -- str ) cdecl ; inline
|
||||
|
|
|
@ -3,4 +3,3 @@ IN: opengl.gl.macosx
|
|||
|
||||
: gl-function-context ( -- context ) 0 ; inline
|
||||
: gl-function-address ( name -- address ) f dlsym ; inline
|
||||
: gl-function-calling-convention ( -- str ) cdecl ; inline
|
||||
|
|
|
@ -8,4 +8,3 @@ FUNCTION: void* wglGetProcAddress ( c-string name )
|
|||
|
||||
: gl-function-context ( -- context ) wglGetCurrentContext ; inline
|
||||
: gl-function-address ( name -- address ) wglGetProcAddress ; inline
|
||||
: gl-function-calling-convention ( -- str ) stdcall ; inline
|
||||
|
|
|
@ -3,4 +3,3 @@ IN: opengl.gl.x11
|
|||
|
||||
: gl-function-context ( -- context ) glXGetCurrentContext ; inline
|
||||
: gl-function-address ( name -- address ) glXGetProcAddressARB ; inline
|
||||
: gl-function-calling-convention ( -- str ) cdecl ; inline
|
||||
|
|
Loading…
Reference in New Issue