 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
2 #ifndef _Demo_GraphicsSystem_H_
3 #define _Demo_GraphicsSystem_H_
8 #include "OGRE/OgrePrerequisites.h"
9 #include "OGRE/OgreColourValue.h"
10 #include "OGRE/Overlay/OgreOverlayPrerequisites.h"
12 #include "OGRE/Threading/OgreUniformScalableTask.h"
14 #include "OGRE/Overlay/OgreOverlaySystem.h"
24 class SdlInputHandler;
35 SDL_Window *mSdlWindow;
111 void handleWindowEvent(
const SDL_Event& evt);
112 SdlInputHandler* mInputHandler;
128 virtual void execute(
size_t threadId,
size_t numThreads );
136 SdlInputHandler* getInputHandler(
void) {
return mInputHandler; }
GameEntityVec mGameEntities[Ogre::NUM_SCENE_MEMORY_MANAGER_TYPES]
Definition: GraphicsSystem.h:55
@ MoTypeItem
Definition: GameEntity.h:15
BLAM BlamConfigurationFile * GetEngineConfiguration()
Definition: config.cpp:58
bool mUseMicrocodeCache
Definition: GraphicsSystem.h:62
Ogre::Window * getRenderWindow(void) const
Definition: GraphicsSystem.h:145
Ogre::String mPluginsFolder
Definition: GraphicsSystem.h:43
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
void queueSendMessage(MessageQueueSystem *dstSystem, Mq::MessageId messageId, const T &msg)
Queues message 'msg' to be sent to a destination MessageQueueSystem.
Definition: MessageQueueSystem.h:66
virtual void loadResources(void)
Optional override method where you can perform resource group loading Must at least do ResourceGroupM...
Definition: GraphicsSystem.cpp:947
int width
Definition: bgfx.cpp:19
static void addResourceLocation(const Ogre::String &archName, const Ogre::String &typeName, const Ogre::String &secName)
Definition: GraphicsSystem.cpp:629
BlamCompositorPassRegistry * ogre_pass_registry
Definition: GraphicsSystem.h:100
const Ogre::String & getResourcePath(void) const
Definition: GraphicsSystem.h:156
GameEntityTransform * mTransform[NUM_GAME_ENTITY_BUFFERS]
Definition: GameEntity.h:53
float mThreadWeight
Definition: GraphicsSystem.h:57
const GameEntityVec & getGameEntities(Ogre::SceneMemoryMgrTypes type) const
Returns the GameEntities that are ready to be rendered.
Definition: GraphicsSystem.h:132
Ogre::Camera * mCamera
Definition: GraphicsSystem.h:41
void gameEntityRemoved(GameEntity *toRemove)
Definition: GraphicsSystem.cpp:1127
Ogre::MovableObject * mMovableObject
Definition: GameEntity.h:45
@ GAME_ENTITY_REMOVED
Definition: MqMessages.h:17
const Ogre::String & getWriteAccessFolder(void) const
Definition: GraphicsSystem.h:155
Ogre::uint32 mCurrentTransformIdx
Definition: GraphicsSystem.h:54
Ogre::String mWriteAccessFolder
Definition: GraphicsSystem.h:44
Ogre::v1::OverlaySystem * mOverlaySystem
Definition: GraphicsSystem.h:47
virtual void initMiscParamsListener(Ogre::NameValuePairList ¶ms)
Called right before initializing Ogre's first window, so the params can be customized.
Definition: GraphicsSystem.cpp:1027
Ogre::CompositorWorkspace * getCompositorWorkspace(void) const
Definition: GraphicsSystem.h:148
float getAccumTimeSinceLastLogicFrame(void) const
Definition: GraphicsSystem.h:142
void update(float timeSinceLast)
Definition: BaseSystem.cpp:64
#define USER_DATA_PATH(path)
Macro to quickly access a user data folder.
Definition: config.h:43
Ogre::SceneNode * mSceneNode
Definition: GameEntity.h:44
Definition: BaseSystem.cpp:5
void loadTextureCache(void)
Definition: GraphicsSystem.cpp:646
bool getAlwaysAskForConfig(void) const
Definition: GraphicsSystem.h:152
bool isWriteAccessFolder(const Ogre::String &folderPath, const Ogre::String &fileToSave)
Definition: GraphicsSystem.cpp:103
virtual void execute(size_t threadId, size_t numThreads)
Overload Ogre::UniformScalableTask.
Definition: GraphicsSystem.cpp:1159
Ogre::SceneManager * getSceneManager(void) const
Definition: GraphicsSystem.h:146
Ogre::Window * mRenderWindow
Definition: GraphicsSystem.h:39
Ogre::SceneMemoryMgrTypes mType
Definition: GameEntity.h:54
virtual void stopCompositor(void)
Definition: GraphicsSystem.cpp:1045
@ String
Represents a std::string.
Definition: globals.h:48
StaticPluginLoader mStaticPluginLoader
Definition: GraphicsSystem.h:49
Definition: GameState.h:9
size_t debug_mode_thread_count
Definition: GraphicsSystem.h:98
void saveHlmsDiskCache(void)
Definition: GraphicsSystem.cpp:762
virtual void setupResources(void)
Definition: GraphicsSystem.cpp:804
const char * getMediaReadArchiveType(void) const
Definition: GraphicsSystem.cpp:1036
#define ENGINE_DATA_PATH(path)
Macro to quickly access a game engine data folder.
Definition: config.h:36
Definition: BaseSystem.h:11
const MovableObjectDefinition * mMoDefinition
Definition: GameEntity.h:59
virtual Ogre::CompositorWorkspace * setupCompositor(void)
Virtual so that advanced samples such as Sample_Compositor can override this method to change the def...
Definition: GraphicsSystem.cpp:1012
#define OGRE_USE_SDL2
Definition: SdlEmulationLayer.h:8
Ogre::SceneManager * mSceneManager
Definition: GraphicsSystem.h:40
virtual ~GraphicsSystem()
Definition: GraphicsSystem.cpp:94
Ogre::Camera * getCamera(void) const
Definition: GraphicsSystem.h:147
MovableObjectType moType
Definition: GameEntity.h:25
virtual void registerHlms(void)
Definition: GraphicsSystem.cpp:847
@ Resources
Directory containing other resources and data, usually string tables and globals. Defaults to ....
Ogre::v1::OverlaySystem * getOverlaySystem(void) const
Definition: GraphicsSystem.h:149
GraphicsSystem(GameState *gameState=nullptr, Ogre::String resourcePath=Ogre::String(""), Ogre::ColourValue backgroundColour=Ogre::ColourValue(0.2f, 0.4f, 0.6f))
Definition: GraphicsSystem.cpp:53
void saveTextureCache(void)
Definition: GraphicsSystem.cpp:686
const Ogre::String & getPluginsFolder(void) const
Definition: GraphicsSystem.h:154
GameEntity * gameEntity
Definition: GameEntityManager.h:18
void _notifyLogicSystem(BaseSystem *logicSystem)
Definition: GraphicsSystem.h:105
virtual void deinitialize(void)
Definition: BaseSystem.cpp:24
void deinitialize(void)
Definition: GraphicsSystem.cpp:494
Ogre::String mResourcePath
Definition: GraphicsSystem.h:45
bool mAlwaysAskForConfig
Definition: GraphicsSystem.h:60
void gameEntityAdded(const GameEntityManager::CreatedGameEntity *createdGameEntity)
Definition: GraphicsSystem.cpp:1084
Ogre::String resourceGroup
Definition: GameEntity.h:23
bool mQuit
Definition: GraphicsSystem.h:59
sock planetquake com All rights reserved Quake III Arena is a registered trademark of id Inc This level may be electronically distributed only at NO CHARGE to the recipient in its current MUST include this txt file
Definition: chiropteraDM.txt:95
@ GAME_ENTITY_SCHEDULED_FOR_REMOVAL_SLOT
Definition: MqMessages.h:19
void setQuit(void)
Definition: GraphicsSystem.h:139
MessageId
Definition: MqMessages.h:12
void updateGameEntities(const GameEntityVec &gameEntities, float weight)
Updates the SceneNodes of all the game entities in the container, interpolating them according to wei...
Definition: GraphicsSystem.cpp:1148
Definition: GameEntity.h:35
void loadHlmsDiskCache(void)
Definition: GraphicsSystem.cpp:704
void setAlwaysAskForConfig(bool alwaysAskForConfig)
Definition: GraphicsSystem.cpp:1031
double timeSinceLast
Definition: ogre.cpp:57
void install(Ogre::Root *root)
Definition: StaticPluginLoader.cpp:104
int height
Definition: bgfx.cpp:20
Definition: GraphicsSystem.h:26
virtual void processIncomingMessage(Mq::MessageId messageId, const void *data)
Definition: GraphicsSystem.cpp:589
#define NUM_GAME_ENTITY_BUFFERS
Definition: GameEntity.h:11
Ogre::ColourValue mBackgroundColour
Definition: GraphicsSystem.h:64
const GameEntityVec * mThreadGameEntityToUpdate
Definition: GraphicsSystem.h:56
virtual void createResourceListener(void)
Optional override method where you can create resource listeners (e.g. for loading screens)
Definition: GraphicsSystem.h:93
bool operator()(const GameEntity *_l, const Ogre::Matrix4 *RESTRICT_ALIAS _r) const
Definition: GraphicsSystem.cpp:1064
Definition: compositor.h:29
void update(float timeSinceLast)
Definition: GraphicsSystem.cpp:528
_W64 unsigned int uintptr_t
Definition: stdint.h:52
bool getQuit(void) const
Definition: GraphicsSystem.h:140
Definition: GameEntityManager.h:16
Ogre::StringVector submeshMaterials
Definition: GameEntity.h:24
virtual void chooseSceneManager(void)
Definition: GraphicsSystem.cpp:975
std::vector< GameEntity * > GameEntityVec
Definition: GameEntity.h:88
virtual void restartCompositor(void)
Definition: GraphicsSystem.cpp:1055
Utility class to load plugins statically.
Definition: StaticPluginLoader.h:59
float mAccumTimeSinceLastLogicFrame
Tracks the amount of elapsed time since we last heard from the LogicSystem finishing a frame.
Definition: GraphicsSystem.h:53
@ DataRoot
The root of all user data. Defaults to BlamStrings::Utils::IO::GetEngineDataRoot().
virtual void initialize(void)
Definition: BaseSystem.cpp:16
Definition: SdlEmulationLayer.h:735
Definition: GraphicsSystem.cpp:1062
Ogre::CompositorWorkspace * mWorkspace
Definition: GraphicsSystem.h:42
GameState * mCurrentGameState
Definition: BaseSystem.h:14
GameEntityTransform initialTransform
Definition: GameEntityManager.h:19
Ogre::Root * getRoot(void) const
Definition: GraphicsSystem.h:144
Ogre::Root * mRoot
Definition: GraphicsSystem.h:38
bool mUseHlmsDiskCache
Definition: GraphicsSystem.h:61
virtual void createCamera(void)
Definition: GraphicsSystem.cpp:999
Ogre::String meshName
Definition: GameEntity.h:22
@ GAME_ENTITY_ADDED
Definition: MqMessages.h:16
BLAM SDL_Window * GetMainWindowHandle()
Retrieves the main window handle of the application, when using SDL.
Definition: main.cpp:729
BaseSystem * mLogicSystem
Definition: GraphicsSystem.h:32
@ LOGICFRAME_FINISHED
Definition: MqMessages.h:15