]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/egl_android/glcontext.cpp
Use default member initializers and defaulted default constructors
[libs/gui.git] / source / graphics / egl_android / glcontext.cpp
index ecf9a63f29342515c6ec1be24a03e6f5bd995dd7..ebdb8015dd5413868b2b8895aac8c456537fb7d0 100644 (file)
@@ -1,9 +1,9 @@
+#include "glcontext.h"
 #include <vector>
 #include <EGL/egl.h>
 #include <GLES2/gl2.h>
 #include <android/native_window.h>
 #include "display.h"
-#include "glcontext.h"
 #include "window_private.h"
 
 using namespace std;
@@ -13,10 +13,10 @@ namespace Graphics {
 
 struct GLContext::Private
 {
-       EGLDisplay display;
-       EGLConfig config;
-       EGLSurface surface;
-       EGLContext context;
+       EGLDisplay display = EGL_NO_DISPLAY;
+       EGLConfig config = EGL_NO_CONFIG;
+       EGLSurface surface = EGL_NO_SURFACE;
+       EGLContext context = EGL_NO_CONTEXT;
 
        void attach(WindowHandle);
        void detach();
@@ -109,16 +109,19 @@ GLContext::~GLContext()
        delete priv;
 }
 
-void GLContext::swap_buffers()
+void GLContext::set_swap_interval(unsigned)
 {
-       eglSwapBuffers(priv->display, priv->surface);
+       // TODO
 }
 
-void GLContext::window_resized(unsigned w, unsigned h)
+void GLContext::swap_buffers()
 {
-       glViewport(0, 0, w, h);
+       eglSwapBuffers(priv->display, priv->surface);
 }
 
+void GLContext::window_resized(unsigned, unsigned)
+{ }
+
 
 void GLContext::Private::attach(WindowHandle native_window)
 {