Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
ogre.cpp File Reference
#include "rendering.h"
#include <thread>
#include <Strings/components/utils/math/math.h>
#include <Strings/components/classes/events/game_engine_events/NewFrame/NewFrameEvent.h>
#include <OGRE/OgreConfigFile.h>
#include <OGRE/OgreTimer.h>
#include <OGRE/OgreRoot.h>
#include <OGRE/OgreWindow.h>
#include <OGRE/Compositor/OgreCompositorWorkspace.h>
#include <OGRE/Compositor/OgreCompositorManager2.h>
#include <OGRE/OgreRectangle2D2.h>
#include <OGRE/OgreRenderable.h>
#include <OGRE/OgreMovableObject.h>
#include <OGRE/OgreMeshManager.h>
#include <OGRE/OgreMeshManager2.h>
#include <OGRE/OgreItem.h>
#include <OGRE/OgreCamera.h>
#include <OGRE/OgreSphere.h>
#include <OGRE/OgrePlatformInformation.h>
#include <OGRE/OgreHlms.h>
#include <OGRE/OgreMesh2.h>
#include <OGRE/Hlms/Pbs/OgreHlmsPbs.h>
#include <OGRE/Hlms/Pbs/OgreHlmsPbsDatablock.h>
#include <OGRE/OgreSceneManager.h>
#include <OGRE/Compositor/OgreCompositorNode.h>
#include <OGRE/OgreAtmosphereComponent.h>
#include <OGRE/Atmosphere/OgreAtmosphereNpr.h>
#include <stdint.h>
#include <mutex>
#include "api/v1/types/tags/classes/bitmap.h"
#include "api/v1/types/tags/classes/material.h"
#include "api/v1/types/tags/classes/camera.h"
#include "api/v1/types/tags/classes/scenario.h"
#include "api/v1/types/tags/classes/sky_atm_parameters.h"
#include "components/content/tags/tag_io.h"
#include "components/content/tags/tags.h"
#include "components/ui/imgui/imgui.h"
#include "components/3rdparty/imgui/formats/ogre2/imgui_impl_ogre2.h"
#include "components/3rdparty/imgui/formats/dx11/imgui_impl_dx11.h"
#include "components/3rdparty/imgui/formats/imgui_impl_sdl.h"
#include "components/3rdparty/ogre2/GraphicsSystem.h"
#include "components/3rdparty/ogre2/SdlInputHandler.h"
#include "components/3rdparty/ogre2/BlamOgreInjections.h"
#include "components/settings/config/config.h"
#include "components/rendering/compositor/compositor.h"
#include "components/core/director/director.h"
#include "components/ui/blam/ui.h"
#include "components/ui/blam/widgets/builtin/crash_screen/BlamUIWidget_CrashScreen.h"
#include "components/diagnostics/logger/logger.h"
#include "components/content/tags/scenario.h"
#include "components/diagnostics/errors/errors.h"
#include "components/core/input/keyboard.h"
#include "components/resources/engine_definitions/engine_definitions.h"
#include "components/core/tick/tick.h"
#include "components/rendering/classes/BlamHlmsListener.h"
#include "core.h"

Classes

struct  ogre_raycast_data
 

Functions

std::vector< BlamWorldObject * > raycast (Ogre::Ray ray, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
 
void mtxOrtho (float *_result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _homogeneousNdc)
 

Variables

Demo::GraphicsSystemogre_graphics_system = nullptr
 
Ogre::Window * renderWindow = nullptr
 
Ogre::Timer timer
 
double timeSinceLast = 1.0 / 60.0
 
Ogre::uint64 startTime
 
bool ogre_initialized = false
 
bool ogre_render_thread_stopped = false
 
bool ogre_stop_render_thread = false
 
bool ogre_use_render_thread = false
 
bool screenshot_pending = false
 
bool post_init_needs_datablock_update = true
 
int max_2d_z_depth = 10050
 
bool hide_imgui = false
 
volatile bool pause_render_thread = false
 
volatile bool render_thread_paused = false
 
std::thread::id render_thread_id
 
bool rendering_ready = false
 
float last_2d_zoom_level = 0.0f
 
volatile bool zoom_level_changed_this_frame = false
 
Ogre::Item * __debug_floor_item = nullptr
 
Ogre::Camera * camera2 = nullptr
 
Ogre::SceneManager * scene_manager_2d = nullptr
 
BlamVector3 mouse_pos_3d = BlamVector3()
 
BlamVector3 gizmo_pos_3d = BlamVector3()
 
std::vector< ogre_raycast_data * > pending_raycasts = std::vector<ogre_raycast_data*>()
 
std::mutex pending_raycasts_lock = std::mutex()
 
BlamOgreInjectionsogre_injections = nullptr
 

Function Documentation

◆ mtxOrtho()

void mtxOrtho ( float *  _result,
float  _left,
float  _right,
float  _bottom,
float  _top,
float  _near,
float  _far,
float  _offset,
bool  _homogeneousNdc 
)
+ Here is the caller graph for this function:

◆ 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 
)
Todo:
possibly thread unsafe (can get stuck sometimes?)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ __debug_floor_item

Ogre::Item* __debug_floor_item = nullptr

◆ camera2

Ogre::Camera* camera2 = nullptr

◆ gizmo_pos_3d

BlamVector3 gizmo_pos_3d = BlamVector3()

◆ hide_imgui

bool hide_imgui = false

◆ last_2d_zoom_level

float last_2d_zoom_level = 0.0f

◆ max_2d_z_depth

int max_2d_z_depth = 10050

◆ mouse_pos_3d

BlamVector3 mouse_pos_3d = BlamVector3()

◆ ogre_graphics_system

Demo::GraphicsSystem* ogre_graphics_system = nullptr

◆ ogre_initialized

bool ogre_initialized = false

◆ ogre_injections

BlamOgreInjections* ogre_injections = nullptr

◆ ogre_render_thread_stopped

bool ogre_render_thread_stopped = false

◆ ogre_stop_render_thread

bool ogre_stop_render_thread = false

◆ ogre_use_render_thread

bool ogre_use_render_thread = false

◆ pause_render_thread

volatile bool pause_render_thread = false

◆ pending_raycasts

std::vector<ogre_raycast_data*> pending_raycasts = std::vector<ogre_raycast_data*>()

◆ pending_raycasts_lock

std::mutex pending_raycasts_lock = std::mutex()

◆ post_init_needs_datablock_update

bool post_init_needs_datablock_update = true

◆ render_thread_id

std::thread::id render_thread_id

◆ render_thread_paused

volatile bool render_thread_paused = false

◆ rendering_ready

bool rendering_ready = false

◆ renderWindow

Ogre::Window* renderWindow = nullptr

◆ scene_manager_2d

Ogre::SceneManager* scene_manager_2d = nullptr

◆ screenshot_pending

bool screenshot_pending = false

◆ startTime

Ogre::uint64 startTime

◆ timer

Ogre::Timer timer

◆ timeSinceLast

double timeSinceLast = 1.0 / 60.0

◆ zoom_level_changed_this_frame

volatile bool zoom_level_changed_this_frame = false