 |
Blamite Game Engine - blam!
00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
6 #include <sdl2/SDL_events.h>
8 #include <OGRE/Hlms/Pbs/OgreHlmsPbsDatablock.h>
9 #include <OGRE/Hlms/Unlit/OgreHlmsUnlitDatablock.h>
10 #include <bgfx/bgfx.h>
11 #include <Strings/components/classes/map/map.h>
28 #define GUI_RENDER_QUEUE_GROUP_ID 200
29 #define BLAM_OGRE_RESOURCE_GROUP Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME
31 #define SHADER_DEFAULT_UNLIT "@@unlit_shader"
32 #define SHADER_DEFAULT_PBR "@@pbr_shader"
33 #define SHADER_DEFAULT_DEFERRED_GBUFFER "@@deferred_gbuffer"
34 #define SHADER_DEFAULT_DEFERRED_GBUFFER_INSTANCED "@@deferred_gbuffer_instanced"
35 #define SHADER_DEFAULT_DEFERRED_LIGHT_PASS "@@deferred_light_pass"
36 #define SHADER_DEFAULT_DEFERRED_POSTPROCESS "@@deferred_postprocess"
37 #define SHADER_DEFAULT_SSAO "@@deferred_ssao"
38 #define SHADER_DEFAULT_SSAO_BLUR "@@deferred_ssao_blur"
39 #define SHADER_DEFAULT_SHADOW "@@deferred_shadow"
40 #define SHADER_DEFAULT_SHADOW_POINT "@@deferred_shadow_cube"
41 #define SHADER_DEFAULT_SHADOW_INSTANCED "@@deferred_shadow_instanced"
42 #define SHADER_DEFAULT_SHADOW_POINT_INSTANCED "@@deferred_shadow_cube_instanced"
43 #define VIEWID_DEFAULT VIEWID_GBUFFER
45 #define PASS_SHADOW "pass_shadow"
46 #define PASS_GBUFFER "pass_gbuffer"
47 #define PASS_FORWARD "pass_forward"
48 #define PASS_LIGHTING "pass_lighting"
49 #define PASS_POSTPROCESS "pass_postprocess"
50 #define PASS_SSAO "pass_ssao"
51 #define PASS_UI "pass_ui"
53 #define VIEWID_GBUFFER Blam::RenderingBGFX::Passes::GetViewID(PASS_GBUFFER)
54 #define VIEWID_LIGHTING Blam::RenderingBGFX::Passes::GetViewID(PASS_LIGHTING)
55 #define VIEWID_FORWARD Blam::RenderingBGFX::Passes::GetViewID(PASS_FORWARD)
56 #define VIEWID_POSTPROCESS Blam::RenderingBGFX::Passes::GetViewID(PASS_POSTPROCESS)
57 #define VIEWID_2D Blam::RenderingBGFX::Passes::GetViewID(PASS_UI)
59 #define BITMAP_DEFAULT_WHITE "@@shaders/default_bitmaps/white.bitmap"
60 #define BITMAP_DEFAULT_GRAY_50 "@@shaders/default_bitmaps/gray_50_percent.bitmap"
61 #define BITMAP_DEFAULT_NORMAL "@@shaders/default_bitmaps/default_normal.bitmap"
62 #define BITMAP_DEFAULT_ROUGHNESS "@@shaders/default_bitmaps/default_roughness.bitmap"
110 Ogre::HlmsTypes
hlms_type = Ogre::HlmsTypes::HLMS_UNLIT;
118 BlamMap<std::string, ogre_material_instance_data*>
instances = BlamMap<std::string, ogre_material_instance_data*>();
184 BlamVector3 scale, BlamVector3 local_aabb_min, BlamVector3 local_aabb_max);
246 BLAM bgfx::TextureHandle
LoadTexture2D(std::string
id,
void* pixel_data,
int width,
int height,
247 bgfx::TextureFormat::Enum format,
int bytes_per_line,
uint64_t flags = 0);
434 void TransformAABB(BlamVector3 model_min, BlamVector3 model_max,
const float* world_matrix,
435 BlamVector3* out_world_min, BlamVector3* out_world_max);
444 const float* world_matrix, BlamVector3* out_world_center,
float* out_world_radius);
620 BLAM std::vector<BlamWorldObject*>
RaycastScreen(
int screen_x,
int screen_y,
bool sort_by_distance =
true,
626 BLAM std::vector<BlamWorldObject*>
Raycast(BlamVector3 origin, BlamVector3 direction,
bool sort_by_distance =
true,
699 std::string tag_path =
"");
712 std::string tag_path =
"");
800 BLAM Ogre::TextureGpu*
LoadTexture2D(std::string
id,
void* pixel_data,
int width,
int height, Ogre::PixelFormatGpu format,
int bytes_per_line);
802 BLAM Ogre::TextureGpu*
CreateAtlasFromTextures(std::string
id, std::vector<bitmap*> bitmaps, std::vector<BlamVector2>* out_points);
834 BLAM Ogre::GpuProgramParametersSharedPtr
GetShaderParameters(std::string tag_path, Ogre::GpuProgramType shader_type);
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:36
Definition: tile_set.h:24
BLAM BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: world.cpp:56
void InvalidateMaterial(std::string tag_path)
Definition: materials.cpp:992
Definition: BlamHlmsListener.h:23
BLAM float GetCurrentFrameRate()
Definition: bgfx.cpp:443
BLAM BlamConfigurationFile * GetEngineConfiguration()
Retrieves the main engine configuration file.
Definition: config.cpp:60
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablockForPrimitives(std::string id)
Creates a default Unlit datablock for use with 2D and 3D primitives.
Definition: materials.cpp:1032
std::mutex pending_raycasts_lock
Definition: ogre.cpp:107
bool UsingBgfx()
Definition: bgfx.cpp:63
BLAM void SubmitLightUniforms(BlamVector3 cameraPos, BlamVector3 ambientColor)
Definition: lights.cpp:79
BLAM void SetupAtmosphere()
Definition: scenario.cpp:283
Ogre::RaySceneQueryResult result
Definition: ogre.cpp:72
std::vector< ogre_raycast_data * > pending_raycasts
Definition: ogre.cpp:106
#define tag_camr
Definition: camera.h:19
BlamVector3 gizmo_pos_3d
Definition: ogre.cpp:104
virtual void createScene02(void)
Definition: BaseSystem.cpp:40
BlamWorldObject_Tag * GetActiveCamera()
Definition: BlamWorldState.cpp:253
BLAM Ogre::GpuProgramParametersSharedPtr GetShaderParameters(std::string tag_path, Ogre::GpuProgramType shader_type)
Definition: shaders_raw.cpp:333
Ogre::Window * getRenderWindow(void) const
Definition: GraphicsSystem.h:148
bool needs_reload
Whether or not this material instance needs to be reloaded.
Definition: rendering.h:88
material * tag_instance
Pointer to the tag that uses this material instance.
Definition: rendering.h:87
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
void RenderObjects(float delta)
Definition: BlamWorldState.cpp:240
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablock(std::string id)
Creates a default Unlit datablock.
Definition: materials.cpp:1021
BLAM void RebuildDatablocks()
Rebuilds ALL datablocks (including instances) from their original tags.
Definition: materials.cpp:708
float fov
The camera's current field of view.
Definition: director.h:95
bool screenshot_pending
Definition: ogre.cpp:87
BLAM void SetImGuiHiddenState(bool hide)
Sets whether ImGUI should be hidden or not.
Definition: ogre.cpp:747
float zoom
Definition: director.h:194
BlamOgreInjections * ogre_injections
Definition: ogre.cpp:109
BLAM bool NeedsAtmosphereSetup()
Definition: scenario.cpp:356
BLAM void Shutdown()
Definition: bgfx.cpp:371
float far_clip_plane_distance
Definition: director.h:118
Definition: render_model.h:27
BLAM BlamVector3 GetMousePosition3D()
Definition: ogre.cpp:757
BLAM void LoadModel(render_model *model, std::string tag_path)
Definition: models.cpp:26
BLAM int GetShadowCasterCount()
Definition: shadow_casters.cpp:88
BlamQueryFlags flags
Definition: ogre.cpp:67
BLAM void SetShaderFlagsUniform(uint32_t flags=0, bool use_globals=true)
Definition: shader_uniforms.cpp:153
Ogre::HlmsTypes hlms_type
The HLMS type of this material.
Definition: rendering.h:110
BLAM BlamUIWidget_Group * GetUIRoot()
Retrieves the root UI group widget.
Definition: ui.cpp:87
BLAM void ReleaseShaders()
Definition: shaders.cpp:110
Ogre::SceneNode * scene_node
Definition: world_objects.h:171
std::string referencing_tag_path
The path of the tag that uses this material instance.
Definition: rendering.h:85
BLAM Ogre::Window * GetRenderWindow()
Retrieves the primary OGRE rendering window.
Definition: ogre.cpp:690
BLAM int GetLightCacheIndex(BlamWorldObject *object)
Definition: lights.cpp:66
BlamVector3 GetPosition()
Definition: BlamWorldObject.cpp:222
BLAM bool Use2DCamera()
Definition: director.cpp:74
BLAM std::vector< BlamTagData * > * GetLoadedTags()
Retrieves the list of loaded tag data.
Definition: tags.cpp:157
BLAM void RenderLoop()
Definition: bgfx.cpp:161
BLAM bool LoadPBSDatablockFromMaterialTag(Ogre::HlmsPbsDatablock *datablock, material *material_tag, std::string tag_path="")
Loads a PBS (Physically-Based Shading) datablock from a material tag.
Definition: materials.cpp:378
BLAM bgfx::ProgramHandle GetDefaultProgram()
Definition: shaders.cpp:90
BLAM int GetRenderHeight()
Retrieves the current height of the viewport.
Definition: bgfx.cpp:428
BLAM void LoadShader(shader *program, std::string tag_path)
Definition: shaders_hlms.cpp:264
BLAM void ReloadPendingShaders()
Definition: shaders.cpp:121
BLAM BlamDirector2D * GetCamera2D()
Definition: director.cpp:69
BLAM void HandleWindowReisze(int width, int height)
Instructs OGRE to handle a window resize.
Definition: ogre.cpp:650
Class used to store OGRE material information.
Definition: rendering.h:103
real field_of_view
Definition: camera.h:26
@ QF_EXCLUDE_GIZMOS
Definition: world_objects.h:81
std::thread::id render_thread_id
Definition: ogre.cpp:93
BLAM Ogre::HlmsPbsDatablock * CreateDefaultPbsDatablockForPrimitives(std::string id)
Creates a default PBS datablock for use with 2D and 3D primitives.
Definition: materials.cpp:1073
float near_clip_plane_distance
Definition: director.h:117
real time
Definition: sky_atm_parameters.h:29
BLAM bgfx::ProgramHandle GetProgram(std::string name)
Definition: shaders.cpp:100
BLAM bgfx::TextureHandle get_newest_bitmap()
Definition: bitmaps.cpp:463
BLAM void FillInstanceParameterBuffer(float *address, BlamWorldObject_Tag *object, shader *program)
Definition: shaders_hlms.cpp:223
BLAM void TakeScreenshot()
Instructs OGRE to save a screenshot on the next frame.
Definition: ogre.cpp:700
Demo::GraphicsSystem * ogre_graphics_system
Definition: ogre.cpp:75
BLAM void DisplayDetailedCrashScreen(std::string expression, std::string file, int line, std::string message)
Displays a detailed crash screen.
Definition: ogre.cpp:731
bool ogre_use_render_thread
Definition: ogre.cpp:86
BLAM int MaxTicksPerSecond()
Retrieves the maximum number of ticks per second.
Definition: tick.cpp:217
BLAM bgfx::ProgramHandle GetMaterialProgram(std::string material_tag_path)
Definition: materials.cpp:956
BLAM BlamUIWidget_CrashScreen * GetCrashScreenWidget()
Retrieves the built-in crash screen widget.
Definition: ui.cpp:300
BLAM Ogre::Camera * Get2DCamera()
Retrieves the camera used to handle 2D rendering.
Definition: ogre.cpp:710
BLAM void CreateDefaultUniforms()
Definition: shader_uniforms.cpp:11
BLAM int ShowWin32ErrorDialog(std::string message, BlamResult error, bool allow_continue, bool allow_safemode)
Shows an Error dialog with the specified error details and result handle.
Definition: errors.cpp:125
BLAM BlamVector2 GetScreenPointFrom3DPoint(BlamVector3 point)
Definition: ogre.cpp:767
BLAM scenario * GetActiveScenarioTag()
Retrieves the currently loaded scenario tag.
Definition: scenario.cpp:225
BLAM bool ReloadShader(std::string name)
Definition: shaders.cpp:79
BLAM void RenderThread()
Function used to handle the render thread.
Definition: ogre.cpp:569
BLAM void EndFrame()
Ends ImGUI drawing for the current frame.
Definition: imgui.cpp:232
BLAM Ogre::HlmsPbsDatablock * CreateDefaultPbsDatablock(std::string id)
Creates a default PBS datablock.
Definition: materials.cpp:1062
Ogre::Item * __debug_floor_item
Definition: ogre.cpp:98
BLAM void PrepareCamera()
Prepares the director for use.
Definition: director.cpp:7
BLAM void SetViewClearFlags(uint16_t flags)
Definition: bgfx.cpp:406
BLAM void ReleaseTextures()
Definition: bitmaps.cpp:495
BlamTagData * tag_data
Pointer to the tag data associated with this object.
Definition: world_objects.h:304
bool rendering_ready
Definition: ogre.cpp:94
BLAM double GetDeltaTime()
Retrieves delta time that has passed since the previous frame was completed.
Definition: ogre.cpp:695
Ogre::SceneManager * getSceneManager(void) const
Definition: GraphicsSystem.h:149
BLAM void ProcessSDLEvents(SDL_Event *event)
Function used to allow OGRE to handle SDL events.
Definition: ogre.cpp:629
BLAM void DestroyWorldStateIfMarked()
Destroys the current world state if marked for destruction.
Definition: world.cpp:42
Class representing a tag-based world object.
Definition: world_objects.h:278
unsigned long long uint64_t
Definition: stdint.h:18
BLAM Ogre::TextureGpu * LoadTexture2D(std::string id, void *pixel_data, int width, int height, Ogre::PixelFormatGpu format, int bytes_per_line)
Loads a 2D texture from data in memory.
Definition: textures.cpp:156
BLAM void ForceReloadAllShaders()
Definition: shaders.cpp:133
void mtxOrtho(float *_result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _homogeneousNdc)
Definition: ogre.cpp:117
BLAM Ogre::TextureGpu * CreateAtlasFromTextures(std::string id, std::vector< bitmap * > bitmaps, std::vector< BlamVector2 > *out_points)
BLAM void ReloadPendingBitmaps()
Reloads all bitmaps that are currently pending a reload.
BlamQueryFlags
Definition: world_objects.h:45
BLAM void AddShadowCaster(BlamWorldObject_TagLight *object)
Definition: shadow_casters.cpp:11
volatile bool zoom_level_changed_this_frame
Definition: ogre.cpp:96
BLAM void ReleaseModels()
Definition: models.cpp:230
size_t debug_mode_thread_count
Definition: GraphicsSystem.h:99
BLAM std::vector< BlamWorldObject * > RaycastScreenNormalized(float screen_normalized_x, float screen_normalized_y, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
Definition: ogre.cpp:820
bool ogre_render_thread_stopped
Definition: ogre.cpp:84
BLAM bool NeedsWorldStateUpdate()
Checks if the world state needs to be re-prepared.
Definition: scenario.cpp:25
BLAM void LoadTileset(tile_set *tileset, std::string tag_path)
Definition: tilesets.cpp:71
BLAM BlamOrientedBoundingBox CreateOBBFromAABB(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale, BlamVector3 local_aabb_min, BlamVector3 local_aabb_max)
Definition: raycast.cpp:82
BLAM uint16_t CalculateInstanceBufferElementCount(shader *program)
Definition: shaders_hlms.cpp:251
ogre_material_instance_data * CreateNewInstance(BlamTagData *referencing_tag)
Creates a new instance of this material.
Definition: ogre_material_info_data.cpp:5
BLAM bgfx::TextureHandle LoadTexture2D(std::string id, void *pixel_data, int width, int height, bgfx::TextureFormat::Enum format, int bytes_per_line, uint64_t flags=0)
Loads a 2D texture from data in memory.
Definition: bitmaps.cpp:515
BLAM BlamVector3 GetGizmoMousePosition3D()
Definition: ogre.cpp:762
BLAM bool BuildDatablockFromTag(material *material_tag, std::string tag_path)
Creates an OGRE material datablock from a material tag.
Definition: materials.cpp:795
BLAM Ogre::TextureGpu * GetTextureFromTag(std::string tag_path)
Retrieves an OGRE texture from a tag path.
Definition: textures.cpp:109
BLAM bool LoadUnlitDatablockFromMaterialTag(Ogre::HlmsUnlitDatablock *datablock, material *material_tag, std::string tag_path="")
Loads an Unlit datablock from a material tag.
Definition: materials.cpp:211
BlamMap< std::string, ogre_material_instance_data * > instances
A map containing all instances of this material.
Definition: rendering.h:118
BLAM void BuildTextureFromTag(bitmap *bitmap_tag, std::string tag_path)
Loads a texture into OGRE from a bitmap tag.
Definition: textures.cpp:97
BLAM BlamVector2 GetScreenPointFrom3DPoint(BlamVector3 position)
Definition: bgfx.cpp:463
BLAM uint64_t GetTotalRuntimeTicks()
Gets the total amount of ticks that have elapsed during program runtime.
Definition: tick.cpp:242
BLAM void Render()
Renders all UI to the screen.
Definition: ui.cpp:64
Definition: sky_atm_parameters.h:27
BLAM void Shutdown()
Shuts down the UI system.
Definition: ui.cpp:78
real near_clip_distance
Definition: camera.h:27
BLAM bool GetImGuiHiddenState()
Checks whether ImGUI is currently hidden or not.
Definition: ogre.cpp:752
bool IsViewportMode2D()
Definition: bgfx.cpp:555
BLAM void WriteScreenshot()
Saves a screenshot of the current frame to a file.
Definition: utils.cpp:25
BLAM int GetTilesetSourceCount(std::string tag_path)
Definition: tilesets.cpp:171
void ExtractFrustum(BlamFrustum *out_frustum, const float *vp_matrix)
Definition: culling.cpp:36
Runtime state for a single shadow-casting light.
Definition: types.h:136
BLAM void LoadPendingTilesets()
Definition: tilesets.cpp:94
@ QF_NONE
Definition: world_objects.h:79
Ogre::Camera * getCamera(void) const
Definition: GraphicsSystem.h:150
Definition: shader_program.h:24
BLAM Ogre::MaterialPtr GetRawShaderMaterial(std::string tag_path)
Definition: shaders_raw.cpp:321
BLAM void ShutdownCamera()
Destroys the director and cleans up any data related to it.
Definition: director.cpp:31
BlamWorldObject_Tag * GetShadowCasterAt(int index)
Definition: shadow_casters.cpp:93
BLAM bgfx::UniformHandle GetUniform(std::string id)
Definition: shader_uniforms.cpp:174
void TransformAABB(BlamVector3 model_min, BlamVector3 model_max, const float *world_matrix, BlamVector3 *out_world_min, BlamVector3 *out_world_max)
Definition: culling.cpp:151
int max_2d_z_depth
Definition: ogre.cpp:89
Definition: material.h:54
BLAM Ogre::HlmsDatablock * GetShaderDatablock(std::string tag_path)
Definition: shaders_hlms.cpp:288
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 state
Definition: chiropteraDM.txt:94
void ReleaseMaterials()
Definition: materials.cpp:1014
BLAM void RemoveShadowCaster(BlamWorldObject *object)
Definition: shadow_casters.cpp:47
unsigned int uint32_t
Definition: stdint.h:17
std::vector< BlamWorldObject * > raycast(Ogre::Ray ray, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
Definition: ogre.cpp:845
virtual void destroyScene(void)
Definition: BaseSystem.cpp:48
bool needs_reload
Whether or not this material needs to be reloaded.
Definition: rendering.h:108
BLAM bool BuildMaterialFromTag(material *material_tag, std::string tag_path)
Definition: materials.cpp:755
@ QF_ANY
Definition: world_objects.h:80
Definition: texture_storage.h:91
BLAM Ogre::MaterialPtr LoadRawShader(shader *shader, std::string tag_path)
Definition: shaders_raw.cpp:116
BLAM void PrepareScreenQuad()
Definition: bgfx.cpp:515
Ogre::HlmsDatablock * instance_datablock
The datablock used for this material instance.
Definition: rendering.h:86
void deinitialize(void)
Definition: GraphicsSystem.cpp:547
Data structure used to store OGRE material instance data.
Definition: rendering.h:82
BLAM void HandleWindowReisze(int width, int height)
Definition: bgfx.cpp:385
BLAM bool Initialize()
Definition: bgfx.cpp:106
BLAM void BuildTextureFromTag(bitmap *bitmap_tag, std::string tag_path)
Loads a texture into bgfx from a bitmap tag.
Definition: bitmaps.cpp:372
BLAM std::vector< BlamRenderPass * > GetPassList()
Definition: bgfx.cpp:540
BLAM BlamRay CreateRayFromViewportPoint(int screen_x, int screen_y)
Constructs a world-space ray from a screen-space cursor position.
Definition: raycast.cpp:10
BLAM Demo::GraphicsSystem * GetGraphicsSystem()
Retrieves the graphics system used by OGRE.
Definition: ogre.cpp:645
BLAM BlamVector3 GetGizmoMousePosition3D()
Definition: bgfx.cpp:550
BLAM bool Initialize()
Initializes the OGRE rendering library.
Definition: ogre.cpp:140
Namespace for things relating to rendering.
Definition: rendering.h:456
BLAM mesh * GetModelFromTagPath(std::string tag_path)
Definition: models.cpp:220
void InvalidateAllMaterials()
Definition: materials.cpp:1005
Class representing the Director.
Definition: director.h:27
BLAM int GetRenderHeight()
Retrieves the current height of the OGRE viewport.
Definition: ogre.cpp:685
float last_2d_zoom_level
Definition: ogre.cpp:95
@ QF_ENGINE_GIZMO
Definition: world_objects.h:47
void TransformSphere(BlamVector3 model_center, float model_radius, const float *world_matrix, BlamVector3 *out_world_center, float *out_world_radius)
Definition: culling.cpp:206
bool data_is_tag
Whether or not tagref_address points to tag data, or the tag's path.
Definition: tags.h:296
Definition: world_objects.h:337
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
BLAM BlamWorldObject_Tag * GetFirstDirectionalShadowCaster()
**
Definition: shadow_casters.cpp:64
BLAM Ogre::FilterOptions ConvertBitmapFilterMode(bitmap_filtering_mode filter_mode)
Converts a bitmap filtering mode enum value to the equivalent OGRE filtering mode value.
Definition: utils.cpp:83
BLAM Ogre::MaterialPtr GetTilesetMaterial(std::string tag_path, int tile_index)
Definition: tilesets.cpp:158
uint16_t max_results
Definition: ogre.cpp:68
tag_reference atmosphere
Definition: scenario.h:38
BLAM void LoadPendingModels()
Definition: models.cpp:249
Ogre::Window * renderWindow
Definition: ogre.cpp:76
Class representing a world object.
Definition: world_objects.h:138
bool SphereInFrustum(const BlamFrustum *frustum, BlamVector3 center, float radius)
Definition: culling.cpp:132
BLAM void ReloadPendingMaterials()
Reloads all datablocks which are flagged as requiring a reload.
Definition: materials.cpp:891
BLAM void ReloadPendingBitmaps()
Reloads all bitmaps that are currently pending a reload.
Definition: textures.cpp:128
BLAM BlamVector3 GetMousePosition3D()
Definition: bgfx.cpp:545
volatile bool render_thread_paused
Definition: ogre.cpp:92
double timeSinceLast
Definition: ogre.cpp:79
BLAM bool WasModelReloaded(std::string tag_path)
Definition: models.cpp:311
#define WORLD_OBJECT_USER_KEY
Definition: world_objects.h:18
real far_clip_distance
Definition: camera.h:28
bool hide_imgui
Definition: ogre.cpp:90
Definition: GraphicsSystem.h:27
BLAM uint64_t GetDefault2DStateFlags()
Definition: bgfx.cpp:433
BLAM void PrepareNewWorldState()
Prepares a new world state.
Definition: scenario.cpp:30
BLAM Ogre::SceneManager * Get2DSceneManager()
Retrieves the scene manager used to handle 2D rendering.
Definition: ogre.cpp:705
BLAM void ApplyMaterialParameters(mesh::submesh *submesh, std::string material_tag_path)
Definition: materials.cpp:772
BLAM float * GetCameraProjectionMatrix()
Definition: bgfx.cpp:458
BLAM Ogre::HlmsLowLevelDatablock * GetTilesetDatablock(std::string tag_path, int tile_index)
Definition: tilesets.cpp:145
void update(float timeSinceLast)
Definition: GraphicsSystem.cpp:581
BLAM bgfx::TextureHandle GetDefaultTexture()
Definition: bitmaps.cpp:478
BLAM Ogre::MeshPtr GetModelFromTagPath(std::string tag_path)
Definition: models.cpp:268
BLAM Ogre::Light * CreateLightFromTag(light *light)
Definition: lights.cpp:9
BLAM float * GetCameraViewMatrix()
Definition: bgfx.cpp:453
bool getQuit(void) const
Definition: GraphicsSystem.h:143
volatile bool pause_render_thread
Definition: ogre.cpp:91
Definition: BlamHlmsListener.h:7
BLAM ogre_material_instance_data * CreateDatablockInstance(std::string tag_path, std::string referencing_tag_path)
Creates a new datablock instance from a material tag path, and a referencing tag path.
Definition: materials.cpp:983
BLAM void DisplayBasicCrashScreen(std::string additional_info="")
Displays a basic crash screen, with an optional message.
Definition: ogre.cpp:715
bitmap_filtering_mode
Definition: bitmap.h:24
Ogre::Timer timer
Definition: ogre.cpp:78
bool sort_by_distance
Definition: ogre.cpp:69
BLAM void TakeScreenshot()
Definition: bgfx.cpp:418
virtual void createScene01(void)
Definition: BaseSystem.cpp:32
void * address
The address pointing to the start of the tag's data.
Definition: tags.h:132
Ogre::uint64 startTime
Definition: ogre.cpp:80
BlamVector3 camera_direction
Definition: director.h:193
BLAM std::vector< BlamWorldObject * > Raycast(BlamVector3 origin, BlamVector3 direction, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
Definition: ogre.cpp:833
BLAM void LoadDefaultShaders()
Definition: shaders.cpp:10
bool ogre_stop_render_thread
Definition: ogre.cpp:85
bool AABBInFrustum(const BlamFrustum *frustum, BlamVector3 aabb_min, BlamVector3 aabb_max)
Definition: culling.cpp:99
#define BLAM
Definition: rendering.h:25
BLAM std::vector< BlamWorldObject * > RaycastScreen(int screen_x, int screen_y, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
Definition: ogre.cpp:785
bool post_init_needs_datablock_update
Definition: ogre.cpp:88
BLAM float GetAverageFrameRate()
Definition: bgfx.cpp:448
BlamTextureRef GetTextureRefFromTag(std::string tag_path)
Definition: bitmaps.cpp:566
BLAM void DestroyUniforms()
Definition: shader_uniforms.cpp:141
void initialize(const Ogre::String &windowTitle)
Definition: GraphicsSystem.cpp:126
BLAM bool Initialize()
Initializes the UI system.
Definition: ui.cpp:19
BLAM bool DebugToolsEnabled()
Checks whether or not debug tools are enabled.
Definition: engine_definitions.cpp:209
Class used to contain and access tag data.
Definition: tags.h:125
bool persistent_reload
Whether or not to continuously update this material (ie, live editing).
Definition: rendering.h:109
std::string tag_path
The tag path that this material was loaded from.
Definition: rendering.h:106
BLAM bgfx::ViewId ReserveViewID()
Definition: bgfx.cpp:520
Ogre::Camera * camera2
Definition: ogre.cpp:101
float far_clip_plane_distance
Definition: director.h:198
Definition: director.h:184
BLAM Ogre::HlmsDatablock * GetDatablockFromTag(std::string tag_path)
Retrieves an OGRE datablock from a material tag path.
Definition: materials.cpp:950
BLAM void SetDefault2DStateFlags(uint64_t flags)
Definition: bgfx.cpp:438
float near_clip_plane_distance
Definition: director.h:197
Definition: SdlEmulationLayer.h:735
BLAM BlamWorldObject_Tag * GetLightCacheAt(int index)
Definition: lights.cpp:239
ogre_material_info_data * original_material
Pointer to the original material information.
Definition: rendering.h:84
BlamVector3 camera_pos
Definition: director.h:192
Definition: texture_storage.h:33
void * tagref_address
The address of the tagref data.
Definition: tags.h:295
BLAM ogre_material_instance_data * GetDatablockInstanceFromTag(std::string tag_path, std::string referencing_tag_path)
Retrieves a datablock instance from a material tag path, and a referencing tag path.
Definition: materials.cpp:962
BLAM void SetResetFlags(uint32_t flags)
Definition: bgfx.cpp:412
bool persistent_reload
Whether or not to continuously update this material (ie, live editing).
Definition: rendering.h:89
BLAM void LoadModel(render_model *model, std::string tag_path)
Definition: models.cpp:226
Ogre::Root * getRoot(void) const
Definition: GraphicsSystem.h:147
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:88
unsigned short uint16_t
Definition: stdint.h:16
BLAM int GetRenderWidth()
Retrieves the current width of the viewport.
Definition: bgfx.cpp:423
BLAM void PauseRenderThread()
Pauses the render thread.
Definition: ogre.cpp:582
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:84
BLAM bool HasZoomLevelChanged()
Definition: ogre.cpp:940
BLAM void ResumeRenderThread()
Resumes the render thread.
Definition: ogre.cpp:592
Ogre::Ray ray
Definition: ogre.cpp:66
Ogre::HlmsDatablock * datablock
The datablock used for this material.
Definition: rendering.h:107
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:343
BLAM int GetLightCacheCount()
Definition: lights.cpp:234
Definition: BlamOgreInjections.h:7
void beginFrameParallel(void)
Definition: BaseSystem.cpp:56
BLAM void RefreshLightCache()
Definition: lights.cpp:27
BlamVector3 mouse_pos_3d
Definition: ogre.cpp:103
void OnBitmapTagUnloading(std::string tag_path)
Definition: bitmaps.cpp:619
Ogre::SceneManager * scene_manager_2d
Definition: ogre.cpp:102
BLAM bgfx::ViewId GetViewID(std::string id)
Definition: bgfx.cpp:527
BLAM void Shutdown()
Shuts down OGRE and cleans up any memory used by it.
Definition: ogre.cpp:598
void finishFrameParallel(void)
Definition: BaseSystem.cpp:72
BLAM bgfx::TextureHandle GetTextureFromTag(std::string tag_path)
Retrieves an OGRE texture from a tag path.
Definition: bitmaps.cpp:453
BLAM void RenderLoop()
Function to handle the render loop.
Definition: ogre.cpp:263
BLAM void UnloadModels()
Definition: models.cpp:291
BLAM BlamRenderPass * GetPass(std::string id)
Definition: bgfx.cpp:502
Definition: rendering.h:133
BLAM int FindLightSlotForShadowState(BlamShadowCasterState *state)
Definition: lights.cpp:210
bool ogre_initialized
Definition: ogre.cpp:82
bool processed
Definition: ogre.cpp:71
BLAM void LoadDefaultTextures()
Definition: bitmaps.cpp:554
std::string tag_class
The tag's short class name.
Definition: tags.h:146
BLAM int * GetGlobalAsInteger(std::string name)
Retrieves a global's value as an int.
Definition: globals.cpp:391
BLAM int GetRenderWidth()
Retrieves the current width of the OGRE viewport.
Definition: ogre.cpp:680
volatile bool lock
Whether or not the queue is currently locked to aid in thread safety.
Definition: queue.cpp:17