Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
rendering.h File Reference
#include <stdint.h>
#include <sdl2/SDL.h>
#include <sdl2/SDL_events.h>
#include <OGRE/Hlms/Pbs/OgreHlmsPbsDatablock.h>
#include <OGRE/Hlms/Unlit/OgreHlmsUnlitDatablock.h>
#include <Strings/components/classes/map/map.h>
#include <string>
#include <vector>
#include "components/3rdparty/imgui/imgui.h"
#include "components/3rdparty/ogre2/GraphicsSystem.h"
#include "components/diagnostics/errors/errors.h"
#include "api/v1/types/tags.h"
#include "api/v1/types/world_objects.h"
+ Include dependency graph for rendering.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ogre_material_instance_data
 Data structure used to store OGRE material instance data. More...
 
class  ogre_material_info_data
 Class used to store OGRE material information. More...
 
class  BlamRaycast
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 Blam::Rendering
 Namespace for things relating to rendering.
 
 Blam::Rendering::Materials
 Namespace containing functions for interacting with materials.
 
 Blam::Rendering::Textures
 Namespace containing functions for interacting with textures.
 
 Blam::Rendering::Models
 
 Blam::Rendering::Lights
 
 Blam::Rendering::Utils
 Miscellaneous utility functions for use with OGRE.
 

Macros

#define BLAM
 
#define GUI_RENDER_QUEUE_GROUP_ID   200
 The ID of the render queue group used for 2D rendering. More...
 
#define BLAM_OGRE_RESOURCE_GROUP   Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME
 The name of the OGRE resource group used for engine resources. More...
 

Functions

BLAM bool Blam::Rendering::Initialize ()
 Initializes the OGRE rendering library. More...
 
BLAM void Blam::Rendering::RenderLoop ()
 Function to handle the render loop. More...
 
BLAM void Blam::Rendering::RenderThread ()
 Function used to handle the render thread. More...
 
BLAM void Blam::Rendering::PauseRenderThread ()
 Pauses the render thread. More...
 
BLAM void Blam::Rendering::ResumeRenderThread ()
 Resumes the render thread. More...
 
BLAM void Blam::Rendering::Shutdown ()
 Shuts down OGRE and cleans up any memory used by it. More...
 
BLAM void Blam::Rendering::ProcessSDLEvents (SDL_Event *event)
 Function used to allow OGRE to handle SDL events. More...
 
BLAM Demo::GraphicsSystemBlam::Rendering::GetGraphicsSystem ()
 Retrieves the graphics system used by OGRE. More...
 
BLAM void Blam::Rendering::HandleWindowReisze (int width, int height)
 Instructs OGRE to handle a window resize. More...
 
BLAM int Blam::Rendering::GetRenderWidth ()
 Retrieves the current width of the OGRE viewport. More...
 
BLAM int Blam::Rendering::GetRenderHeight ()
 Retrieves the current height of the OGRE viewport. More...
 
BLAM Ogre::Window * Blam::Rendering::GetRenderWindow ()
 Retrieves the primary OGRE rendering window. More...
 
BLAM double Blam::Rendering::GetDeltaTime ()
 Retrieves delta time that has passed since the previous frame was completed. More...
 
BLAM void Blam::Rendering::TakeScreenshot ()
 Instructs OGRE to save a screenshot on the next frame. More...
 
BLAM void Blam::Rendering::WriteScreenshot ()
 Saves a screenshot of the current frame to a file. More...
 
BLAM Ogre::SceneManager * Blam::Rendering::Get2DSceneManager ()
 Retrieves the scene manager used to handle 2D rendering. More...
 
BLAM Ogre::Camera * Blam::Rendering::Get2DCamera ()
 Retrieves the camera used to handle 2D rendering. More...
 
BLAM void Blam::Rendering::DisplayBasicCrashScreen (std::string additional_info="")
 Displays a basic crash screen, with an optional message. More...
 
BLAM void Blam::Rendering::DisplayDetailedCrashScreen (std::string expression, std::string file, int line, std::string message)
 Displays a detailed crash screen. More...
 
BLAM bool Blam::Rendering::GetImGuiHiddenState ()
 Checks whether ImGUI is currently hidden or not. More...
 
BLAM BlamVector3 Blam::Rendering::GetMousePosition3D ()
 
BLAM BlamVector2 Blam::Rendering::GetScreenPointFrom3DPoint (BlamVector3 point)
 
BLAM BlamVector3 Blam::Rendering::GetGizmoMousePosition3D ()
 
BLAM std::vector< BlamWorldObject * > Blam::Rendering::RaycastScreen (int screen_x, int screen_y, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
 
BLAM std::vector< BlamWorldObject * > Blam::Rendering::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)
 
BLAM std::vector< BlamWorldObject * > Blam::Rendering::Raycast (BlamVector3 origin, BlamVector3 direction, bool sort_by_distance=true, uint16_t max_results=0U, BlamQueryFlags query_flags=BlamQueryFlags::QF_EXCLUDE_GIZMOS)
 
BLAM void Blam::Rendering::Materials::RebuildDatablocks ()
 Rebuilds ALL datablocks (including instances) from their original tags. More...
 
BLAM bool Blam::Rendering::Materials::BuildDatablockFromTag (material *material_tag, std::string tag_path)
 Creates an OGRE material datablock from a material tag. More...
 
BLAM void Blam::Rendering::Materials::ReloadPendingMaterials ()
 Reloads all datablocks which are flagged as requiring a reload. More...
 
BLAM Ogre::HlmsDatablock * Blam::Rendering::Materials::GetDatablockFromTag (std::string tag_path)
 Retrieves an OGRE datablock from a material tag path. More...
 
BLAM ogre_material_instance_dataBlam::Rendering::Materials::GetDatablockInstanceFromTag (std::string tag_path, std::string referencing_tag_path)
 Retrieves a datablock instance from a material tag path, and a referencing tag path. More...
 
BLAM ogre_material_instance_dataBlam::Rendering::Materials::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. More...
 
BLAM bool Blam::Rendering::Materials::LoadPBSDatablockFromMaterialTag (Ogre::HlmsPbsDatablock *datablock, material *material_tag)
 Loads a PBS (Physically-Based Shading) datablock from a material tag. More...
 
BLAM bool Blam::Rendering::Materials::LoadUnlitDatablockFromMaterialTag (Ogre::HlmsUnlitDatablock *datablock, material *material_tag)
 Loads an Unlit datablock from a material tag. More...
 
BLAM Ogre::HlmsUnlitDatablock * Blam::Rendering::Materials::CreateDefaultUnlitDatablock (std::string id)
 Creates a default Unlit datablock. More...
 
BLAM Ogre::HlmsUnlitDatablock * Blam::Rendering::Materials::CreateDefaultUnlitDatablockForPrimitives (std::string id)
 Creates a default Unlit datablock for use with 2D and 3D primitives. More...
 
BLAM Ogre::HlmsPbsDatablock * Blam::Rendering::Materials::CreateDefaultPbsDatablock (std::string id)
 Creates a default PBS datablock. More...
 
BLAM Ogre::HlmsPbsDatablock * Blam::Rendering::Materials::CreateDefaultPbsDatablockForPrimitives (std::string id)
 Creates a default PBS datablock for use with 2D and 3D primitives. More...
 
BLAM void Blam::Rendering::Textures::BuildTextureFromTag (bitmap *bitmap_tag, std::string tag_path)
 Loads a texture into OGRE from a bitmap tag. More...
 
BLAM Ogre::TextureGpu * Blam::Rendering::Textures::GetTextureFromTag (std::string tag_path)
 Retrieves an OGRE texture from a tag path. More...
 
BLAM void Blam::Rendering::Textures::ReloadPendingBitmaps ()
 Reloads all bitmaps that are currently pending a reload. More...
 
BLAM Ogre::TextureGpu * Blam::Rendering::Textures::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. More...
 
BLAM void Blam::Rendering::Models::LoadModel (render_model *model, std::string tag_path)
 
BLAM Ogre::MeshPtr Blam::Rendering::Models::GetModelFromTagPath (std::string tag_path)
 
BLAM void Blam::Rendering::Models::LoadPendingModels ()
 
BLAM void Blam::Rendering::Models::UnloadModels ()
 
BLAM Ogre::Light * Blam::Rendering::Lights::CreateLightFromTag (light *light)
 

Macro Definition Documentation

◆ BLAM

#define BLAM

◆ BLAM_OGRE_RESOURCE_GROUP

#define BLAM_OGRE_RESOURCE_GROUP   Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME

The name of the OGRE resource group used for engine resources.

◆ GUI_RENDER_QUEUE_GROUP_ID

#define GUI_RENDER_QUEUE_GROUP_ID   200

The ID of the render queue group used for 2D rendering.