Commit: dc627428c92aaefe2a2c88d9d2557d376040cb45
Author: Jason Wilkins
Date:   Fri Jul 4 11:30:33 2014 -0500
https://developer.blender.org/rBdc627428c92aaefe2a2c88d9d2557d376040cb45

Added getNumOfAASamples to GHOST_IWindow interface.

I was going to use it for something, but decided to use 
glGetIntegerv(GL_SAMPLES, &i) instead.
It may be the case that neither this nor stereoVisual should be cached.

===================================================================

M       intern/ghost/GHOST_C-api.h
M       intern/ghost/GHOST_IWindow.h
M       intern/ghost/intern/GHOST_C-api.cpp
M       intern/ghost/intern/GHOST_Window.cpp
M       intern/ghost/intern/GHOST_Window.h

===================================================================

diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index 2dbc48f..b678d52 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -680,6 +680,12 @@ extern GHOST_TSuccess 
GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int
 extern GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, 
int* intervalOut);
 
 /**
+ * Gets the current swap interval for swapBuffers.
+ * \return Number of AA Samples (0 if there is no multisample buffer)
+ */
+extern GHOST_TUns16 GHOST_GetNumOfAASamples(GHOST_WindowHandle windowhandle);
+
+/**
  * Activates the drawing context of this window.
  * \param windowhandle The handle to the window
  * \return An intean success indicator.
diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index 8564974..ba3797a 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -219,6 +219,12 @@ public:
        virtual GHOST_TSuccess getSwapInterval(int& intervalOut) = 0;
 
        /**
+        * Gets the current swap interval for swapBuffers.
+        * \return Number of AA Samples (0 if there is no multisample buffer)
+        */
+       virtual GHOST_TUns16 getNumOfAASamples() = 0;
+
+       /**
         * Activates the drawing context of this window.
         * \return  A boolean success indicator.
         */
diff --git a/intern/ghost/intern/GHOST_C-api.cpp 
b/intern/ghost/intern/GHOST_C-api.cpp
index f074e2b..731cb29 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -706,6 +706,13 @@ GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle 
windowhandle, int* inter
 }
 
 
+GHOST_TUns16 GHOST_GetNumOfAASamples(GHOST_WindowHandle windowhandle)
+{
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
+
+       return window->getNumOfAASamples();
+}
+
 GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle 
windowhandle)
 {
        GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
diff --git a/intern/ghost/intern/GHOST_Window.cpp 
b/intern/ghost/intern/GHOST_Window.cpp
index a320b6a..82dc039 100644
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@ -131,6 +131,11 @@ GHOST_TSuccess GHOST_Window::getSwapInterval(int& 
intervalOut)
        return m_context->getSwapInterval(intervalOut);
 }
 
+GHOST_TUns16 GHOST_Window::getNumOfAASamples()
+{
+       return m_context->getNumOfAASamples();
+}
+
 GHOST_TSuccess GHOST_Window::activateDrawingContext()
 {
        return m_context->activateDrawingContext();
diff --git a/intern/ghost/intern/GHOST_Window.h 
b/intern/ghost/intern/GHOST_Window.h
index 53a5476..c6634d3 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -207,6 +207,12 @@ public:
        virtual GHOST_TSuccess getSwapInterval(int& intervalOut);
 
        /**
+        * Gets the current swap interval for swapBuffers.
+        * \return Number of AA Samples (0 if there is no multisample buffer)
+        */
+       virtual GHOST_TUns16 getNumOfAASamples();
+
+       /**
         * Tells if the ongoing drag'n'drop object can be accepted upon mouse 
drop
         */
        virtual void setAcceptDragOperation(bool canAccept);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to