2018-11-16 00:42:29 +01:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
2023-06-01 01:11:01 +02:00
|
|
|
#ifndef __GLX_CONTEXT_HPP
|
|
|
|
#define __GLX_CONTEXT_HPP
|
2018-10-28 17:29:51 +01:00
|
|
|
|
2023-06-01 01:11:01 +02:00
|
|
|
#include "opengl_context.hpp"
|
2018-10-27 01:22:51 +02:00
|
|
|
|
2023-06-01 01:11:01 +02:00
|
|
|
#include <glad/glx.h>
|
2020-07-05 00:53:38 +02:00
|
|
|
|
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:
|
2020-07-05 00:53:38 +02:00
|
|
|
GTKGLXContext();
|
|
|
|
~GTKGLXContext();
|
|
|
|
bool attach(Display *dpy, Window xid);
|
|
|
|
bool create_context();
|
|
|
|
void resize();
|
|
|
|
void swap_buffers();
|
|
|
|
void swap_interval(int frames);
|
|
|
|
void make_current();
|
2019-03-02 22:25:59 +01:00
|
|
|
bool ready();
|
2018-10-27 01:22:51 +02:00
|
|
|
|
|
|
|
GLXContext context;
|
|
|
|
GLXFBConfig fbconfig;
|
|
|
|
Display *display;
|
2018-10-27 22:12:21 +02:00
|
|
|
int screen;
|
2018-10-27 01:22:51 +02:00
|
|
|
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
|