~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to intern/ghost/intern/GHOST_System.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
GHOST_System::GHOST_System()
48
48
        : m_nativePixel(false),
49
 
        m_displayManager(0),
50
 
        m_timerManager(0),
51
 
        m_windowManager(0),
52
 
        m_eventManager(0)
 
49
        m_displayManager(NULL),
 
50
        m_timerManager(NULL),
 
51
        m_windowManager(NULL),
 
52
        m_eventManager(NULL)
53
53
#ifdef WITH_INPUT_NDOF
54
54
        , m_ndofManager(0)
55
55
#endif
152
152
                        success = m_displayManager->setCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, setting);
153
153
                        if (success == GHOST_kSuccess) {
154
154
                                //GHOST_PRINT("GHOST_System::beginFullScreen(): creating full-screen window\n");
155
 
                                success = createFullScreenWindow((GHOST_Window **)window, stereoVisual, numOfAASamples);
 
155
                                success = createFullScreenWindow((GHOST_Window **)window, setting, stereoVisual, numOfAASamples);
156
156
                                if (success == GHOST_kSuccess) {
157
157
                                        m_windowManager->beginFullScreen(*window, stereoVisual);
158
158
                                }
324
324
        }
325
325
        if (m_displayManager) {
326
326
                delete m_displayManager;
327
 
                m_displayManager = 0;
 
327
                m_displayManager = NULL;
328
328
        }
329
329
        if (m_windowManager) {
330
330
                delete m_windowManager;
331
 
                m_windowManager = 0;
 
331
                m_windowManager = NULL;
332
332
        }
333
333
        if (m_timerManager) {
334
334
                delete m_timerManager;
335
 
                m_timerManager = 0;
 
335
                m_timerManager = NULL;
336
336
        }
337
337
        if (m_eventManager) {
338
338
                delete m_eventManager;
339
 
                m_eventManager = 0;
 
339
                m_eventManager = NULL;
340
340
        }
341
341
#ifdef WITH_INPUT_NDOF
342
342
        if (m_ndofManager) {
347
347
        return GHOST_kSuccess;
348
348
}
349
349
 
350
 
 
351
 
GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window, const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
 
350
GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window, const GHOST_DisplaySetting &settings,
 
351
                                                    const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
352
352
{
353
 
        GHOST_TSuccess success;
 
353
        /* note: don't use getCurrentDisplaySetting() because on X11 we may
 
354
         * be zoomed in and the desktop may be bigger then the viewport. */
354
355
        GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow(): invalid display manager");
355
 
        GHOST_DisplaySetting settings;
356
 
 
357
 
        success = m_displayManager->getCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, settings);
358
 
        if (success) {
359
 
                //GHOST_PRINT("GHOST_System::createFullScreenWindow(): creating full-screen window\n");
360
 
                *window = (GHOST_Window *)createWindow(
361
 
                    STR_String(""),
362
 
                    0, 0, settings.xPixels, settings.yPixels,
363
 
                    GHOST_kWindowStateFullScreen,
364
 
                    GHOST_kDrawingContextTypeOpenGL,
365
 
                    stereoVisual,
366
 
                    numOfAASamples);
367
 
                success = *window == 0 ? GHOST_kFailure : GHOST_kSuccess;
368
 
        }
369
 
        return success;
 
356
        //GHOST_PRINT("GHOST_System::createFullScreenWindow(): creating full-screen window\n");
 
357
        *window = (GHOST_Window *)createWindow(
 
358
            STR_String(""),
 
359
            0, 0, settings.xPixels, settings.yPixels,
 
360
            GHOST_kWindowStateNormal,
 
361
            GHOST_kDrawingContextTypeOpenGL,
 
362
            stereoVisual,
 
363
            true,  /* exclusive */
 
364
            numOfAASamples);
 
365
        return (*window == NULL) ? GHOST_kFailure : GHOST_kSuccess;
370
366
}
371
367
 
372
368