snes9x/common/video/glx_context.hpp

38 lines
936 B
C++
Raw Normal View History

/*****************************************************************************\
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
2023-06-01 01:11:01 +02:00
#include "opengl_context.hpp"
2023-06-01 01:11:01 +02:00
#include <glad/glx.h>
class GTKGLXContext : public OpenGLContext
{
public:
GTKGLXContext();
~GTKGLXContext();
bool attach(Display *dpy, Window xid);
bool create_context();
void resize();
void swap_buffers();
void swap_interval(int frames);
void make_current();
bool ready();
GLXContext context;
GLXFBConfig fbconfig;
Display *display;
2018-10-27 22:12:21 +02:00
int screen;
Window xid;
2018-10-27 22:12:21 +02:00
int version_major;
int version_minor;
};
#endif