Commit: 9cdc6c75f39a209a19e2a3b237d838eb33e2d4ed
Author: Campbell Barton
Date:   Thu Jul 24 21:46:16 2014 +1000
Branches: soc-2014-viewport_context
https://developer.blender.org/rB9cdc6c75f39a209a19e2a3b237d838eb33e2d4ed

Merge branch 'master' into soc-2014-viewport_context

Conflicts:
        intern/ghost/intern/GHOST_Window.cpp
        intern/ghost/intern/GHOST_WindowX11.cpp

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



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

diff --cc intern/ghost/intern/GHOST_Window.cpp
index ffa888f,3673831..dd6154a
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@@ -43,19 -41,18 +43,18 @@@
  #include <assert.h>
  
  GHOST_Window::GHOST_Window(
-     GHOST_TUns32 width, GHOST_TUns32 height,
-     GHOST_TWindowState state,
-     const bool wantStereoVisual,
-     const bool exclusive,
-     const GHOST_TUns16 wantNumOfAASamples)
-       :
-       m_drawingContextType(GHOST_kDrawingContextTypeNone),
-       m_cursorVisible(true),
-       m_cursorGrab(GHOST_kGrabDisable),
-       m_cursorShape(GHOST_kStandardCursorDefault),
-       m_wantStereoVisual(wantStereoVisual),
-       m_wantNumOfAASamples(wantNumOfAASamples),
-       m_context(new GHOST_ContextNone(false, 0))
+         GHOST_TUns32 width, GHOST_TUns32 height,
+         GHOST_TWindowState state,
 -        GHOST_TDrawingContextType type,
 -        const bool stereoVisual,
++        const bool wantStereoVisual,
+         const bool exclusive,
 -        const GHOST_TUns16 numOfAASamples)
 -    : m_drawingContextType(type),
++        const GHOST_TUns16 wantNumOfAASamples)
++    : m_drawingContextType(GHOST_kDrawingContextTypeNone),
+       m_cursorVisible(true),
+       m_cursorGrab(GHOST_kGrabDisable),
+       m_cursorShape(GHOST_kStandardCursorDefault),
 -      m_stereoVisual(stereoVisual),
 -      m_numOfAASamples(numOfAASamples)
++      m_wantStereoVisual(wantStereoVisual),
++      m_wantNumOfAASamples(wantNumOfAASamples),
++      m_context(new GHOST_ContextNone(false, 0))
  {
        m_isUnsavedChanges = false;
        m_canAcceptDragOperation = false;
diff --cc intern/ghost/intern/GHOST_WindowX11.cpp
index 8df6164,9f835f9..ac23949
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@@ -157,38 -160,118 +157,37 @@@ static long BLENDER_ICON_48x48x32[] = 
  
  GHOST_WindowX11::
  GHOST_WindowX11(
-     GHOST_SystemX11 *system,
-     Display *display,
-     const STR_String& title,
-     GHOST_TInt32 left,
-     GHOST_TInt32 top,
-     GHOST_TUns32 width,
-     GHOST_TUns32 height,
-     GHOST_TWindowState state,
-     const GHOST_TEmbedderWindowID parentWindow,
-     GHOST_TDrawingContextType type,
-     const bool stereoVisual,
-     const bool exclusive,
-     const GHOST_TUns16 numOfAASamples
-     ) :
-       GHOST_Window(width, height, state, stereoVisual, exclusive, 
numOfAASamples),
-       m_display(display),
-       m_normal_state(GHOST_kWindowStateNormal),
-       m_system(system),
-       m_valid_setup(false),
-       m_invalid_window(false),
-       m_empty_cursor(None),
-       m_custom_cursor(None),
-       m_visible_cursor(None)
+         GHOST_SystemX11 *system,
+         Display *display,
 -        const STR_String& title,
++        const STR_String &title,
+         GHOST_TInt32 left,
+         GHOST_TInt32 top,
+         GHOST_TUns32 width,
+         GHOST_TUns32 height,
+         GHOST_TWindowState state,
+         const GHOST_TEmbedderWindowID parentWindow,
+         GHOST_TDrawingContextType type,
+         const bool stereoVisual,
+         const bool exclusive,
+         const GHOST_TUns16 numOfAASamples)
 -    : GHOST_Window(width, height, state, type, stereoVisual, exclusive, 
numOfAASamples),
 -      m_context(NULL),
++    : GHOST_Window(width, height, state, stereoVisual, exclusive, 
numOfAASamples),
+       m_display(display),
+       m_normal_state(GHOST_kWindowStateNormal),
+       m_system(system),
+       m_valid_setup(false),
+       m_invalid_window(false),
+       m_empty_cursor(None),
+       m_custom_cursor(None),
+       m_visible_cursor(None)
  {
 -      
 -      /* Set up the minimum atrributes that we require and see if
 -       * X can find us a visual matching those requirements. */
 -
 -      int attributes[40], i, samples;
        int natom;
 -      int glxVersionMajor, glxVersionMinor; /* As in GLX major.minor */
 -
 -      m_visual = NULL;
 -
 -      if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) {
 -              printf("%s:%d: X11 glXQueryVersion() failed, verify working 
openGL system!\n", __FILE__, __LINE__);
 -              
 -              /* exit if this is the first window */
 -              if (s_firstContext == NULL) {
 -                      printf("initial window could not find the GLX 
extension, exit!\n");
 -                      exit(1);
 -              }
 -
 -              return;
 -      }
 -
 -      /* Find the display with highest samples, starting at level requested */
 -      for (samples = m_numOfAASamples; samples >= 0; samples--) {
 -              i = 0; /* Reusing attributes array, so reset counter */
 -
 -              if (m_stereoVisual)
 -                      attributes[i++] = GLX_STEREO;
 -
 -              attributes[i++] = GLX_RGBA;
 -              attributes[i++] = GLX_DOUBLEBUFFER;
 -              attributes[i++] = GLX_RED_SIZE;   attributes[i++] = 1;
 -              attributes[i++] = GLX_BLUE_SIZE;  attributes[i++] = 1;
 -              attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1;
 -              attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1;
 -#ifdef GHOST_OPENGL_ALPHA
 -              attributes[i++] = GLX_ALPHA_SIZE; attributes[i++] = 1;
 -#endif
 -              /* GLX >= 1.4 required for multi-sample */
 -              if (samples && (glxVersionMajor >= 1) && (glxVersionMinor >= 
4)) {
 -                      attributes[i++] = GLX_SAMPLE_BUFFERS; attributes[i++] = 
1;
 -                      attributes[i++] = GLX_SAMPLES; attributes[i++] = 
samples;
 -              }
 -              attributes[i] = None;
 -
 -              m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), 
attributes);
 -
 -              /* Any sample level or even zero, which means oversampling 
disabled, is good
 -               * but we need a valid visual to continue */
 -              if (m_visual == NULL) {
 -                      if (samples == 0) {
 -                              /* All options exhausted, cannot continue */
 -                              printf("%s:%d: X11 glXChooseVisual() failed, 
verify working openGL system!\n", __FILE__, __LINE__);
 -                              
 -                              if (s_firstContext == NULL) {
 -                                      printf("initial window could not find 
the GLX extension, exit!\n");
 -                                      exit(1);
 -                              }
 -                              
 -                              return;
 -                      }
 -              }
 -              else {
 -                      if (m_numOfAASamples && (m_numOfAASamples > samples)) {
 -                              printf("%s:%d: oversampling requested %i but 
using %i samples\n",
 -                                     __FILE__, __LINE__, m_numOfAASamples, 
samples);
 -                      }
 -                      break;
 -              }
 -      }
 -
 -      /* Create a bunch of attributes needed to create an X window. */
 -
  
 -      /* First create a colormap for the window and visual.
 -       * This seems pretty much a legacy feature as we are in rgba mode 
anyway. */
 +      unsigned int xattributes_valuemask = 0;
  
        XSetWindowAttributes xattributes;
 -      unsigned int xattributes_valuemask = (CWBorderPixel | CWColormap | 
CWEventMask);
        memset(&xattributes, 0, sizeof(xattributes));
  
 -      xattributes.colormap = XCreateColormap(m_display,
 -                                             RootWindow(m_display, 
m_visual->screen),
 -                                             m_visual->visual,
 -                                             AllocNone
 -                                             );
 -
 +      xattributes_valuemask |= CWBorderPixel;
        xattributes.border_pixel = 0;
  
        /* Specify which events we are interested in hearing. */

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

Reply via email to