snes9x/common/video/opengl/wgl_context.hpp

37 lines
925 B
C++
Raw Normal View History

2023-03-23 21:53:43 +00: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.
\*****************************************************************************/
#ifndef __WGL_CONTEXT_HPP
#define __WGL_CONTEXT_HPP
#include "opengl_context.hpp"
#include <glad/wgl.h>
class WGLContext : public OpenGLContext
{
public:
WGLContext();
~WGLContext();
bool attach(HWND xid);
bool create_context() override;
void resize() override;
void swap_buffers() override;
void swap_interval(int frames) override;
void make_current() override;
2023-08-05 21:59:56 +00:00
bool ready() override;
2023-03-23 21:53:43 +00:00
void deinit();
HWND hwnd;
HDC hdc;
HGLRC hglrc;
int version_major;
int version_minor;
};
#endif