Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/test/gears/GHOST_Test.cpp
| Show First 20 Lines • Show All 401 Lines • ▼ Show 20 Lines | : m_system(system), | ||||
| m_fullScreenWindow(0), | m_fullScreenWindow(0), | ||||
| m_gearsTimer(0), | m_gearsTimer(0), | ||||
| m_testTimer(0), | m_testTimer(0), | ||||
| m_cursor(GHOST_kStandardCursorFirstCursor), | m_cursor(GHOST_kStandardCursorFirstCursor), | ||||
| m_exitRequested(false), | m_exitRequested(false), | ||||
| stereo(false) | stereo(false) | ||||
| { | { | ||||
| GHOST_GLSettings glSettings = {0}; | GHOST_GLSettings glSettings = {0}; | ||||
| glSettings.context_type = GHOST_kDrawingContextTypeOpenGL; | |||||
| fApp = this; | fApp = this; | ||||
| // Create the main window | // Create the main window | ||||
| m_mainWindow = system->createWindow("gears - main window", | m_mainWindow = system->createWindow( | ||||
| 10, | "gears - main window", 10, 64, 320, 200, GHOST_kWindowStateNormal, glSettings); | ||||
| 64, | |||||
| 320, | |||||
| 200, | |||||
| GHOST_kWindowStateNormal, | |||||
| GHOST_kDrawingContextTypeOpenGL, | |||||
| glSettings); | |||||
| if (!m_mainWindow) { | if (!m_mainWindow) { | ||||
| std::cout << "could not create main window\n"; | std::cout << "could not create main window\n"; | ||||
| exit(-1); | exit(-1); | ||||
| } | } | ||||
| // Create a secondary window | // Create a secondary window | ||||
| m_secondaryWindow = system->createWindow("gears - secondary window", | m_secondaryWindow = system->createWindow( | ||||
| 340, | "gears - secondary window", 340, 64, 320, 200, GHOST_kWindowStateNormal, glSettings); | ||||
| 64, | |||||
| 320, | |||||
| 200, | |||||
| GHOST_kWindowStateNormal, | |||||
| GHOST_kDrawingContextTypeOpenGL, | |||||
| glSettings); | |||||
| if (!m_secondaryWindow) { | if (!m_secondaryWindow) { | ||||
| std::cout << "could not create secondary window\n"; | std::cout << "could not create secondary window\n"; | ||||
| exit(-1); | exit(-1); | ||||
| } | } | ||||
| // Install a timer to have the gears running | // Install a timer to have the gears running | ||||
| m_gearsTimer = system->installTimer(0 /*delay*/, 20 /*interval*/, gearsTimerProc, m_mainWindow); | m_gearsTimer = system->installTimer(0 /*delay*/, 20 /*interval*/, gearsTimerProc, m_mainWindow); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines | |||||