* Window initializes graphics automatically 4.x-dev

Mon, 23 Nov 2020 05:08:26 +0200

author
cemkalyoncu
date
Mon, 23 Nov 2020 05:08:26 +0200
branch
4.x-dev
changeset 1497
72957a374087
parent 1496
963cdac12b9f
child 1498
e3e79d212403

* Window initializes graphics automatically

Source/Gorgon/Window.cpp file | annotate | diff | comparison | revisions
Source/Gorgon/Window.h file | annotate | diff | comparison | revisions
--- a/Source/Gorgon/Window.cpp	Mon Nov 23 01:29:42 2020 +0200
+++ b/Source/Gorgon/Window.cpp	Mon Nov 23 05:08:26 2020 +0200
@@ -230,4 +230,8 @@
         iswmpointer = true;
         ShowPointer();
     }
+    
+    void Window::init() {
+        Graphics::Initialize();
+    }
 }
--- a/Source/Gorgon/Window.h	Mon Nov 23 01:29:42 2020 +0200
+++ b/Source/Gorgon/Window.h	Mon Nov 23 05:08:26 2020 +0200
@@ -132,7 +132,7 @@
         }
             
 		/// Destroys this window
-		~Window() { Destroy(); }
+		virtual ~Window() { Destroy(); }
         
         /// Destroys this window
         void Destroy();
@@ -411,6 +411,8 @@
 
         /// These functions are used internally
         void mouse_location();
+        
+        virtual void init();
 
 	protected:
 		Window(const WindowManager::Monitor &monitor, Geometry::Rectangle rect, const std::string &name, const std::string &title, bool allowresize, bool visible);

mercurial