Patch [#20588] Adding multisample support to Win32 Ghost - by Mitchell Stokes (Moguri)
[blender.git] / intern / ghost / intern / GHOST_WindowWin32.h
index 954546f3d82eb46cbe28f5ce8a3597c85c4ed4fc..fb561127a2ea6f202260f4898b0823ad41ee60e2 100644 (file)
@@ -87,7 +87,9 @@ public:
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
                const bool stereoVisual = false,
-               const GHOST_TUns16 numOfAASamples = 0
+               const GHOST_TUns16 numOfAASamples = 0,
+               GHOST_TSuccess msEnabled = GHOST_kFailure,
+               int msPixelFormat = 0
        );
 
        /**
@@ -96,6 +98,13 @@ public:
         */
        virtual ~GHOST_WindowWin32();
 
+       /**
+        * Returns the window to replace this one if it's getting replaced
+        * @return The window replacing this one.
+        */
+
+       GHOST_Window *getNextWindow();
+
        /**
         * Returns indication as to whether the window is valid.
         * @return The validity of the window.
@@ -243,6 +252,8 @@ public:
        void processWin32TabletEvent(WPARAM wParam, LPARAM lParam);
 
 protected:
+       GHOST_TSuccess initMultisample(PIXELFORMATDESCRIPTOR pfd);
+
        /**
         * Tries to install a rendering context in this window.
         * @param type  The type of rendering context installed.
@@ -325,7 +336,25 @@ protected:
        LONG m_maxPressure;
        LONG m_maxAzimuth, m_maxAltitude;
 
+       /** Preferred number of samples */
+       GHOST_TUns16 m_multisample;
+
+       /** Check if multisample is supported */
+       GHOST_TSuccess m_multisampleEnabled;
+
+       /** The pixelFormat to use for multisample */
+       int m_msPixelFormat;
+
+       /** We need to following to recreate the window */
+       const STR_String& m_title;
+       GHOST_TInt32 m_left;
+       GHOST_TInt32 m_top;
+       GHOST_TUns32 m_width;
+       GHOST_TUns32 m_height;
+       bool m_stereo;
+
+       /** The GHOST_System passes this to wm if this window is being replaced */
+       GHOST_Window *m_nextWindow;
 };
 
 #endif // _GHOST_WINDOW_WIN32_H_
-