Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
rendering.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 
5 #include <sdl2/SDL.h>
6 #include <sdl2/SDL_events.h>
7 
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>
12 
13 #include <string>
14 #include <vector>
15 
20 #include "api/v1/types/tags.h"
23 
24 #ifndef BLAM
25 #define BLAM
26 #endif
27 
28 #define GUI_RENDER_QUEUE_GROUP_ID 200
29 #define BLAM_OGRE_RESOURCE_GROUP Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME
30 
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
44 
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"
52 
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)
58 
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"
63 
64 struct material;
65 struct render_model;
66 struct light;
67 struct shader;
68 struct shader_program;
69 struct tile_set;
71 class BlamRenderPass;
73 struct BlamTextureRef;
74 struct BlamFrustum;
75 
83 {
85  std::string referencing_tag_path = "";
86  Ogre::HlmsDatablock* instance_datablock = nullptr;
87  material* tag_instance = nullptr;
88  bool needs_reload = false;
89  bool persistent_reload = false;
90 };
91 
92 /*struct tile_data
93 {
94  uint32_t tile_index;
95 };*/
96 
104 {
105 public:
106  std::string tag_path = "";
107  Ogre::HlmsDatablock* datablock = nullptr;
108  bool needs_reload = false;
109  bool persistent_reload = false;
110  Ogre::HlmsTypes hlms_type = Ogre::HlmsTypes::HLMS_UNLIT;
111 
118  BlamMap<std::string, ogre_material_instance_data*> instances = BlamMap<std::string, ogre_material_instance_data*>();
119 
128 };
129 
134 {
135 
136 };
137 
138 bool UsingBgfx();
139 
140 namespace Blam::RenderingBGFX
141 {
142  BLAM bool Initialize();
143 
144  BLAM void RenderLoop();
145 
146  BLAM void Shutdown();
147 
148  BLAM void HandleWindowReisze(int width, int height);
149 
150  BLAM void SetViewClearFlags(uint16_t flags);
151  BLAM void SetResetFlags(uint32_t flags);
152 
153  BLAM void TakeScreenshot();
154 
160  BLAM int GetRenderWidth();
161 
167  BLAM int GetRenderHeight();
168 
171 
172  BLAM float* GetCameraViewMatrix();
174  BLAM BlamVector2 GetScreenPointFrom3DPoint(BlamVector3 position);
175  BLAM void PrepareScreenQuad();
176 
177  BLAM BlamVector3 GetMousePosition3D();
178  BLAM BlamVector3 GetGizmoMousePosition3D();
179 
183  BLAM BlamOrientedBoundingBox CreateOBBFromAABB(BlamVector3 position, BlamVector3 rotation,
184  BlamVector3 scale, BlamVector3 local_aabb_min, BlamVector3 local_aabb_max);
185 
203  BLAM BlamRay CreateRayFromViewportPoint(int screen_x, int screen_y);
204 
205  bool IsViewportMode2D();
206 
210  namespace Textures
211  {
218  BLAM void BuildTextureFromTag(bitmap* bitmap_tag, std::string tag_path);
219 
227  BLAM bgfx::TextureHandle GetTextureFromTag(std::string tag_path);
228 
232  BLAM void ReloadPendingBitmaps();
233 
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);
248 
249  BLAM bgfx::TextureHandle get_newest_bitmap();
250 
254  BLAM bgfx::TextureHandle GetDefaultTexture();
255 
256  BLAM void ReleaseTextures();
257 
258  BLAM void LoadDefaultTextures();
259 
260  // Get the abstract texture ref for a bitmap tag. On first call,
261  // uploads the bitmap's pixel data into the appropriate size-class
262  // array and returns a ref. Subsequent calls return the cached ref.
263  //
264  // Returns invalid ref if the tag isn't loaded or the upload fails.
265  //
266  // In Phase 1, nothing in the engine currently calls this - it's
267  // available for testing. Phase 2 will route material textures
268  // through this API.
269  BlamTextureRef GetTextureRefFromTag(std::string tag_path);
270 
271  // Hook for the tag system. Call this from the tag unload path
272  // BEFORE the bitmap's pixel data buffer goes away. Releases both
273  // GPU forms of this texture (raw handle and array ref) and
274  // removes the entry from the texture map.
275  //
276  // Safe to call for any tag path - if the path doesn't have a
277  // tracked texture, this is a no-op.
278  //
279  // Implementation lives in bitmaps.cpp.
280  void OnBitmapTagUnloading(std::string tag_path);
281 
282  }
283 
284  namespace Models
285  {
286  BLAM void LoadModel(render_model* model, std::string tag_path);
287  BLAM mesh* GetModelFromTagPath(std::string tag_path);
288 
289  BLAM void ReleaseModels();
290  }
291 
292  namespace Materials
293  {
294  BLAM bool BuildMaterialFromTag(material* material_tag, std::string tag_path);
295  BLAM void ApplyMaterialParameters(mesh::submesh* submesh, std::string material_tag_path);
296  BLAM bgfx::ProgramHandle GetMaterialProgram(std::string material_tag_path);
297 
298  // Marks a single material's bake as stale. Next draw using this
299  // material rebuilds the bake from the current tag state. Cheap -
300  // just flips a flag, no allocation.
301  //
302  // Call this from:
303  // - The editor when a material's properties are edited live
304  // - Any code that mutates a material tag at runtime
305  void InvalidateMaterial(std::string tag_path);
306 
307  // Marks ALL material bakes as stale. Use this when a global
308  // state change makes per-material bake assumptions invalid.
309  //
310  // Currently we recommend calling this from the texture-reload
311  // path (Textures::ReleaseTextures, hot-reload of a bitmap, etc),
312  // because bakes hold cached bgfx::TextureHandles that get
313  // invalidated when the underlying texture is destroyed and
314  // recreated. See bitmaps_diff.txt for the recommended hook.
315  void InvalidateAllMaterials();
316 
317  // Frees all cached bake state. Call from engine shutdown after
318  // the last frame submits but before bgfx::shutdown().
319  void ReleaseMaterials();
320  }
321 
322  namespace Shaders
323  {
324  BLAM void LoadDefaultShaders();
325  BLAM bool ReloadShader(std::string name);
326  BLAM bgfx::ProgramHandle GetDefaultProgram();
327  BLAM bgfx::ProgramHandle GetProgram(std::string name);
328  BLAM void ReleaseShaders();
329  BLAM void ReloadPendingShaders();
331 
333  BLAM void DestroyUniforms();
334 
335  BLAM void SetShaderFlagsUniform(uint32_t flags = 0, bool use_globals = true);
336  BLAM bgfx::UniformHandle GetUniform(std::string id);
337  }
338 
339  namespace Stats
340  {
341  BLAM float GetCurrentFrameRate();
342  BLAM float GetAverageFrameRate();
343  }
344 
345  namespace Passes
346  {
347  BLAM BlamRenderPass* GetPass(std::string id);
348  BLAM bgfx::ViewId ReserveViewID();
349  BLAM bgfx::ViewId GetViewID(std::string id);
350  BLAM std::vector<BlamRenderPass*> GetPassList();
351  }
352 
353  namespace Lighting
354  {
355  BLAM void RefreshLightCache();
357  BLAM void SubmitLightUniforms(BlamVector3 cameraPos, BlamVector3 ambientColor);
359  BLAM int GetLightCacheCount();
361 
362 
365 
366  // Random-access to the shadow caster list. Returns nullptr if
367  // index is out of range. Use GetShadowCasterCount for bounds.
368  // Callers can filter by light type and sort by their own criteria.
370 
372 
373  //BLAM int BuildFrameLightList(BlamVector3 camera_position, std::vector<BlamWorldObject_TagLight*>* out_lights);
374  //
376  // * Return the runtime shadow state associated with a light, creating
377  // * and initializing GPU resources on first access. Returns nullptr
378  // * if allocation failed (for example, if a cubemap depth attachment
379  // * is not supported on the current backend).
380  // */
381  //BLAM BlamShadowCasterState* GetOrCreateShadowCasterState(BlamWorldObject_TagLight* object);
382  //
384  // * Free the GPU resources associated with a shadow caster. Called
385  // * when a caster is removed, when the resolution changes, or on
386  // * rendering shutdown.
387  // */
388  //BLAM void ReleaseShadowCasterState(BlamShadowCasterState* state);
389  //
391  // * Access the full list of runtime states for the current frame's
392  // * active shadow casters. Populated by BlamShadowPass during its
393  // * execution so the lighting pass can find matching states for
394  // * lights submitted via SubmitLightUniforms.
395  // */
396  //BLAM std::vector<BlamShadowCasterState*>* GetActiveShadowStates();
397 
399  }
400 
401  namespace Culling
402  {
403  // Extract 6 frustum planes from a column-major view-projection matrix.
404  // Standard Hartmann-Gribb formulation - planes come from sums and
405  // differences of matrix rows.
406  //
407  // `vp_matrix` is expected to be col-major (bgfx convention). If you
408  // have view and projection separately, multiply view * proj first.
409  void ExtractFrustum(BlamFrustum* out_frustum, const float* vp_matrix);
410 
411  // Test an AABB against the frustum. Returns true if the AABB is at
412  // least partially inside the frustum (i.e., should not be culled).
413  // Returns false if the AABB is fully outside any single plane.
414  //
415  // Standard "p-vertex / n-vertex" test - for each plane, find the
416  // AABB corner most in the negative direction relative to the plane
417  // normal. If that corner is on the outside, the entire AABB is.
418  bool AABBInFrustum(const BlamFrustum* frustum, BlamVector3 aabb_min, BlamVector3 aabb_max);
419 
420  // Test a sphere against the frustum. Returns true if at least
421  // partially inside.
422  bool SphereInFrustum(const BlamFrustum* frustum, BlamVector3 center, float radius);
423 
424  // Transform a model-space AABB by a world matrix to produce a
425  // world-space AABB that contains the rotated/scaled box.
426  //
427  // This is "loose" - the result over-estimates the actual world-space
428  // extent for rotated meshes. But it's safe (never under-estimates)
429  // and very fast. The alternative (test frustum in object space) is
430  // more accurate but more math per object.
431  //
432  // `world_matrix` is a column-major 4x4. For the standard object
433  // transform produced by bx::mtxSRT, this is what you want.
434  void TransformAABB(BlamVector3 model_min, BlamVector3 model_max, const float* world_matrix,
435  BlamVector3* out_world_min, BlamVector3* out_world_max);
436 
437  // Transform a sphere center by a world matrix. The radius is scaled
438  // by the maximum scale factor of the matrix to handle non-uniform
439  // scale (still conservative - if the matrix has very different
440  // scales on different axes, a true tight world-space bounding sphere
441  // would be ellipsoidal, but a sphere with radius = max-axis-scale *
442  // model_radius is a safe over-estimate).
443  void TransformSphere(BlamVector3 model_center, float model_radius,
444  const float* world_matrix, BlamVector3* out_world_center, float* out_world_radius);
445 
446  }
447 }
448 
457 {
464  BLAM bool Initialize();
465 
469  BLAM void RenderLoop();
470 
476  BLAM void RenderThread();
477 
488  BLAM void PauseRenderThread();
489 
493  BLAM void ResumeRenderThread();
494 
498  BLAM void Shutdown();
499 
505  BLAM void ProcessSDLEvents(SDL_Event* event);
506 
513 
522  BLAM void HandleWindowReisze(int width, int height);
523 
529  BLAM int GetRenderWidth();
530 
536  BLAM int GetRenderHeight();
537 
543  BLAM Ogre::Window* GetRenderWindow();
544 
550  BLAM double GetDeltaTime();
551 
555  BLAM void TakeScreenshot();
556 
560  BLAM void WriteScreenshot();
561 
567  BLAM Ogre::SceneManager* Get2DSceneManager();
568 
574  BLAM Ogre::Camera* Get2DCamera();
575 
583  BLAM void DisplayBasicCrashScreen(std::string additional_info = "");
584 
595  BLAM void DisplayDetailedCrashScreen(std::string expression, std::string file, int line, std::string message);
596 
602  BLAM void SetImGuiHiddenState(bool hide);
603 
609  BLAM bool GetImGuiHiddenState();
610 
611  BLAM BlamVector3 GetMousePosition3D();
612  BLAM BlamVector2 GetScreenPointFrom3DPoint(BlamVector3 point);
613  BLAM BlamVector3 GetGizmoMousePosition3D();
614 
620  BLAM std::vector<BlamWorldObject*> RaycastScreen(int screen_x, int screen_y, bool sort_by_distance = true,
621  uint16_t max_results = 0U, BlamQueryFlags query_flags = BlamQueryFlags::QF_EXCLUDE_GIZMOS);
622 
623  BLAM std::vector<BlamWorldObject*> RaycastScreenNormalized(float screen_normalized_x, float screen_normalized_y,
624  bool sort_by_distance = true, uint16_t max_results = 0U, BlamQueryFlags query_flags = BlamQueryFlags::QF_EXCLUDE_GIZMOS);
625 
626  BLAM std::vector<BlamWorldObject*> Raycast(BlamVector3 origin, BlamVector3 direction, bool sort_by_distance = true,
627  uint16_t max_results = 0U, BlamQueryFlags query_flags = BlamQueryFlags::QF_EXCLUDE_GIZMOS);
628 
629  BLAM bool HasZoomLevelChanged();
630 
634  namespace Materials
635  {
639  BLAM void RebuildDatablocks();
640 
649  BLAM bool BuildDatablockFromTag(material* material_tag, std::string tag_path);
650 
658 
666  BLAM Ogre::HlmsDatablock* GetDatablockFromTag(std::string tag_path);
667 
676  BLAM ogre_material_instance_data* GetDatablockInstanceFromTag(std::string tag_path, std::string referencing_tag_path);
677 
686  BLAM ogre_material_instance_data* CreateDatablockInstance(std::string tag_path, std::string referencing_tag_path);
687 
698  BLAM bool LoadPBSDatablockFromMaterialTag(Ogre::HlmsPbsDatablock* datablock, material* material_tag,
699  std::string tag_path = "");
700 
711  BLAM bool LoadUnlitDatablockFromMaterialTag(Ogre::HlmsUnlitDatablock* datablock, material* material_tag,
712  std::string tag_path = "");
713 
723  BLAM Ogre::HlmsUnlitDatablock* CreateDefaultUnlitDatablock(std::string id);
724 
735  BLAM Ogre::HlmsUnlitDatablock* CreateDefaultUnlitDatablockForPrimitives(std::string id);
736 
746  BLAM Ogre::HlmsPbsDatablock* CreateDefaultPbsDatablock(std::string id);
747 
758  BLAM Ogre::HlmsPbsDatablock* CreateDefaultPbsDatablockForPrimitives(std::string id);
759  }
760 
764  namespace Textures
765  {
772  BLAM void BuildTextureFromTag(bitmap* bitmap_tag, std::string tag_path);
773 
781  BLAM Ogre::TextureGpu* GetTextureFromTag(std::string tag_path);
782 
786  BLAM void ReloadPendingBitmaps();
787 
800  BLAM Ogre::TextureGpu* LoadTexture2D(std::string id, void* pixel_data, int width, int height, Ogre::PixelFormatGpu format, int bytes_per_line);
801 
802  BLAM Ogre::TextureGpu* CreateAtlasFromTextures(std::string id, std::vector<bitmap*> bitmaps, std::vector<BlamVector2>* out_points);
803  }
804 
805  namespace Models
806  {
807  BLAM void LoadModel(render_model* model, std::string tag_path);
808  BLAM Ogre::MeshPtr GetModelFromTagPath(std::string tag_path);
809  BLAM void LoadPendingModels();
810  BLAM void UnloadModels();
811  BLAM bool WasModelReloaded(std::string tag_path);
812  }
813 
814  namespace Lights
815  {
816  BLAM Ogre::Light* CreateLightFromTag(light* light);
817  }
818 
819  namespace Shaders
820  {
821  BLAM void FillInstanceParameterBuffer(float* address, BlamWorldObject_Tag* object, shader* program);
823 
824  BLAM void LoadShader(shader* program, std::string tag_path);
825 
826  BLAM Ogre::HlmsDatablock* GetShaderDatablock(std::string tag_path);
827  BLAM Ogre::MaterialPtr GetRawShaderMaterial(std::string tag_path);
828 
832  BLAM Ogre::MaterialPtr LoadRawShader(shader* shader, std::string tag_path);
833 
834  BLAM Ogre::GpuProgramParametersSharedPtr GetShaderParameters(std::string tag_path, Ogre::GpuProgramType shader_type);
835  }
836 
837  namespace Tilesets
838  {
839  BLAM void LoadTileset(tile_set* tileset, std::string tag_path);
840  BLAM void LoadPendingTilesets();
841  BLAM Ogre::HlmsLowLevelDatablock* GetTilesetDatablock(std::string tag_path, int tile_index);
842  BLAM Ogre::MaterialPtr GetTilesetMaterial(std::string tag_path, int tile_index);
843  BLAM int GetTilesetSourceCount(std::string tag_path);
844  }
845 
849  namespace Utils
850  {
858  BLAM Ogre::FilterOptions ConvertBitmapFilterMode(bitmap_filtering_mode filter_mode);
859  }
860 }
Blam::Director::GetCamera
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:36
tile_set
Definition: tile_set.h:24
Blam::World::GetWorldState
BLAM BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: world.cpp:56
Blam::RenderingBGFX::Materials::InvalidateMaterial
void InvalidateMaterial(std::string tag_path)
Definition: materials.cpp:992
ui.h
BlamRenderObjectListener
Definition: BlamHlmsListener.h:23
Blam::Input::GetMousePositionNormalized
BLAM BlamVector2 GetMousePositionNormalized()
Definition: mouse.cpp:107
Blam::RenderingBGFX::Stats::GetCurrentFrameRate
BLAM float GetCurrentFrameRate()
Definition: bgfx.cpp:443
Blam::Settings::Config::GetEngineConfiguration
BLAM BlamConfigurationFile * GetEngineConfiguration()
Retrieves the main engine configuration file.
Definition: config.cpp:60
tag_io.h
Blam::Rendering::Materials::CreateDefaultUnlitDatablockForPrimitives
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablockForPrimitives(std::string id)
Creates a default Unlit datablock for use with 2D and 3D primitives.
Definition: materials.cpp:1032
pending_raycasts_lock
std::mutex pending_raycasts_lock
Definition: ogre.cpp:107
UsingBgfx
bool UsingBgfx()
Definition: bgfx.cpp:63
Blam::RenderingBGFX::Lighting::SubmitLightUniforms
BLAM void SubmitLightUniforms(BlamVector3 cameraPos, BlamVector3 ambientColor)
Definition: lights.cpp:79
Blam::Content::Tags::SetupAtmosphere
BLAM void SetupAtmosphere()
Definition: scenario.cpp:283
ogre_raycast_data::result
Ogre::RaySceneQueryResult result
Definition: ogre.cpp:72
pending_raycasts
std::vector< ogre_raycast_data * > pending_raycasts
Definition: ogre.cpp:106
tag_camr
#define tag_camr
Definition: camera.h:19
gizmo_pos_3d
BlamVector3 gizmo_pos_3d
Definition: ogre.cpp:104
Demo::BaseSystem::createScene02
virtual void createScene02(void)
Definition: BaseSystem.cpp:40
BlamWorldState::GetActiveCamera
BlamWorldObject_Tag * GetActiveCamera()
Definition: BlamWorldState.cpp:253
Blam::Rendering::Shaders::GetShaderParameters
BLAM Ogre::GpuProgramParametersSharedPtr GetShaderParameters(std::string tag_path, Ogre::GpuProgramType shader_type)
Definition: shaders_raw.cpp:333
Demo::GraphicsSystem::getRenderWindow
Ogre::Window * getRenderWindow(void) const
Definition: GraphicsSystem.h:148
ogre_material_instance_data::needs_reload
bool needs_reload
Whether or not this material instance needs to be reloaded.
Definition: rendering.h:88
BlamRay
Definition: types.h:362
ogre_material_instance_data::tag_instance
material * tag_instance
Pointer to the tag that uses this material instance.
Definition: rendering.h:87
BlamOrientedBoundingBox
Definition: types.h:344
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
BlamWorldState::RenderObjects
void RenderObjects(float delta)
Definition: BlamWorldState.cpp:240
Blam::Rendering::Materials::CreateDefaultUnlitDatablock
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablock(std::string id)
Creates a default Unlit datablock.
Definition: materials.cpp:1021
Blam::Rendering::Materials::RebuildDatablocks
BLAM void RebuildDatablocks()
Rebuilds ALL datablocks (including instances) from their original tags.
Definition: materials.cpp:708
BlamDirector::fov
float fov
The camera's current field of view.
Definition: director.h:95
screenshot_pending
bool screenshot_pending
Definition: ogre.cpp:87
Blam::Rendering::SetImGuiHiddenState
BLAM void SetImGuiHiddenState(bool hide)
Sets whether ImGUI should be hidden or not.
Definition: ogre.cpp:747
BlamDirector2D::zoom
float zoom
Definition: director.h:194
ogre_injections
BlamOgreInjections * ogre_injections
Definition: ogre.cpp:109
Blam::Content::Tags::NeedsAtmosphereSetup
BLAM bool NeedsAtmosphereSetup()
Definition: scenario.cpp:356
Blam::RenderingBGFX::Shutdown
BLAM void Shutdown()
Definition: bgfx.cpp:371
BlamDirector::far_clip_plane_distance
float far_clip_plane_distance
Definition: director.h:118
render_model
Definition: render_model.h:27
scenario.h
Blam::Rendering::GetMousePosition3D
BLAM BlamVector3 GetMousePosition3D()
Definition: ogre.cpp:757
Blam::RenderingBGFX::Models::LoadModel
BLAM void LoadModel(render_model *model, std::string tag_path)
Definition: models.cpp:26
imgui_impl_sdl.h
Blam::RenderingBGFX::Lighting::GetShadowCasterCount
BLAM int GetShadowCasterCount()
Definition: shadow_casters.cpp:88
ogre_raycast_data::flags
BlamQueryFlags flags
Definition: ogre.cpp:67
logger.h
Blam::RenderingBGFX::Shaders::SetShaderFlagsUniform
BLAM void SetShaderFlagsUniform(uint32_t flags=0, bool use_globals=true)
Definition: shader_uniforms.cpp:153
ogre_material_info_data::hlms_type
Ogre::HlmsTypes hlms_type
The HLMS type of this material.
Definition: rendering.h:110
Blam::UI::GetUIRoot
BLAM BlamUIWidget_Group * GetUIRoot()
Retrieves the root UI group widget.
Definition: ui.cpp:87
bitmap.h
Blam::RenderingBGFX::Shaders::ReleaseShaders
BLAM void ReleaseShaders()
Definition: shaders.cpp:110
BlamWorldObject::scene_node
Ogre::SceneNode * scene_node
Definition: world_objects.h:171
entry
Definition: imgui.h:36
ogre_material_instance_data::referencing_tag_path
std::string referencing_tag_path
The path of the tag that uses this material instance.
Definition: rendering.h:85
Blam::Rendering::GetRenderWindow
BLAM Ogre::Window * GetRenderWindow()
Retrieves the primary OGRE rendering window.
Definition: ogre.cpp:690
Blam::RenderingBGFX::Lighting::GetLightCacheIndex
BLAM int GetLightCacheIndex(BlamWorldObject *object)
Definition: lights.cpp:66
keyboard.h
BlamWorldObject::GetPosition
BlamVector3 GetPosition()
Definition: BlamWorldObject.cpp:222
world_objects.h
imgui.h
Blam::Director::Use2DCamera
BLAM bool Use2DCamera()
Definition: director.cpp:74
Blam::Content::Tags::GetLoadedTags
BLAM std::vector< BlamTagData * > * GetLoadedTags()
Retrieves the list of loaded tag data.
Definition: tags.cpp:157
Blam::RenderingBGFX::RenderLoop
BLAM void RenderLoop()
Definition: bgfx.cpp:161
mesh::submesh
Definition: types.h:28
Blam::Rendering::Materials::LoadPBSDatablockFromMaterialTag
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::RenderingBGFX::Shaders::GetDefaultProgram
BLAM bgfx::ProgramHandle GetDefaultProgram()
Definition: shaders.cpp:90
Blam::RenderingBGFX::GetRenderHeight
BLAM int GetRenderHeight()
Retrieves the current height of the viewport.
Definition: bgfx.cpp:428
Blam::Rendering::Shaders::LoadShader
BLAM void LoadShader(shader *program, std::string tag_path)
Definition: shaders_hlms.cpp:264
Blam::RenderingBGFX::Shaders::ReloadPendingShaders
BLAM void ReloadPendingShaders()
Definition: shaders.cpp:121
Blam::Director::GetCamera2D
BLAM BlamDirector2D * GetCamera2D()
Definition: director.cpp:69
Blam::Rendering::HandleWindowReisze
BLAM void HandleWindowReisze(int width, int height)
Instructs OGRE to handle a window resize.
Definition: ogre.cpp:650
imgui_impl_dx11.h
ogre_material_info_data
Class used to store OGRE material information.
Definition: rendering.h:103
camera::field_of_view
real field_of_view
Definition: camera.h:26
QF_EXCLUDE_GIZMOS
@ QF_EXCLUDE_GIZMOS
Definition: world_objects.h:81
render_thread_id
std::thread::id render_thread_id
Definition: ogre.cpp:93
Blam::Rendering::Materials::CreateDefaultPbsDatablockForPrimitives
BLAM Ogre::HlmsPbsDatablock * CreateDefaultPbsDatablockForPrimitives(std::string id)
Creates a default PBS datablock for use with 2D and 3D primitives.
Definition: materials.cpp:1073
BlamDirector::near_clip_plane_distance
float near_clip_plane_distance
Definition: director.h:117
sky_atm_parameters::time
real time
Definition: sky_atm_parameters.h:29
Blam::RenderingBGFX::Shaders::GetProgram
BLAM bgfx::ProgramHandle GetProgram(std::string name)
Definition: shaders.cpp:100
Blam::RenderingBGFX::Textures::get_newest_bitmap
BLAM bgfx::TextureHandle get_newest_bitmap()
Definition: bitmaps.cpp:463
Blam::Rendering::Shaders::FillInstanceParameterBuffer
BLAM void FillInstanceParameterBuffer(float *address, BlamWorldObject_Tag *object, shader *program)
Definition: shaders_hlms.cpp:223
Blam::Rendering::TakeScreenshot
BLAM void TakeScreenshot()
Instructs OGRE to save a screenshot on the next frame.
Definition: ogre.cpp:700
director.h
camera
Definition: camera.h:24
ogre_graphics_system
Demo::GraphicsSystem * ogre_graphics_system
Definition: ogre.cpp:75
Blam::Rendering::DisplayDetailedCrashScreen
BLAM void DisplayDetailedCrashScreen(std::string expression, std::string file, int line, std::string message)
Displays a detailed crash screen.
Definition: ogre.cpp:731
ogre_use_render_thread
bool ogre_use_render_thread
Definition: ogre.cpp:86
Blam::Tick::MaxTicksPerSecond
BLAM int MaxTicksPerSecond()
Retrieves the maximum number of ticks per second.
Definition: tick.cpp:217
Blam::RenderingBGFX::Materials::GetMaterialProgram
BLAM bgfx::ProgramHandle GetMaterialProgram(std::string material_tag_path)
Definition: materials.cpp:956
BlamUIWidget_Group::UpdateMetrics
void UpdateMetrics() override
Updates metrics for the widget.
Definition: group.cpp:174
cui_widget_anchor::center
@ center
Blam::UI::GetCrashScreenWidget
BLAM BlamUIWidget_CrashScreen * GetCrashScreenWidget()
Retrieves the built-in crash screen widget.
Definition: ui.cpp:300
Blam::Rendering::Get2DCamera
BLAM Ogre::Camera * Get2DCamera()
Retrieves the camera used to handle 2D rendering.
Definition: ogre.cpp:710
rendering.h
Blam::RenderingBGFX::Shaders::CreateDefaultUniforms
BLAM void CreateDefaultUniforms()
Definition: shader_uniforms.cpp:11
Blam::Diagnostics::Errors::ShowWin32ErrorDialog
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::Rendering::GetScreenPointFrom3DPoint
BLAM BlamVector2 GetScreenPointFrom3DPoint(BlamVector3 point)
Definition: ogre.cpp:767
Blam::Content::Tags::GetActiveScenarioTag
BLAM scenario * GetActiveScenarioTag()
Retrieves the currently loaded scenario tag.
Definition: scenario.cpp:225
Blam::RenderingBGFX::Shaders::ReloadShader
BLAM bool ReloadShader(std::string name)
Definition: shaders.cpp:79
Blam::Rendering::RenderThread
BLAM void RenderThread()
Function used to handle the render thread.
Definition: ogre.cpp:569
Blam::UI::ImGUI::EndFrame
BLAM void EndFrame()
Ends ImGUI drawing for the current frame.
Definition: imgui.cpp:232
Blam::Rendering::Materials::CreateDefaultPbsDatablock
BLAM Ogre::HlmsPbsDatablock * CreateDefaultPbsDatablock(std::string id)
Creates a default PBS datablock.
Definition: materials.cpp:1062
__debug_floor_item
Ogre::Item * __debug_floor_item
Definition: ogre.cpp:98
bitmap_filtering_mode::point
@ point
Blam::Director::PrepareCamera
BLAM void PrepareCamera()
Prepares the director for use.
Definition: director.cpp:7
Blam::RenderingBGFX::SetViewClearFlags
BLAM void SetViewClearFlags(uint16_t flags)
Definition: bgfx.cpp:406
Blam::RenderingBGFX::Textures::ReleaseTextures
BLAM void ReleaseTextures()
Definition: bitmaps.cpp:495
BlamWorldObject_Tag::tag_data
BlamTagData * tag_data
Pointer to the tag data associated with this object.
Definition: world_objects.h:304
rendering_ready
bool rendering_ready
Definition: ogre.cpp:94
Blam::Rendering::GetDeltaTime
BLAM double GetDeltaTime()
Retrieves delta time that has passed since the previous frame was completed.
Definition: ogre.cpp:695
Demo::GraphicsSystem::getSceneManager
Ogre::SceneManager * getSceneManager(void) const
Definition: GraphicsSystem.h:149
Blam::Rendering::ProcessSDLEvents
BLAM void ProcessSDLEvents(SDL_Event *event)
Function used to allow OGRE to handle SDL events.
Definition: ogre.cpp:629
Blam::World::DestroyWorldStateIfMarked
BLAM void DestroyWorldStateIfMarked()
Destroys the current world state if marked for destruction.
Definition: world.cpp:42
BlamWorldObject_Tag
Class representing a tag-based world object.
Definition: world_objects.h:278
uint64_t
unsigned long long uint64_t
Definition: stdint.h:18
Blam::Rendering::Textures::LoadTexture2D
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::RenderingBGFX::Shaders::ForceReloadAllShaders
BLAM void ForceReloadAllShaders()
Definition: shaders.cpp:133
mtxOrtho
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::Rendering::Textures::CreateAtlasFromTextures
BLAM Ogre::TextureGpu * CreateAtlasFromTextures(std::string id, std::vector< bitmap * > bitmaps, std::vector< BlamVector2 > *out_points)
errors.h
Blam::RenderingBGFX::Textures::ReloadPendingBitmaps
BLAM void ReloadPendingBitmaps()
Reloads all bitmaps that are currently pending a reload.
BlamQueryFlags
BlamQueryFlags
Definition: world_objects.h:45
Blam::RenderingBGFX::Lighting::AddShadowCaster
BLAM void AddShadowCaster(BlamWorldObject_TagLight *object)
Definition: shadow_casters.cpp:11
zoom_level_changed_this_frame
volatile bool zoom_level_changed_this_frame
Definition: ogre.cpp:96
Blam::RenderingBGFX::Models::ReleaseModels
BLAM void ReleaseModels()
Definition: models.cpp:230
Demo::GraphicsSystem::debug_mode_thread_count
size_t debug_mode_thread_count
Definition: GraphicsSystem.h:99
Blam::Rendering::RaycastScreenNormalized
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
ogre_render_thread_stopped
bool ogre_render_thread_stopped
Definition: ogre.cpp:84
Blam::Content::Tags::NeedsWorldStateUpdate
BLAM bool NeedsWorldStateUpdate()
Checks if the world state needs to be re-prepared.
Definition: scenario.cpp:25
Blam::Rendering::Tilesets::LoadTileset
BLAM void LoadTileset(tile_set *tileset, std::string tag_path)
Definition: tilesets.cpp:71
Blam::RenderingBGFX::CreateOBBFromAABB
BLAM BlamOrientedBoundingBox CreateOBBFromAABB(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale, BlamVector3 local_aabb_min, BlamVector3 local_aabb_max)
Definition: raycast.cpp:82
tick.h
Blam::Rendering::Shaders::CalculateInstanceBufferElementCount
BLAM uint16_t CalculateInstanceBufferElementCount(shader *program)
Definition: shaders_hlms.cpp:251
ogre_material_info_data::CreateNewInstance
ogre_material_instance_data * CreateNewInstance(BlamTagData *referencing_tag)
Creates a new instance of this material.
Definition: ogre_material_info_data.cpp:5
Blam::RenderingBGFX::Textures::LoadTexture2D
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::Rendering::GetGizmoMousePosition3D
BLAM BlamVector3 GetGizmoMousePosition3D()
Definition: ogre.cpp:762
Blam::Rendering::Materials::BuildDatablockFromTag
BLAM bool BuildDatablockFromTag(material *material_tag, std::string tag_path)
Creates an OGRE material datablock from a material tag.
Definition: materials.cpp:795
Blam::Rendering::Textures::GetTextureFromTag
BLAM Ogre::TextureGpu * GetTextureFromTag(std::string tag_path)
Retrieves an OGRE texture from a tag path.
Definition: textures.cpp:109
Blam::Rendering::Materials::LoadUnlitDatablockFromMaterialTag
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
shader
Definition: shader.h:31
ogre_material_info_data::instances
BlamMap< std::string, ogre_material_instance_data * > instances
A map containing all instances of this material.
Definition: rendering.h:118
Blam::Rendering::Textures::BuildTextureFromTag
BLAM void BuildTextureFromTag(bitmap *bitmap_tag, std::string tag_path)
Loads a texture into OGRE from a bitmap tag.
Definition: textures.cpp:97
Blam::RenderingBGFX::GetScreenPointFrom3DPoint
BLAM BlamVector2 GetScreenPointFrom3DPoint(BlamVector3 position)
Definition: bgfx.cpp:463
light
Definition: light.h:27
Blam::Tick::GetTotalRuntimeTicks
BLAM uint64_t GetTotalRuntimeTicks()
Gets the total amount of ticks that have elapsed during program runtime.
Definition: tick.cpp:242
Blam::UI::Render
BLAM void Render()
Renders all UI to the screen.
Definition: ui.cpp:64
sky_atm_parameters
Definition: sky_atm_parameters.h:27
BlamUIWidget::SetSize
void SetSize(BlamVector2 new_size)
Sets the size of the widget.
Definition: BlamUIWidget.cpp:405
material.h
Blam::UI::Shutdown
BLAM void Shutdown()
Shuts down the UI system.
Definition: ui.cpp:78
camera::near_clip_distance
real near_clip_distance
Definition: camera.h:27
sky_atm_parameters.h
Blam::Rendering::GetImGuiHiddenState
BLAM bool GetImGuiHiddenState()
Checks whether ImGUI is currently hidden or not.
Definition: ogre.cpp:752
Blam::RenderingBGFX::IsViewportMode2D
bool IsViewportMode2D()
Definition: bgfx.cpp:555
Blam::Rendering::WriteScreenshot
BLAM void WriteScreenshot()
Saves a screenshot of the current frame to a file.
Definition: utils.cpp:25
types.h
Blam::Rendering::Tilesets::GetTilesetSourceCount
BLAM int GetTilesetSourceCount(std::string tag_path)
Definition: tilesets.cpp:171
Blam::RenderingBGFX::Culling::ExtractFrustum
void ExtractFrustum(BlamFrustum *out_frustum, const float *vp_matrix)
Definition: culling.cpp:36
BlamShadowCasterState
Runtime state for a single shadow-casting light.
Definition: types.h:136
BlamOgreInjections.h
Blam::Rendering::Tilesets::LoadPendingTilesets
BLAM void LoadPendingTilesets()
Definition: tilesets.cpp:94
QF_NONE
@ QF_NONE
Definition: world_objects.h:79
Demo::GraphicsSystem::getCamera
Ogre::Camera * getCamera(void) const
Definition: GraphicsSystem.h:150
shader_program
Definition: shader_program.h:24
Blam::Rendering::Shaders::GetRawShaderMaterial
BLAM Ogre::MaterialPtr GetRawShaderMaterial(std::string tag_path)
Definition: shaders_raw.cpp:321
Blam::Director::ShutdownCamera
BLAM void ShutdownCamera()
Destroys the director and cleans up any data related to it.
Definition: director.cpp:31
Blam::RenderingBGFX::Lighting::GetShadowCasterAt
BlamWorldObject_Tag * GetShadowCasterAt(int index)
Definition: shadow_casters.cpp:93
Blam::RenderingBGFX::Shaders::GetUniform
BLAM bgfx::UniformHandle GetUniform(std::string id)
Definition: shader_uniforms.cpp:174
Blam::RenderingBGFX::Culling::TransformAABB
void TransformAABB(BlamVector3 model_min, BlamVector3 model_max, const float *world_matrix, BlamVector3 *out_world_min, BlamVector3 *out_world_max)
Definition: culling.cpp:151
max_2d_z_depth
int max_2d_z_depth
Definition: ogre.cpp:89
material
Definition: material.h:54
Blam::Rendering::Shaders::GetShaderDatablock
BLAM Ogre::HlmsDatablock * GetShaderDatablock(std::string tag_path)
Definition: shaders_hlms.cpp:288
state
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
Blam::RenderingBGFX::Materials::ReleaseMaterials
void ReleaseMaterials()
Definition: materials.cpp:1014
Blam::RenderingBGFX::Lighting::RemoveShadowCaster
BLAM void RemoveShadowCaster(BlamWorldObject *object)
Definition: shadow_casters.cpp:47
uint32_t
unsigned int uint32_t
Definition: stdint.h:17
raycast
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
Demo::BaseSystem::destroyScene
virtual void destroyScene(void)
Definition: BaseSystem.cpp:48
ogre_material_info_data::needs_reload
bool needs_reload
Whether or not this material needs to be reloaded.
Definition: rendering.h:108
Blam::RenderingBGFX::Materials::BuildMaterialFromTag
BLAM bool BuildMaterialFromTag(material *material_tag, std::string tag_path)
Definition: materials.cpp:755
QF_ANY
@ QF_ANY
Definition: world_objects.h:80
Blam::RenderingBGFX
Definition: texture_storage.h:91
Blam::Rendering::Shaders::LoadRawShader
BLAM Ogre::MaterialPtr LoadRawShader(shader *shader, std::string tag_path)
Definition: shaders_raw.cpp:116
Blam::RenderingBGFX::PrepareScreenQuad
BLAM void PrepareScreenQuad()
Definition: bgfx.cpp:515
BlamHlmsListener.h
ogre_material_instance_data::instance_datablock
Ogre::HlmsDatablock * instance_datablock
The datablock used for this material instance.
Definition: rendering.h:86
Demo::GraphicsSystem::deinitialize
void deinitialize(void)
Definition: GraphicsSystem.cpp:547
ogre_material_instance_data
Data structure used to store OGRE material instance data.
Definition: rendering.h:82
Blam::RenderingBGFX::HandleWindowReisze
BLAM void HandleWindowReisze(int width, int height)
Definition: bgfx.cpp:385
Blam::RenderingBGFX::Initialize
BLAM bool Initialize()
Definition: bgfx.cpp:106
Blam::RenderingBGFX::Textures::BuildTextureFromTag
BLAM void BuildTextureFromTag(bitmap *bitmap_tag, std::string tag_path)
Loads a texture into bgfx from a bitmap tag.
Definition: bitmaps.cpp:372
Blam::RenderingBGFX::Passes::GetPassList
BLAM std::vector< BlamRenderPass * > GetPassList()
Definition: bgfx.cpp:540
Blam::RenderingBGFX::CreateRayFromViewportPoint
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::Rendering::GetGraphicsSystem
BLAM Demo::GraphicsSystem * GetGraphicsSystem()
Retrieves the graphics system used by OGRE.
Definition: ogre.cpp:645
Blam::RenderingBGFX::GetGizmoMousePosition3D
BLAM BlamVector3 GetGizmoMousePosition3D()
Definition: bgfx.cpp:550
Blam::Rendering::Initialize
BLAM bool Initialize()
Initializes the OGRE rendering library.
Definition: ogre.cpp:140
Blam::Rendering
Namespace for things relating to rendering.
Definition: rendering.h:456
Blam::RenderingBGFX::Models::GetModelFromTagPath
BLAM mesh * GetModelFromTagPath(std::string tag_path)
Definition: models.cpp:220
Blam::RenderingBGFX::Materials::InvalidateAllMaterials
void InvalidateAllMaterials()
Definition: materials.cpp:1005
BlamDirector
Class representing the Director.
Definition: director.h:27
Blam::Rendering::GetRenderHeight
BLAM int GetRenderHeight()
Retrieves the current height of the OGRE viewport.
Definition: ogre.cpp:685
last_2d_zoom_level
float last_2d_zoom_level
Definition: ogre.cpp:95
engine_definitions.h
QF_ENGINE_GIZMO
@ QF_ENGINE_GIZMO
Definition: world_objects.h:47
Blam::RenderingBGFX::Culling::TransformSphere
void TransformSphere(BlamVector3 model_center, float model_radius, const float *world_matrix, BlamVector3 *out_world_center, float *out_world_radius)
Definition: culling.cpp:206
tag_reference::data_is_tag
bool data_is_tag
Whether or not tagref_address points to tag data, or the tag's path.
Definition: tags.h:296
BlamWorldObject_TagLight
Definition: world_objects.h:337
file
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
imgui_impl_ogre2.h
Blam::RenderingBGFX::Lighting::GetFirstDirectionalShadowCaster
BLAM BlamWorldObject_Tag * GetFirstDirectionalShadowCaster()
‍**
Definition: shadow_casters.cpp:64
Blam::Rendering::Utils::ConvertBitmapFilterMode
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::Rendering::Tilesets::GetTilesetMaterial
BLAM Ogre::MaterialPtr GetTilesetMaterial(std::string tag_path, int tile_index)
Definition: tilesets.cpp:158
camera.h
ogre_raycast_data::max_results
uint16_t max_results
Definition: ogre.cpp:68
scenario::atmosphere
tag_reference atmosphere
Definition: scenario.h:38
scenario.h
Blam::Rendering::Models::LoadPendingModels
BLAM void LoadPendingModels()
Definition: models.cpp:249
renderWindow
Ogre::Window * renderWindow
Definition: ogre.cpp:76
BlamWorldObject
Class representing a world object.
Definition: world_objects.h:138
Blam::RenderingBGFX::Culling::SphereInFrustum
bool SphereInFrustum(const BlamFrustum *frustum, BlamVector3 center, float radius)
Definition: culling.cpp:132
Blam::Rendering::Materials::ReloadPendingMaterials
BLAM void ReloadPendingMaterials()
Reloads all datablocks which are flagged as requiring a reload.
Definition: materials.cpp:891
Blam::Rendering::Textures::ReloadPendingBitmaps
BLAM void ReloadPendingBitmaps()
Reloads all bitmaps that are currently pending a reload.
Definition: textures.cpp:128
Blam::RenderingBGFX::GetMousePosition3D
BLAM BlamVector3 GetMousePosition3D()
Definition: bgfx.cpp:545
render_thread_paused
volatile bool render_thread_paused
Definition: ogre.cpp:92
timeSinceLast
double timeSinceLast
Definition: ogre.cpp:79
Blam::Rendering::Models::WasModelReloaded
BLAM bool WasModelReloaded(std::string tag_path)
Definition: models.cpp:311
WORLD_OBJECT_USER_KEY
#define WORLD_OBJECT_USER_KEY
Definition: world_objects.h:18
camera::far_clip_distance
real far_clip_distance
Definition: camera.h:28
hide_imgui
bool hide_imgui
Definition: ogre.cpp:90
GraphicsSystem.h
Demo::GraphicsSystem
Definition: GraphicsSystem.h:27
Blam::RenderingBGFX::GetDefault2DStateFlags
BLAM uint64_t GetDefault2DStateFlags()
Definition: bgfx.cpp:433
Blam::Content::Tags::PrepareNewWorldState
BLAM void PrepareNewWorldState()
Prepares a new world state.
Definition: scenario.cpp:30
Blam::Rendering::Get2DSceneManager
BLAM Ogre::SceneManager * Get2DSceneManager()
Retrieves the scene manager used to handle 2D rendering.
Definition: ogre.cpp:705
SdlInputHandler.h
Blam::RenderingBGFX::Materials::ApplyMaterialParameters
BLAM void ApplyMaterialParameters(mesh::submesh *submesh, std::string material_tag_path)
Definition: materials.cpp:772
Blam::RenderingBGFX::GetCameraProjectionMatrix
BLAM float * GetCameraProjectionMatrix()
Definition: bgfx.cpp:458
Blam::Rendering::Tilesets::GetTilesetDatablock
BLAM Ogre::HlmsLowLevelDatablock * GetTilesetDatablock(std::string tag_path, int tile_index)
Definition: tilesets.cpp:145
BlamUIWidget_CrashScreen
Class used for the crash screen UI.
Definition: BlamUIWidget_CrashScreen.h:16
BlamUIWidget_CrashScreen::SetDetailedMessage
void SetDetailedMessage(std::string expression, std::string file, int line, std::string details)
Reconfigures the crash screen text to display a detailed message.
Definition: BlamUIWidget_CrashScreen.cpp:57
Demo::GraphicsSystem::update
void update(float timeSinceLast)
Definition: GraphicsSystem.cpp:581
Blam::RenderingBGFX::Textures::GetDefaultTexture
BLAM bgfx::TextureHandle GetDefaultTexture()
Definition: bitmaps.cpp:478
imgui.h
Blam::Rendering::Models::GetModelFromTagPath
BLAM Ogre::MeshPtr GetModelFromTagPath(std::string tag_path)
Definition: models.cpp:268
Blam::Rendering::Lights::CreateLightFromTag
BLAM Ogre::Light * CreateLightFromTag(light *light)
Definition: lights.cpp:9
Blam::RenderingBGFX::GetCameraViewMatrix
BLAM float * GetCameraViewMatrix()
Definition: bgfx.cpp:453
Demo::GraphicsSystem::getQuit
bool getQuit(void) const
Definition: GraphicsSystem.h:143
pause_render_thread
volatile bool pause_render_thread
Definition: ogre.cpp:91
BlamHlmsListener
Definition: BlamHlmsListener.h:7
Blam::Rendering::Materials::CreateDatablockInstance
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
ogre_raycast_data
Definition: ogre.cpp:64
Blam::Rendering::DisplayBasicCrashScreen
BLAM void DisplayBasicCrashScreen(std::string additional_info="")
Displays a basic crash screen, with an optional message.
Definition: ogre.cpp:715
bitmap_filtering_mode
bitmap_filtering_mode
Definition: bitmap.h:24
timer
Ogre::Timer timer
Definition: ogre.cpp:78
ogre_raycast_data::sort_by_distance
bool sort_by_distance
Definition: ogre.cpp:69
bitmap
Definition: bitmap.h:34
Blam::RenderingBGFX::TakeScreenshot
BLAM void TakeScreenshot()
Definition: bgfx.cpp:418
Demo::BaseSystem::createScene01
virtual void createScene01(void)
Definition: BaseSystem.cpp:32
BlamTagData::address
void * address
The address pointing to the start of the tag's data.
Definition: tags.h:132
startTime
Ogre::uint64 startTime
Definition: ogre.cpp:80
BlamDirector2D::camera_direction
BlamVector3 camera_direction
Definition: director.h:193
BlamUIWidget_CrashScreen::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: BlamUIWidget_CrashScreen.cpp:65
Blam::Rendering::Raycast
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::RenderingBGFX::Shaders::LoadDefaultShaders
BLAM void LoadDefaultShaders()
Definition: shaders.cpp:10
ogre_stop_render_thread
bool ogre_stop_render_thread
Definition: ogre.cpp:85
Blam::RenderingBGFX::Culling::AABBInFrustum
bool AABBInFrustum(const BlamFrustum *frustum, BlamVector3 aabb_min, BlamVector3 aabb_max)
Definition: culling.cpp:99
BLAM
#define BLAM
Definition: rendering.h:25
config.h
Blam::Rendering::RaycastScreen
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
post_init_needs_datablock_update
bool post_init_needs_datablock_update
Definition: ogre.cpp:88
Blam::RenderingBGFX::Stats::GetAverageFrameRate
BLAM float GetAverageFrameRate()
Definition: bgfx.cpp:448
Blam::RenderingBGFX::Textures::GetTextureRefFromTag
BlamTextureRef GetTextureRefFromTag(std::string tag_path)
Definition: bitmaps.cpp:566
Blam::RenderingBGFX::Shaders::DestroyUniforms
BLAM void DestroyUniforms()
Definition: shader_uniforms.cpp:141
Demo::GraphicsSystem::initialize
void initialize(const Ogre::String &windowTitle)
Definition: GraphicsSystem.cpp:126
tags.h
BlamUIWidget_CrashScreen::SetBasicMessage
void SetBasicMessage(std::string additional_info="")
Reconfigures the crash screen text to display a basic message.
Definition: BlamUIWidget_CrashScreen.cpp:47
tags.h
Blam::UI::Initialize
BLAM bool Initialize()
Initializes the UI system.
Definition: ui.cpp:19
Blam::BuildInfo::DebugToolsEnabled
BLAM bool DebugToolsEnabled()
Checks whether or not debug tools are enabled.
Definition: engine_definitions.cpp:209
BlamTagData
Class used to contain and access tag data.
Definition: tags.h:125
ogre_material_info_data::persistent_reload
bool persistent_reload
Whether or not to continuously update this material (ie, live editing).
Definition: rendering.h:109
ogre_material_info_data::tag_path
std::string tag_path
The tag path that this material was loaded from.
Definition: rendering.h:106
Blam::RenderingBGFX::Passes::ReserveViewID
BLAM bgfx::ViewId ReserveViewID()
Definition: bgfx.cpp:520
compositor.h
camera2
Ogre::Camera * camera2
Definition: ogre.cpp:101
BlamDirector2D::far_clip_plane_distance
float far_clip_plane_distance
Definition: director.h:198
BlamDirector2D
Definition: director.h:184
Blam::Rendering::Materials::GetDatablockFromTag
BLAM Ogre::HlmsDatablock * GetDatablockFromTag(std::string tag_path)
Retrieves an OGRE datablock from a material tag path.
Definition: materials.cpp:950
Blam::RenderingBGFX::SetDefault2DStateFlags
BLAM void SetDefault2DStateFlags(uint64_t flags)
Definition: bgfx.cpp:438
BlamDirector2D::near_clip_plane_distance
float near_clip_plane_distance
Definition: director.h:197
SDL_Event
Definition: SdlEmulationLayer.h:735
Blam::RenderingBGFX::Lighting::GetLightCacheAt
BLAM BlamWorldObject_Tag * GetLightCacheAt(int index)
Definition: lights.cpp:239
ogre_material_instance_data::original_material
ogre_material_info_data * original_material
Pointer to the original material information.
Definition: rendering.h:84
BlamDirector2D::camera_pos
BlamVector3 camera_pos
Definition: director.h:192
BlamTextureRef
Definition: texture_storage.h:33
tag_reference::tagref_address
void * tagref_address
The address of the tagref data.
Definition: tags.h:295
BlamRenderPass
Definition: types.h:89
BlamUIWidget_CrashScreen.h
Blam::Rendering::Materials::GetDatablockInstanceFromTag
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::RenderingBGFX::SetResetFlags
BLAM void SetResetFlags(uint32_t flags)
Definition: bgfx.cpp:412
ogre_material_instance_data::persistent_reload
bool persistent_reload
Whether or not to continuously update this material (ie, live editing).
Definition: rendering.h:89
Blam::Rendering::Models::LoadModel
BLAM void LoadModel(render_model *model, std::string tag_path)
Definition: models.cpp:226
Demo::GraphicsSystem::getRoot
Ogre::Root * getRoot(void) const
Definition: GraphicsSystem.h:147
BlamDirector::camera_front
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:88
uint16_t
unsigned short uint16_t
Definition: stdint.h:16
Blam::RenderingBGFX::GetRenderWidth
BLAM int GetRenderWidth()
Retrieves the current width of the viewport.
Definition: bgfx.cpp:423
Blam::Rendering::PauseRenderThread
BLAM void PauseRenderThread()
Pauses the render thread.
Definition: ogre.cpp:582
BlamDirector::camera_pos
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:84
Blam::Rendering::HasZoomLevelChanged
BLAM bool HasZoomLevelChanged()
Definition: ogre.cpp:940
Blam::Rendering::ResumeRenderThread
BLAM void ResumeRenderThread()
Resumes the render thread.
Definition: ogre.cpp:592
ogre_raycast_data::ray
Ogre::Ray ray
Definition: ogre.cpp:66
ogre_material_info_data::datablock
Ogre::HlmsDatablock * datablock
The datablock used for this material.
Definition: rendering.h:107
Blam::Globals::GetGlobalAsBoolean
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:343
Blam::RenderingBGFX::Lighting::GetLightCacheCount
BLAM int GetLightCacheCount()
Definition: lights.cpp:234
BlamOgreInjections
Definition: BlamOgreInjections.h:7
BlamFrustum
Definition: types.h:339
Demo::BaseSystem::beginFrameParallel
void beginFrameParallel(void)
Definition: BaseSystem.cpp:56
mesh
Definition: types.h:25
Blam::RenderingBGFX::Lighting::RefreshLightCache
BLAM void RefreshLightCache()
Definition: lights.cpp:27
mouse_pos_3d
BlamVector3 mouse_pos_3d
Definition: ogre.cpp:103
Blam::RenderingBGFX::Textures::OnBitmapTagUnloading
void OnBitmapTagUnloading(std::string tag_path)
Definition: bitmaps.cpp:619
scene_manager_2d
Ogre::SceneManager * scene_manager_2d
Definition: ogre.cpp:102
Blam::RenderingBGFX::Passes::GetViewID
BLAM bgfx::ViewId GetViewID(std::string id)
Definition: bgfx.cpp:527
Blam::Rendering::Shutdown
BLAM void Shutdown()
Shuts down OGRE and cleans up any memory used by it.
Definition: ogre.cpp:598
Demo::BaseSystem::finishFrameParallel
void finishFrameParallel(void)
Definition: BaseSystem.cpp:72
Blam::RenderingBGFX::Textures::GetTextureFromTag
BLAM bgfx::TextureHandle GetTextureFromTag(std::string tag_path)
Retrieves an OGRE texture from a tag path.
Definition: bitmaps.cpp:453
Blam::Rendering::RenderLoop
BLAM void RenderLoop()
Function to handle the render loop.
Definition: ogre.cpp:263
Blam::Rendering::Models::UnloadModels
BLAM void UnloadModels()
Definition: models.cpp:291
Blam::RenderingBGFX::Passes::GetPass
BLAM BlamRenderPass * GetPass(std::string id)
Definition: bgfx.cpp:502
BlamRaycast
Definition: rendering.h:133
Blam::RenderingBGFX::Lighting::FindLightSlotForShadowState
BLAM int FindLightSlotForShadowState(BlamShadowCasterState *state)
Definition: lights.cpp:210
ogre_initialized
bool ogre_initialized
Definition: ogre.cpp:82
ogre_raycast_data::processed
bool processed
Definition: ogre.cpp:71
Blam::RenderingBGFX::Textures::LoadDefaultTextures
BLAM void LoadDefaultTextures()
Definition: bitmaps.cpp:554
BlamTagData::tag_class
std::string tag_class
The tag's short class name.
Definition: tags.h:146
Blam::Globals::GetGlobalAsInteger
BLAM int * GetGlobalAsInteger(std::string name)
Retrieves a global's value as an int.
Definition: globals.cpp:391
Blam::Rendering::GetRenderWidth
BLAM int GetRenderWidth()
Retrieves the current width of the OGRE viewport.
Definition: ogre.cpp:680
model
Definition: model.h:27
lock
volatile bool lock
Whether or not the queue is currently locked to aid in thread safety.
Definition: queue.cpp:17