]> git.tdb.fi Git - libs/gl.git/blobdiff - tools/viewer.cpp
Create a Device class to hold the graphics context
[libs/gl.git] / tools / viewer.cpp
index fde5b8d4e757d1defdf37d7149bf2d7776387769..b6452a3cf454f9bfd8a69d189dceb05973aace5e 100644 (file)
@@ -5,12 +5,14 @@
 #include <msp/datafile/packsource.h>
 #include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
-#include <msp/graphics/simplewindow.h>
+#include <msp/graphics/display.h>
+#include <msp/graphics/window.h>
 #include <msp/gl/animatedobject.h>
 #include <msp/gl/animation.h>
 #include <msp/gl/animationplayer.h>
 #include <msp/gl/blend.h>
 #include <msp/gl/camera.h>
+#include <msp/gl/device.h>
 #include <msp/gl/directionallight.h>
 #include <msp/gl/framebuffer.h>
 #include <msp/gl/lighting.h>
@@ -63,7 +65,7 @@ private:
        Options opts;
        Graphics::Display display;
        Graphics::Window window;
-       Graphics::GLContext gl_ctx;
+       GL::Device gl_device;
        Input::Mouse mouse;
        Resources resources;
        GL::WindowView view;
@@ -132,9 +134,9 @@ Viewer::Options::Options(int argc, char **argv)
 Viewer::Viewer(int argc, char **argv):
        opts(argc, argv),
        window(display, opts.wnd_opts),
-       gl_ctx(window, opts.gl_opts),
+       gl_device(window, opts.gl_opts),
        mouse(window),
-       view(window, gl_ctx),
+       view(window),
        sequence(0),
        renderable(0),
        anim_object(0),