Blender V2.61 - r43446
|
#include <GPG_Application.h>
Definition at line 58 of file GPG_Application.h.
GPG_Application::GPG_Application | ( | GHOST_ISystem * | system | ) |
Definition at line 108 of file GPG_Application.cpp.
GPG_Application::~GPG_Application | ( | void | ) |
Definition at line 139 of file GPG_Application.cpp.
References GHOST_ISystem::disposeWindow(), exitEngine(), m_mainWindow, m_pyGlobalDictString, and m_pyGlobalDictString_Length.
void GPG_Application::exitEngine | ( | void | ) | [protected] |
Shuts the game engine down.
Definition at line 793 of file GPG_Application.cpp.
References GPU_extensions_exit(), m_canvas, m_engineInitialized, m_exitRequested, m_ketsjiengine, m_keyboard, m_kxsystem, m_mouse, m_networkdevice, m_rasterizer, m_rendertools, sound_exit(), and stopEngine().
Referenced by StopGameEngine(), and ~GPG_Application().
int GPG_Application::getExitRequested | ( | void | ) |
Definition at line 513 of file GPG_Application.cpp.
References m_exitRequested.
Referenced by main().
const STR_String & GPG_Application::getExitString | ( | void | ) |
GlobalSettings * GPG_Application::getGlobalSettings | ( | void | ) |
Definition at line 519 of file GPG_Application.cpp.
References KX_KetsjiEngine::GetGlobalSettings(), and m_ketsjiengine.
Referenced by main().
bool GPG_Application::handleButton | ( | GHOST_IEvent * | event, |
bool | isDown | ||
) | [protected] |
Definition at line 867 of file GPG_Application.cpp.
References GHOST_TEventButtonData::button, GPC_MouseDevice::buttonLeft, GPC_MouseDevice::buttonMiddle, GPC_MouseDevice::buttonRight, GPC_MouseDevice::ConvertButtonEvent(), GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, m_mouse, and MT_assert.
Referenced by processEvent().
bool GPG_Application::handleCursorMove | ( | GHOST_IEvent * | event | ) | [protected] |
Definition at line 896 of file GPG_Application.cpp.
References GPC_MouseDevice::ConvertMoveEvent(), m_mainWindow, m_mouse, MT_assert, GHOST_IWindow::screenToClient(), GHOST_TEventCursorData::x, and GHOST_TEventCursorData::y.
Referenced by processEvent().
bool GPG_Application::handleKey | ( | GHOST_IEvent * | event, |
bool | isDown | ||
) | [protected] |
Definition at line 913 of file GPG_Application.cpp.
References GPC_KeyboardDevice::ConvertEvent(), KX_KetsjiEngine::GetExitKey(), GHOST_TEventKeyData::key, KX_EXIT_REQUEST_OUTSIDE, m_exitRequested, GPC_KeyboardDevice::m_hookesc, m_isEmbedded, m_keyboard, MT_assert, and GPC_KeyboardDevice::ToNative().
Referenced by processEvent().
bool GPG_Application::handleWheel | ( | GHOST_IEvent * | event | ) | [protected] |
Definition at line 848 of file GPG_Application.cpp.
References GPC_MouseDevice::buttonWheelDown, GPC_MouseDevice::buttonWheelUp, GPC_MouseDevice::ConvertButtonEvent(), m_mouse, MT_assert, and GHOST_TEventWheelData::z.
Referenced by processEvent().
bool GPG_Application::initEngine | ( | GHOST_IWindow * | window, |
int | stereoMode | ||
) | [protected] |
Initializes the game engine.
Definition at line 533 of file GPG_Application.cpp.
References ConvertKeyCode(), GameData::exitkey, GameData::eyeseparation, GameData::flag, GAME_DISPLAY_LISTS, GAME_ENABLE_ALL_FRAMES, GAME_MAT_GLSL, GAME_RESTRICT_ANIM_UPDATES, GAME_SHOW_MOUSE, GAME_SHOW_PHYSICS, Scene::gm, GPU_extensions_init(), GPU_glsl_support(), GPG_Canvas::Init(), bgl::InitExtensions(), m_blenderglslmat, m_blendermat, m_canvas, m_engineInitialized, m_globalSettings, m_ketsjiengine, m_keyboard, m_kxsystem, m_maggie, m_mouse, m_networkdevice, m_rasterizer, m_rendertools, m_startScene, m_system, GlobalSettings::matmode, RAS_ICanvas::MOUSE_NORMAL, NULL, KX_KetsjiEngine::SetCanvas(), KX_KetsjiEngine::SetExitKey(), RAS_IRasterizer::SetEyeSeparation(), KX_KetsjiEngine::SetGlobalSettings(), KX_KetsjiEngine::SetKeyboardDevice(), KX_KetsjiEngine::SetMouseDevice(), GPG_Canvas::SetMouseState(), KX_KetsjiEngine::SetNetworkDevice(), KX_KetsjiEngine::SetRasterizer(), KX_KetsjiEngine::SetRenderTools(), KX_KetsjiEngine::SetRestrictAnimationFPS(), RAS_IRasterizer::SetStereoMode(), KX_KetsjiEngine::SetTimingDisplay(), KX_KetsjiEngine::SetUseFixedTime(), sound_exit(), sound_init(), SYS_GetCommandLineInt(), SYS_GetSystem(), and SYS_WriteCommandLineInt().
Referenced by startEmbeddedWindow(), startFullScreen(), StartGameEngine(), and startWindow().
bool GPG_Application::processEvent | ( | GHOST_IEvent * | event | ) | [virtual] |
Definition at line 421 of file GPG_Application.cpp.
References GHOST_IWindow::activateDrawingContext(), GHOST_IWindow::getClientBounds(), KX_KetsjiEngine::GetExitCode(), KX_KetsjiEngine::GetExitString(), GHOST_Rect::getHeight(), GHOST_IEvent::getType(), GHOST_Rect::getWidth(), GHOST_kEventButtonDown, GHOST_kEventButtonUp, GHOST_kEventCursorMove, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kEventQuit, GHOST_kEventUnknown, GHOST_kEventWheel, GHOST_kEventWindowActivate, GHOST_kEventWindowClose, GHOST_kEventWindowDeactivate, GHOST_kEventWindowSize, GHOST_kEventWindowUpdate, handleButton(), handleCursorMove(), handleKey(), handleWheel(), KX_EXIT_REQUEST_OUTSIDE, m_canvas, m_exitRequested, m_exitString, m_ketsjiengine, m_kxsystem, m_system, KX_KetsjiEngine::NextFrame(), KX_KetsjiEngine::Render(), GPC_Canvas::Resize(), and GHOST_ISystem::validWindow().
bool GPG_Application::SetGameEngineData | ( | struct Main * | maggie, |
struct Scene * | scene, | ||
GlobalSettings * | gs, | ||
int | argc, | ||
char ** | argv | ||
) |
Definition at line 153 of file GPG_Application.cpp.
References Scene::id, m_argc, m_argv, m_globalSettings, m_maggie, m_startScene, m_startSceneName, ID::name, and NULL.
Referenced by main().
bool GPG_Application::startEmbeddedWindow | ( | STR_String & | title, |
const GHOST_TEmbedderWindowID | parent_window, | ||
const bool | stereoVisual, | ||
const int | stereoMode, | ||
const GHOST_TUns16 | samples = 0 |
||
) |
Definition at line 344 of file GPG_Application.cpp.
References GHOST_ISystem::createWindow(), GHOST_kDrawingContextTypeOpenGL, GHOST_kWindowStateEmbedded, GHOST_kWindowStateNormal, initEngine(), m_isEmbedded, m_mainWindow, startEngine(), and state.
Referenced by main().
bool GPG_Application::startEngine | ( | void | ) | [protected] |
Starts the game engine.
Definition at line 673 of file GPG_Application.cpp.
References KX_KetsjiEngine::AddScene(), GameDome::angle, KX_ISceneConverter::ConvertScene(), GameData::dome, FPS, frameTimerProc(), GAME_MAT_GLSL, GAME_MAT_TEXFACE, KX_Scene::GetBlenderScene(), Scene::gm, RAS_IRasterizer::Init(), KX_KetsjiEngine::InitDome(), GHOST_ISystem::installTimer(), kTimerFreq, m_argc, m_argv, m_blenderglslmat, m_blendermat, m_canvas, m_engineRunning, m_frameTimer, m_globalSettings, m_ketsjiengine, m_keyboard, m_maggie, m_mainWindow, m_mouse, m_networkdevice, m_pyGlobalDictString, m_pyGlobalDictString_Length, m_rasterizer, m_rendertools, m_sceneconverter, m_startScene, m_startSceneName, m_system, GlobalSettings::matmode, GameDome::mode, NULL, STR_String::Ptr(), GameDome::res, GameDome::resbuf, KX_KetsjiEngine::SetAnimFrameRate(), KX_ISceneConverter::SetGLSLMaterials(), KX_ISceneConverter::SetMaterials(), KX_KetsjiEngine::SetSceneConverter(), KX_KetsjiEngine::StartEngine(), STEREO_DOME, GameData::stereoflag, stopEngine(), GameDome::tilt, and GameDome::warptext.
Referenced by startEmbeddedWindow(), startFullScreen(), StartGameEngine(), and startWindow().
bool GPG_Application::startFullScreen | ( | int | width, |
int | height, | ||
int | bpp, | ||
int | frequency, | ||
const bool | stereoVisual, | ||
const int | stereoMode, | ||
const GHOST_TUns16 | samples = 0 , |
||
bool | useDesktop = false |
||
) |
Definition at line 369 of file GPG_Application.cpp.
References GHOST_ISystem::beginFullScreen(), GHOST_DisplaySetting::bpp, GHOST_DisplaySetting::frequency, GHOST_ISystem::getMainDisplayDimensions(), GHOST_kWindowStateFullScreen, initEngine(), m_mainWindow, GHOST_IWindow::setCursorVisibility(), GHOST_IWindow::setState(), startEngine(), GHOST_DisplaySetting::xPixels, and GHOST_DisplaySetting::yPixels.
Referenced by main().
bool GPG_Application::StartGameEngine | ( | int | stereoMode | ) |
Definition at line 402 of file GPG_Application.cpp.
References initEngine(), m_mainWindow, and startEngine().
Referenced by main().
bool GPG_Application::startWindow | ( | STR_String & | title, |
int | windowLeft, | ||
int | windowTop, | ||
int | windowWidth, | ||
int | windowHeight, | ||
const bool | stereoVisual, | ||
const int | stereoMode, | ||
const GHOST_TUns16 | samples = 0 |
||
) |
Definition at line 312 of file GPG_Application.cpp.
References GHOST_ISystem::createWindow(), GHOST_kDrawingContextTypeOpenGL, GHOST_kWindowStateNormal, initEngine(), m_mainWindow, GHOST_IWindow::setClientSize(), GHOST_IWindow::setCursorVisibility(), and startEngine().
Referenced by main().
void GPG_Application::stopEngine | ( | void | ) | [protected] |
Stop the game engine.
Definition at line 761 of file GPG_Application.cpp.
References NG_LoopBackNetworkDeviceInterface::Disconnect(), m_engineRunning, m_frameTimer, m_ketsjiengine, m_networkdevice, m_pyGlobalDictString, m_pyGlobalDictString_Length, m_sceneconverter, m_system, GHOST_ISystem::removeTimer(), and KX_KetsjiEngine::StopEngine().
Referenced by exitEngine(), and startEngine().
void GPG_Application::StopGameEngine | ( | ) |
int GPG_Application::m_argc [protected] |
Definition at line 164 of file GPG_Application.h.
Referenced by SetGameEngineData(), and startEngine().
char** GPG_Application::m_argv [protected] |
Definition at line 165 of file GPG_Application.h.
Referenced by SetGameEngineData(), and startEngine().
bool GPG_Application::m_blenderglslmat [protected] |
Definition at line 154 of file GPG_Application.h.
Referenced by initEngine(), and startEngine().
bool GPG_Application::m_blendermat [protected] |
Definition at line 153 of file GPG_Application.h.
Referenced by initEngine(), and startEngine().
GPG_Canvas* GPG_Application::m_canvas [protected] |
The game engine's canvas abstraction.
Definition at line 143 of file GPG_Application.h.
Referenced by exitEngine(), initEngine(), processEvent(), and startEngine().
GHOST_TStandardCursor GPG_Application::m_cursor [protected] |
Definition at line 125 of file GPG_Application.h.
bool GPG_Application::m_engineInitialized [protected] |
Engine construction state.
Definition at line 128 of file GPG_Application.h.
Referenced by exitEngine(), and initEngine().
bool GPG_Application::m_engineRunning [protected] |
Engine state.
Definition at line 130 of file GPG_Application.h.
Referenced by startEngine(), and stopEngine().
short GPG_Application::m_exitkey [protected] |
Definition at line 106 of file GPG_Application.h.
int GPG_Application::m_exitRequested [protected] |
Definition at line 114 of file GPG_Application.h.
Referenced by exitEngine(), getExitRequested(), handleKey(), and processEvent().
STR_String GPG_Application::m_exitString [protected] |
Definition at line 115 of file GPG_Application.h.
Referenced by getExitString(), and processEvent().
GHOST_ITimerTask* GPG_Application::m_frameTimer [protected] |
Definition at line 123 of file GPG_Application.h.
Referenced by startEngine(), and stopEngine().
GlobalSettings* GPG_Application::m_globalSettings [protected] |
Definition at line 116 of file GPG_Application.h.
Referenced by initEngine(), SetGameEngineData(), and startEngine().
bool GPG_Application::m_isEmbedded [protected] |
Running on embedded window
Definition at line 132 of file GPG_Application.h.
Referenced by handleKey(), and startEmbeddedWindow().
KX_KetsjiEngine* GPG_Application::m_ketsjiengine [protected] |
the gameengine itself
Definition at line 135 of file GPG_Application.h.
Referenced by exitEngine(), getGlobalSettings(), initEngine(), processEvent(), startEngine(), and stopEngine().
GPG_KeyboardDevice* GPG_Application::m_keyboard [protected] |
The game engine's keyboard abstraction.
Definition at line 139 of file GPG_Application.h.
Referenced by exitEngine(), handleKey(), initEngine(), and startEngine().
GPG_System* GPG_Application::m_kxsystem [protected] |
The game engine's system abstraction.
Definition at line 137 of file GPG_Application.h.
Referenced by exitEngine(), initEngine(), and processEvent().
struct Main* GPG_Application::m_maggie [protected] |
Definition at line 111 of file GPG_Application.h.
Referenced by initEngine(), SetGameEngineData(), and startEngine().
GHOST_IWindow* GPG_Application::m_mainWindow [protected] |
Definition at line 121 of file GPG_Application.h.
Referenced by handleCursorMove(), startEmbeddedWindow(), startEngine(), startFullScreen(), StartGameEngine(), startWindow(), and ~GPG_Application().
GPC_MouseDevice* GPG_Application::m_mouse [protected] |
The game engine's mouse abstraction.
Definition at line 141 of file GPG_Application.h.
Referenced by exitEngine(), handleButton(), handleCursorMove(), handleWheel(), initEngine(), and startEngine().
Network interface.
Definition at line 151 of file GPG_Application.h.
Referenced by exitEngine(), initEngine(), startEngine(), and stopEngine().
char* GPG_Application::m_pyGlobalDictString [protected] |
Definition at line 160 of file GPG_Application.h.
Referenced by startEngine(), stopEngine(), and ~GPG_Application().
int GPG_Application::m_pyGlobalDictString_Length [protected] |
Definition at line 161 of file GPG_Application.h.
Referenced by startEngine(), stopEngine(), and ~GPG_Application().
RAS_IRasterizer* GPG_Application::m_rasterizer [protected] |
the rasterizer
Definition at line 147 of file GPG_Application.h.
Referenced by exitEngine(), initEngine(), and startEngine().
GPC_RenderTools* GPG_Application::m_rendertools [protected] |
The game engine's platform dependent render tools.
Definition at line 145 of file GPG_Application.h.
Referenced by exitEngine(), initEngine(), and startEngine().
KX_ISceneConverter* GPG_Application::m_sceneconverter [protected] |
Converts Blender data files.
Definition at line 149 of file GPG_Application.h.
Referenced by startEngine(), and stopEngine().
struct Scene* GPG_Application::m_startScene [protected] |
Definition at line 110 of file GPG_Application.h.
Referenced by initEngine(), SetGameEngineData(), and startEngine().
STR_String GPG_Application::m_startSceneName [protected] |
Definition at line 109 of file GPG_Application.h.
Referenced by SetGameEngineData(), and startEngine().
GHOST_ISystem* GPG_Application::m_system [protected] |
Definition at line 119 of file GPG_Application.h.
Referenced by initEngine(), processEvent(), startEngine(), and stopEngine().