--- /dev/null
+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
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
: gl-function-address ( name -- address )
ascii string>alien gdk_gl_get_proc_address ; inline
-
-: gl-function-calling-convention ( -- str ) cdecl ; inline
: gl-function-context ( -- context ) 0 ; inline
: gl-function-address ( name -- address ) f dlsym ; inline
-: gl-function-calling-convention ( -- str ) cdecl ; inline
: gl-function-context ( -- context ) wglGetCurrentContext ; inline
: gl-function-address ( name -- address ) wglGetProcAddress ; inline
-: gl-function-calling-convention ( -- str ) stdcall ; inline
: gl-function-context ( -- context ) glXGetCurrentContext ; inline
: gl-function-address ( name -- address ) glXGetProcAddressARB ; inline
-: gl-function-calling-convention ( -- str ) cdecl ; inline