1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #if defined(OPENGL_ENABLED) || defined(GLES_ENABLED)
- #ifndef CONTEXT_GL_WIN_H
- #define CONTEXT_GL_WIN_H
- #include "core/error_list.h"
- #include "core/os/os.h"
- #include "drivers/gl_context/context_gl.h"
- #include <windows.h>
- typedef bool(APIENTRY *PFNWGLSWAPINTERVALEXTPROC)(int interval);
- class ContextGL_Win : public ContextGL {
- HDC hDC;
- HGLRC hRC;
- unsigned int pixel_format;
- HWND hWnd;
- bool opengl_3_context;
- bool use_vsync;
- PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
- public:
- virtual void release_current();
- virtual void make_current();
- virtual int get_window_width();
- virtual int get_window_height();
- virtual void swap_buffers();
- virtual Error initialize();
- virtual void set_use_vsync(bool p_use);
- virtual bool is_using_vsync() const;
- ContextGL_Win(HWND hwnd, bool p_opengl_3_context);
- virtual ~ContextGL_Win();
- };
- #endif
- #endif
|