Index: trunk/nv/gl/gl_window.hh
===================================================================
--- trunk/nv/gl/gl_window.hh	(revision 97)
+++ trunk/nv/gl/gl_window.hh	(revision 98)
@@ -22,5 +22,5 @@
 	{
 	public:
-		gl_window( uint16 width, uint16 height );
+		gl_window( device* dev, uint16 width, uint16 height );
 		uint16 get_width() const;
 		uint16 get_height() const;
@@ -30,7 +30,10 @@
 		virtual bool poll_event( io_event& event );
 		virtual context* get_context() { return m_context; }
+		virtual device* get_device() { return m_device; };
+
 		virtual void swap_buffers();
 		virtual ~gl_window();
 	private:
+		device*     m_device;
 		uint16      m_width;
 		uint16      m_height;
Index: trunk/nv/interface/window.hh
===================================================================
--- trunk/nv/interface/window.hh	(revision 97)
+++ trunk/nv/interface/window.hh	(revision 98)
@@ -20,4 +20,5 @@
 {
 	class context;
+	class device;
 	class window
 	{
@@ -31,4 +32,5 @@
 		virtual bool poll_event( io_event& event ) = 0;
 		virtual void swap_buffers() = 0;
+		virtual device* get_device() = 0;
 		virtual ~window() = 0 {};
 	};
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 97)
+++ trunk/src/gl/gl_device.cc	(revision 98)
@@ -17,5 +17,5 @@
 window* gl_device::create_window( uint16 width, uint16 height )
 {
-	return new gl_window( width, height );
+	return new gl_window( this, width, height );
 }
 
Index: trunk/src/gl/gl_window.cc
===================================================================
--- trunk/src/gl/gl_window.cc	(revision 97)
+++ trunk/src/gl/gl_window.cc	(revision 98)
@@ -148,6 +148,6 @@
 
 
-gl_window::gl_window( uint16 width, uint16 height )
-	: m_width( width ), m_height( height ), m_title("NV Engine"), m_screen( nullptr )
+gl_window::gl_window( device* dev, uint16 width, uint16 height )
+	: m_device( dev ), m_width( width ), m_height( height ), m_title("NV Engine"), m_screen( nullptr )
 {
 	int flags = SDL_OPENGL;
