#include <GL/gl.h>
#include <GL/glx.h>
+#include "context.h"
#include "dlwrap.h"
#include "glwrap.h"
#include "metrics.h"
void
glXSwapBuffers (Display *dpy, GLXDrawable drawable)
{
+ context_end_frame_pre_swap ();
+
GLWRAP_DEFER (glXSwapBuffers, dpy, drawable);
- metrics_end_frame ();
+ context_end_frame_post_swap ();
}
/* glXGetProcAddressARB is a function which accepts a string and
{
Bool ret;
- fips_dispatch_init (FIPS_API_GLX);
+ context_leave ();
GLWRAP_DEFER_WITH_RETURN (ret, glXMakeCurrent, dpy, drawable, ctx);
+ context_enter (FIPS_API_GLX, ctx);
+
+ return ret;
+}
+
+Bool
+glXMakeContextCurrent (Display *dpy, GLXDrawable drawable, GLXDrawable read, GLXContext ctx)
+{
+ Bool ret;
+
+ context_leave ();
+
+ GLWRAP_DEFER_WITH_RETURN (ret, glXMakeContextCurrent, dpy, drawable, read, ctx);
+
+ context_enter (FIPS_API_GLX, ctx);
+
return ret;
}