Update RingOpenGL - Add Function (Source Code) : void glXCopyContext(Display * dpy,GLXContext src,GLXContext dst,unsigned long mask)
@@ -12191,6 +12191,26 @@ RING_FUNC(ring_glXChooseVisual)
RING_API_ACCEPTINTVALUE(3) ;
}
+
+RING_FUNC(ring_glXCopyContext)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glXCopyContext((Display *) RING_API_GETCPOINTER(1,"Display"),* (GLXContext *) RING_API_GETCPOINTER(2,"GLXContext"),* (GLXContext *) RING_API_GETCPOINTER(3,"GLXContext"),* (unsigned long *) RING_API_GETCPOINTER(4,"unsigned long"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ free(RING_API_GETCPOINTER(2,"GLXContext"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ free(RING_API_GETCPOINTER(3,"GLXContext"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ free(RING_API_GETCPOINTER(4,"unsigned long"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -12787,4 +12807,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("gluunproject",ring_gluUnProject);
ring_vm_funcregister("glxchoosefbconfig",ring_glXChooseFBConfig);
ring_vm_funcregister("glxchoosevisual",ring_glXChooseVisual);
+ ring_vm_funcregister("glxcopycontext",ring_glXCopyContext);
}
