 |
Blamite Game Engine - blam!
00423.10.27.24.0533.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"
11 #include "OGRE/OgreLog.h"
13 #include "OGRE/Threading/OgreUniformScalableTask.h"
15 #include "OGRE/Overlay/OgreOverlaySystem.h"
25 class SdlInputHandler;
36 SDL_Window *mSdlWindow;
72 static void addResourceLocation(
const Ogre::String &archName,
const Ogre::String &typeName,
73 const Ogre::String &secName );
103 GraphicsSystem(
GameState *gameState =
nullptr, Ogre::String resourcePath = Ogre::String(
""), Ogre::ColourValue backgroundColour = Ogre::ColourValue( 0.2f, 0.4f, 0.6f ) );
108 void initialize(
const Ogre::String &windowTitle );
112 void handleWindowEvent(
const SDL_Event& evt);
113 SdlInputHandler* mInputHandler;
129 virtual void execute(
size_t threadId,
size_t numThreads );
137 SdlInputHandler* getInputHandler(
void) {
return mInputHandler; }
163 void messageLogged(
const Ogre::String& message, Ogre::LogMessageLevel lml,
bool maskDebug,
164 const Ogre::String& logName,
bool& skipThisMessage)
override;
GameEntityVec mGameEntities[Ogre::NUM_SCENE_MEMORY_MANAGER_TYPES]
Definition: GraphicsSystem.h:56
@ MoTypeItem
Definition: GameEntity.h:15
BLAM BlamConfigurationFile * GetEngineConfiguration()
Retrieves the main engine configuration file.
Definition: config.cpp:60
bool mUseMicrocodeCache
Definition: GraphicsSystem.h:63
Ogre::Window * getRenderWindow(void) const
Definition: GraphicsSystem.h:146
Ogre::String mPluginsFolder
Definition: GraphicsSystem.h:44
if(WIN32) set(OGRE_MEDIA_PATH "Media") elseif(APPLE) set(OGRE_MEDIA_PATH "Media") elseif(UNIX) set(OGRE_MEDIA_PATH "share/$
Definition: CMakeLists.txt:15
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
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:988
static void addResourceLocation(const Ogre::String &archName, const Ogre::String &typeName, const Ogre::String &secName)
Definition: GraphicsSystem.cpp:670
BlamCompositorPassRegistry * ogre_pass_registry
Definition: GraphicsSystem.h:101
const Ogre::String & getResourcePath(void) const
Definition: GraphicsSystem.h:157
GameEntityTransform * mTransform[NUM_GAME_ENTITY_BUFFERS]
Definition: GameEntity.h:53
float mThreadWeight
Definition: GraphicsSystem.h:58
const GameEntityVec & getGameEntities(Ogre::SceneMemoryMgrTypes type) const
Returns the GameEntities that are ready to be rendered.
Definition: GraphicsSystem.h:133
Ogre::Camera * mCamera
Definition: GraphicsSystem.h:42
void gameEntityRemoved(GameEntity *toRemove)
Definition: GraphicsSystem.cpp:1190
Ogre::MovableObject * mMovableObject
Definition: GameEntity.h:45
@ GAME_ENTITY_REMOVED
Definition: MqMessages.h:17
const Ogre::String & getWriteAccessFolder(void) const
Definition: GraphicsSystem.h:156
Ogre::uint32 mCurrentTransformIdx
Definition: GraphicsSystem.h:55
Ogre::String mWriteAccessFolder
Definition: GraphicsSystem.h:45
Ogre::v1::OverlaySystem * mOverlaySystem
Definition: GraphicsSystem.h:48
virtual void initMiscParamsListener(Ogre::NameValuePairList ¶ms)
Called right before initializing Ogre's first window, so the params can be customized.
Definition: GraphicsSystem.cpp:1068
Ogre::CompositorWorkspace * getCompositorWorkspace(void) const
Definition: GraphicsSystem.h:149
void messageLogged(const Ogre::String &message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String &logName, bool &skipThisMessage) override
Definition: GraphicsSystem.cpp:1102
float getAccumTimeSinceLastLogicFrame(void) const
Definition: GraphicsSystem.h:143
void update(float timeSinceLast)
Definition: BaseSystem.cpp:64
#define USER_DATA_PATH(path)
Macro to quickly access a user data folder.
Definition: config.h:41
Ogre::SceneNode * mSceneNode
Definition: GameEntity.h:44
Definition: BaseSystem.cpp:5
void loadTextureCache(void)
Definition: GraphicsSystem.cpp:687
ImFontConfig config
Definition: README.txt:49
bool getAlwaysAskForConfig(void) const
Definition: GraphicsSystem.h:153
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:1222
Ogre::SceneManager * getSceneManager(void) const
Definition: GraphicsSystem.h:147
Ogre::Window * mRenderWindow
Definition: GraphicsSystem.h:40
Ogre::SceneMemoryMgrTypes mType
Definition: GameEntity.h:54
virtual void stopCompositor(void)
Definition: GraphicsSystem.cpp:1086
unsigned long long uint64_t
Definition: stdint.h:18
StaticPluginLoader mStaticPluginLoader
Definition: GraphicsSystem.h:50
Definition: GameState.h:9
size_t debug_mode_thread_count
Definition: GraphicsSystem.h:99
void saveHlmsDiskCache(void)
Definition: GraphicsSystem.cpp:803
virtual void setupResources(void)
Definition: GraphicsSystem.cpp:845
const char * getMediaReadArchiveType(void) const
Definition: GraphicsSystem.cpp:1077
#define ENGINE_DATA_PATH(path)
Macro to quickly access a game engine data folder.
Definition: config.h:34
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:1053
#define OGRE_USE_SDL2
Definition: SdlEmulationLayer.h:8
Ogre::SceneManager * mSceneManager
Definition: GraphicsSystem.h:41
virtual ~GraphicsSystem()
Definition: GraphicsSystem.cpp:94
Ogre::Camera * getCamera(void) const
Definition: GraphicsSystem.h:148
MovableObjectType moType
Definition: GameEntity.h:25
virtual void registerHlms(void)
Definition: GraphicsSystem.cpp:888
@ Resources
Directory containing other resources and data, usually string tables and globals. Defaults to ....
Ogre::v1::OverlaySystem * getOverlaySystem(void) const
Definition: GraphicsSystem.h:150
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:727
const Ogre::String & getPluginsFolder(void) const
Definition: GraphicsSystem.h:155
GameEntity * gameEntity
Definition: GameEntityManager.h:18
void _notifyLogicSystem(BaseSystem *logicSystem)
Definition: GraphicsSystem.h:106
Media endif() install(DIRECTORY $
Definition: CMakeLists.txt:21
virtual void deinitialize(void)
Definition: BaseSystem.cpp:24
void deinitialize(void)
Definition: GraphicsSystem.cpp:535
Ogre::String mResourcePath
Definition: GraphicsSystem.h:46
bool mAlwaysAskForConfig
Definition: GraphicsSystem.h:61
void gameEntityAdded(const GameEntityManager::CreatedGameEntity *createdGameEntity)
Definition: GraphicsSystem.cpp:1147
Ogre::String resourceGroup
Definition: GameEntity.h:23
bool mQuit
Definition: GraphicsSystem.h:60
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:140
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:1211
Definition: GameEntity.h:35
void loadHlmsDiskCache(void)
Definition: GraphicsSystem.cpp:745
void setAlwaysAskForConfig(bool alwaysAskForConfig)
Definition: GraphicsSystem.cpp:1072
double timeSinceLast
Definition: ogre.cpp:56
void install(Ogre::Root *root)
Definition: StaticPluginLoader.cpp:104
Definition: GraphicsSystem.h:27
virtual void processIncomingMessage(Mq::MessageId messageId, const void *data)
Definition: GraphicsSystem.cpp:630
#define NUM_GAME_ENTITY_BUFFERS
Definition: GameEntity.h:11
Ogre::ColourValue mBackgroundColour
Definition: GraphicsSystem.h:65
const GameEntityVec * mThreadGameEntityToUpdate
Definition: GraphicsSystem.h:57
virtual void createResourceListener(void)
Optional override method where you can create resource listeners (e.g. for loading screens)
Definition: GraphicsSystem.h:94
bool operator()(const GameEntity *_l, const Ogre::Matrix4 *RESTRICT_ALIAS _r) const
Definition: GraphicsSystem.cpp:1127
Class used to make custom compositor passes available to OGRE.
Definition: compositor.h:52
void update(float timeSinceLast)
Definition: GraphicsSystem.cpp:569
_W64 unsigned int uintptr_t
Definition: stdint.h:52
bool getQuit(void) const
Definition: GraphicsSystem.h:141
Definition: GameEntityManager.h:16
Ogre::StringVector submeshMaterials
Definition: GameEntity.h:24
virtual void chooseSceneManager(void)
Definition: GraphicsSystem.cpp:1016
std::vector< GameEntity * > GameEntityVec
Definition: GameEntity.h:88
virtual void restartCompositor(void)
Definition: GraphicsSystem.cpp:1096
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:54
@ 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:1125
Ogre::CompositorWorkspace * mWorkspace
Definition: GraphicsSystem.h:43
GameState * mCurrentGameState
Definition: BaseSystem.h:14
GameEntityTransform initialTransform
Definition: GameEntityManager.h:19
Ogre::Root * getRoot(void) const
Definition: GraphicsSystem.h:145
Ogre::Root * mRoot
Definition: GraphicsSystem.h:39
bool mUseHlmsDiskCache
Definition: GraphicsSystem.h:62
virtual void createCamera(void)
Definition: GraphicsSystem.cpp:1040
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:550
BaseSystem * mLogicSystem
Definition: GraphicsSystem.h:33
@ LOGICFRAME_FINISHED
Definition: MqMessages.h:15