On second thought, no point in being clever with glXGetProcAddress. Just always use glXGetProcAddressARB, which should always be available on any GLX implementation with any extension support
parent
eefa95ad25
commit
890c5702da
|
@ -2,5 +2,5 @@ USING: kernel x11.glx ;
|
||||||
IN: opengl.gl.unix
|
IN: opengl.gl.unix
|
||||||
|
|
||||||
: gl-function-context ( -- context ) glXGetCurrentContext ; inline
|
: gl-function-context ( -- context ) glXGetCurrentContext ; inline
|
||||||
: gl-function-address ( name -- address ) glXGetProcAddress ; inline
|
: gl-function-address ( name -- address ) glXGetProcAddressARB ; inline
|
||||||
: gl-function-calling-convention ( -- str ) "cdecl" ; inline
|
: gl-function-calling-convention ( -- str ) "cdecl" ; inline
|
||||||
|
|
|
@ -78,17 +78,11 @@ FUNCTION: void glXSelectEvent ( Display* dpy, GLXDrawable draw, ulong event_mask
|
||||||
FUNCTION: void glXGetSelectedEvent ( Display* dpy, GLXDrawable draw, ulong* event_mask ) ;
|
FUNCTION: void glXGetSelectedEvent ( Display* dpy, GLXDrawable draw, ulong* event_mask ) ;
|
||||||
|
|
||||||
! GLX 1.4 and later
|
! GLX 1.4 and later
|
||||||
! Fall back to the extension function glXGetProcAddressARB if necessary
|
|
||||||
<< "glx" load-library "glXGetProcAddress" dlsym
|
|
||||||
[ "void*" "glx" "glXGetProcAddress" { "char*" "procname" } define-function ]
|
|
||||||
[
|
|
||||||
"void*" "glx" "glXGetProcAddressARB" { "char*" "procname" } define-function
|
|
||||||
"glXGetProcAddress" create-in [ glXGetProcAddressARB ] define make-inline
|
|
||||||
]
|
|
||||||
if >>
|
|
||||||
|
|
||||||
FUNCTION: void* glXGetProcAddress ( char* procname ) ;
|
FUNCTION: void* glXGetProcAddress ( char* procname ) ;
|
||||||
|
|
||||||
|
! GLX_ARB_get_proc_address extension
|
||||||
|
FUNCTION: void* glXGetProcAddressARB ( char* procname ) ;
|
||||||
|
|
||||||
! GLX Events
|
! GLX Events
|
||||||
! (also skipped for now. only has GLXPbufferClobberEvent, the rest is handled by xlib methinks
|
! (also skipped for now. only has GLXPbufferClobberEvent, the rest is handled by xlib methinks
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue