2018-10-28 17:29:51 +01:00
|
|
|
#ifndef __GTK_GLX_CONTEXT_H
|
|
|
|
#define __GTK_GLX_CONTEXT_H
|
|
|
|
|
2018-11-07 01:46:44 +01:00
|
|
|
#include "gtk_2_3_compat.h"
|
2018-10-27 01:22:51 +02:00
|
|
|
#include <epoxy/glx.h>
|
|
|
|
|
|
|
|
#include "gtk_opengl_context.h"
|
|
|
|
|
2018-10-28 17:29:51 +01:00
|
|
|
class GTKGLXContext : public OpenGLContext
|
2018-10-27 01:22:51 +02:00
|
|
|
{
|
2018-10-28 17:29:51 +01:00
|
|
|
public:
|
2018-10-27 01:22:51 +02:00
|
|
|
GTKGLXContext ();
|
|
|
|
~GTKGLXContext ();
|
|
|
|
bool attach (GtkWidget *widget);
|
|
|
|
bool create_context ();
|
|
|
|
void resize ();
|
|
|
|
void swap_buffers ();
|
|
|
|
void swap_interval (int frames);
|
|
|
|
void make_current ();
|
|
|
|
|
|
|
|
GtkWidget *widget;
|
|
|
|
|
|
|
|
GdkDisplay *gdk_display;
|
|
|
|
GdkWindow *parent_gdk_window;
|
|
|
|
GdkWindow *gdk_window;
|
|
|
|
GdkWindowAttr window_attr;
|
|
|
|
|
|
|
|
GLXContext context;
|
|
|
|
GLXFBConfig fbconfig;
|
|
|
|
Display *display;
|
2018-10-27 22:12:21 +02:00
|
|
|
int screen;
|
2018-10-27 01:22:51 +02:00
|
|
|
XVisualInfo *vi;
|
|
|
|
Window xid;
|
2018-10-27 22:12:21 +02:00
|
|
|
|
|
|
|
int version_major;
|
|
|
|
int version_minor;
|
2018-10-27 01:22:51 +02:00
|
|
|
};
|
2018-10-28 17:29:51 +01:00
|
|
|
|
|
|
|
#endif
|