Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 95)
+++ 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 95)
+++ 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;
