Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
reload_material_datablocks.hpp
Go to the documentation of this file.
1 #include "../console.h"
2 
6 #include "core.h"
7 
9 {
17  {
18  public:
20  {
21  name = "reload_material_datablocks";
22  description = "Rebuilds all OGRE datablocks from their original material tags.";
23  //aliases = { "" };
24 
26  }
27 
28  BlamResult Execute(std::vector<std::string> arguments)
29  {
30  if (UsingBgfx())
31  {
33  Blam::Logger::LogEvent("materials invalidated, rebaking all materials "
34  "(if many materials are active this could cause brief lag)");
35  }
36  else
37  {
39  Blam::Logger::LogEvent("datablocks rebuilt");
40  }
41 
42  return BlamResult::Success_OK;
43  }
44  };
45 }
ui.h
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
Blam::Rendering::Materials::RebuildDatablocks
BLAM void RebuildDatablocks()
Rebuilds ALL datablocks (including instances) from their original tags.
Definition: materials.cpp:708
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:36
logger.h
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:33
Blam::Resources::Console::ReloadMaterialDatablocksCommand::ReloadMaterialDatablocksCommand
ReloadMaterialDatablocksCommand()
Definition: reload_material_datablocks.hpp:19
UsingBgfx
bool UsingBgfx()
Definition: bgfx.cpp:63
rendering.h
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:35
Blam::Resources::Console::ReloadMaterialDatablocksCommand::Execute
BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition: reload_material_datablocks.hpp:28
Blam::RenderingBGFX::Materials::InvalidateAllMaterials
void InvalidateAllMaterials()
Definition: materials.cpp:1005
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:40
Blam::Resources::Console::ReloadMaterialDatablocksCommand
Class for the cls command.
Definition: reload_material_datablocks.hpp:16
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.