Skip to content

Commit

Permalink
Remove ContextGL since as an abstraction it's unused.
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Apr 6, 2019
1 parent cc3e660 commit 3a8c6db
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 168 deletions.
55 changes: 0 additions & 55 deletions drivers/gl_context/context_gl.cpp

This file was deleted.

66 changes: 0 additions & 66 deletions drivers/gl_context/context_gl.h

This file was deleted.

1 change: 0 additions & 1 deletion drivers/gles2/rasterizer_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "core/os/os.h"
#include "core/project_settings.h"
#include "drivers/gl_context/context_gl.h"

#define _EXT_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
#define _EXT_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
Expand Down
1 change: 0 additions & 1 deletion drivers/gles3/rasterizer_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "core/os/os.h"
#include "core/project_settings.h"
#include "drivers/gl_context/context_gl.h"

RasterizerStorage *RasterizerGLES3::get_storage() {

Expand Down
22 changes: 10 additions & 12 deletions platform/haiku/context_gl_haiku.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,29 @@

#if defined(OPENGL_ENABLED)

#include "drivers/gl_context/context_gl.h"

#include "haiku_direct_window.h"
#include "haiku_gl_view.h"

class ContextGL_Haiku : public ContextGL {
class ContextGL_Haiku {
private:
HaikuGLView *view;
HaikuDirectWindow *window;

bool use_vsync;

public:
virtual Error initialize();
virtual void release_current();
virtual void make_current();
virtual void swap_buffers();
virtual int get_window_width();
virtual int get_window_height();
Error initialize();
void release_current();
void make_current();
void swap_buffers();
int get_window_width();
int get_window_height();

virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
void set_use_vsync(bool p_use);
bool is_using_vsync() const;

ContextGL_Haiku(HaikuDirectWindow *p_window);
virtual ~ContextGL_Haiku();
~ContextGL_Haiku();
};

#endif
Expand Down
21 changes: 10 additions & 11 deletions platform/uwp/context_egl_uwp.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@

#include "core/error_list.h"
#include "core/os/os.h"
#include "drivers/gl_context/context_gl.h"

using namespace Windows::UI::Core;

class ContextEGL_UWP : public ContextGL {
class ContextEGL_UWP {

public:
enum Driver {
Expand All @@ -64,24 +63,24 @@ class ContextEGL_UWP : public ContextGL {
Driver driver;

public:
virtual void release_current();
void release_current();

virtual void make_current();
void make_current();

virtual int get_window_width();
virtual int get_window_height();
virtual void swap_buffers();
int get_window_width();
int get_window_height();
void swap_buffers();

virtual void set_use_vsync(bool use) { vsync = use; }
virtual bool is_using_vsync() const { return vsync; }
void set_use_vsync(bool use) { vsync = use; }
bool is_using_vsync() const { return vsync; }

virtual Error initialize();
Error initialize();
void reset();

void cleanup();

ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver);
virtual ~ContextEGL_UWP();
~ContextEGL_UWP();
};

#endif // CONTEXT_EGL_UWP_H
21 changes: 10 additions & 11 deletions platform/windows/context_gl_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@

#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_Windows : public ContextGL {
class ContextGL_Windows {

HDC hDC;
HGLRC hRC;
Expand All @@ -55,21 +54,21 @@ class ContextGL_Windows : public ContextGL {
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;

public:
virtual void release_current();
void release_current();

virtual void make_current();
void make_current();

virtual int get_window_width();
virtual int get_window_height();
virtual void swap_buffers();
int get_window_width();
int get_window_height();
void swap_buffers();

virtual Error initialize();
Error initialize();

virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
void set_use_vsync(bool p_use);
bool is_using_vsync() const;

ContextGL_Windows(HWND hwnd, bool p_opengl_3_context);
virtual ~ContextGL_Windows();
~ContextGL_Windows();
};

#endif
Expand Down
21 changes: 10 additions & 11 deletions platform/x11/context_gl_x11.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@
#if defined(OPENGL_ENABLED)

#include "core/os/os.h"
#include "drivers/gl_context/context_gl.h"
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>

struct ContextGL_X11_Private;

class ContextGL_X11 : public ContextGL {
class ContextGL_X11 {

public:
enum ContextType {
Expand All @@ -67,19 +66,19 @@ class ContextGL_X11 : public ContextGL {
ContextType context_type;

public:
virtual void release_current();
virtual void make_current();
virtual void swap_buffers();
virtual int get_window_width();
virtual int get_window_height();
void release_current();
void make_current();
void swap_buffers();
int get_window_width();
int get_window_height();

virtual Error initialize();
Error initialize();

virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
void set_use_vsync(bool p_use);
bool is_using_vsync() const;

ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, ContextType p_context_type);
virtual ~ContextGL_X11();
~ContextGL_X11();
};

#endif
Expand Down

0 comments on commit 3a8c6db

Please sign in to comment.