opengl.gl.extensions: simpler definition of gl-calling-convention

char-rename
Björn Lindqvist 2016-09-16 06:42:50 +02:00
parent 078f576769
commit 74bb9e1bc2
6 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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