summaryrefslogtreecommitdiff
path: root/plugingui/window.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-01-18 10:17:58 +0100
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-01-18 10:17:58 +0100
commitfe9e38995f5a0abc196e9600c38d95385d6bf84f (patch)
treed106ff875aba7289296f5ed47626f50fc0930d2c /plugingui/window.cc
parent5f1e301d951c10533b101bcddc7a0262780743a3 (diff)
Added PuGl window drawing. Enable with './configure -with-pugl'.
Diffstat (limited to 'plugingui/window.cc')
-rw-r--r--plugingui/window.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugingui/window.cc b/plugingui/window.cc
index 41d4d82..8337533 100644
--- a/plugingui/window.cc
+++ b/plugingui/window.cc
@@ -34,13 +34,16 @@
#include <string.h>
#include <hugin.hpp>
+#ifndef PUGL
#ifdef X11
#include "nativewindow_x11.h"
#endif/*X11*/
-
#ifdef WIN32
#include "nativewindow_win32.h"
#endif/*WIN32*/
+#else
+#include "nativewindow_pugl.h"
+#endif
GUI::Window::Window()
: Widget(NULL), wpixbuf(100, 100), back(":bg.png"), logo(":logo.png")
@@ -55,13 +58,16 @@ GUI::Window::Window()
_buttonDownFocus = NULL;
_mouseFocus = NULL;
+#ifndef PUGL
#ifdef X11
native = new NativeWindowX11(this);
#endif/*X11*/
-
#ifdef WIN32
native = new NativeWindowWin32(this);
#endif/*WIN32*/
+#else/*Use pugl*/
+ native = new NativeWindowPugl(this);
+#endif
eventhandler = new GUI::EventHandler(native, this);
}
@@ -110,8 +116,8 @@ void GUI::Window::resize(int width, int height)
resized(width, height);
//#endif
- native->resize(width, height);
Widget::resize(width, height);
+ native->resize(width, height);
}
void GUI::Window::move(size_t x, size_t y)
@@ -166,6 +172,7 @@ void GUI::Window::endPaint()
void GUI::Window::updateBuffer()
{
+ DEBUG(window, "Updating buffer\n");
memset(wpixbuf.buf, 0, wpixbuf.width * wpixbuf.height * 3);
std::vector<PixelBufferAlpha *> pl = getPixelBuffers();