Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
Blam::Rendering Namespace Reference

Namespace for things relating to rendering. More...

Namespaces

 Lights
 
 Materials
 Namespace containing functions for interacting with materials.
 
 Models
 
 Textures
 Namespace containing functions for interacting with textures.
 
 Utils
 Miscellaneous utility functions for use with OGRE.
 

Functions

BLAM bool Initialize ()
 Initializes the OGRE rendering library. More...
 
BLAM void RenderLoop ()
 Function to handle the render loop. More...
 
BLAM void RenderThread ()
 Function used to handle the render thread. More...
 
BLAM void PauseRenderThread ()
 Pauses the render thread. More...
 
BLAM void ResumeRenderThread ()
 Resumes the render thread. More...
 
BLAM void Shutdown ()
 Shuts down OGRE and cleans up any memory used by it. More...
 
BLAM void ProcessSDLEvents (SDL_Event *event)
 Function used to allow OGRE to handle SDL events. More...
 
BLAM Demo::GraphicsSystemGetGraphicsSystem ()
 Retrieves the graphics system used by OGRE. More...
 
BLAM void HandleWindowReisze (int width, int height)
 Instructs OGRE to handle a window resize. More...
 
BLAM int GetRenderWidth ()
 Retrieves the current width of the OGRE viewport. More...
 
BLAM int GetRenderHeight ()
 Retrieves the current height of the OGRE viewport. More...
 
BLAM Ogre::Window * GetRenderWindow ()
 Retrieves the primary OGRE rendering window. More...
 
BLAM double GetDeltaTime ()
 Retrieves delta time that has passed since the previous frame was completed. More...
 
BLAM void TakeScreenshot ()
 Instructs OGRE to save a screenshot on the next frame. More...
 
BLAM void WriteScreenshot ()
 Saves a screenshot of the current frame to a file. More...
 
BLAM Ogre::SceneManager * Get2DSceneManager ()
 Retrieves the scene manager used to handle 2D rendering. More...
 
BLAM Ogre::Camera * Get2DCamera ()
 Retrieves the camera used to handle 2D rendering. More...
 
BLAM void DisplayBasicCrashScreen (std::string additional_info="")
 Displays a basic crash screen, with an optional message. More...
 
BLAM void DisplayDetailedCrashScreen (std::string expression, std::string file, int line, std::string message)
 Displays a detailed crash screen. More...
 
BLAM bool GetImGuiHiddenState ()
 Checks whether ImGUI is currently hidden or not. More...
 
BLAM BlamVector3 GetMousePosition3D ()
 
BLAM BlamVector2 GetScreenPointFrom3DPoint (BlamVector3 point)
 
BLAM BlamVector3 GetGizmoMousePosition3D ()
 
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)
 
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)
 
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)
 

Detailed Description

Namespace for things relating to rendering.

Function Documentation

◆ DisplayBasicCrashScreen()

void Blam::Rendering::DisplayBasicCrashScreen ( std::string  additional_info = "")

Displays a basic crash screen, with an optional message.

Parameters
additional_info- Additional information to display on the crash screen.
Todo:
Have this actually halt the engine - as of right now, the engine actually keeps running in the background.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DisplayDetailedCrashScreen()

void Blam::Rendering::DisplayDetailedCrashScreen ( std::string  expression,
std::string  file,
int  line,
std::string  message 
)

Displays a detailed crash screen.

Parameters
expression- The expression that caused the crash (ie, an assertion failure).
file- The file that caused the crash.
line- The line number containing the code that caused the crash.
message- A message to display to the user alongisde the other information.
Todo:
Have this actually halt the engine - as of right now, the engine actually keeps running in the background.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Get2DCamera()

Ogre::Camera * Blam::Rendering::Get2DCamera ( )

Retrieves the camera used to handle 2D rendering.

Returns
Pointer to the 2D camera.
+ Here is the caller graph for this function:

◆ Get2DSceneManager()

Ogre::SceneManager * Blam::Rendering::Get2DSceneManager ( )

Retrieves the scene manager used to handle 2D rendering.

Returns
Pointer to the 2D scene manager.
+ Here is the caller graph for this function:

◆ GetDeltaTime()

double Blam::Rendering::GetDeltaTime ( )

Retrieves delta time that has passed since the previous frame was completed.

Returns
The frame delta time.

◆ GetGizmoMousePosition3D()

BlamVector3 Blam::Rendering::GetGizmoMousePosition3D ( )
+ Here is the caller graph for this function:

◆ GetGraphicsSystem()

Demo::GraphicsSystem * Blam::Rendering::GetGraphicsSystem ( )

Retrieves the graphics system used by OGRE.

Returns
The graphics system used by OGRE.
+ Here is the caller graph for this function:

◆ GetImGuiHiddenState()

bool Blam::Rendering::GetImGuiHiddenState ( )

Checks whether ImGUI is currently hidden or not.

Returns
true if ImGUI is currently hidden, otherwise returns false.
+ Here is the caller graph for this function:

◆ GetMousePosition3D()

BlamVector3 Blam::Rendering::GetMousePosition3D ( )
+ Here is the caller graph for this function:

◆ GetRenderHeight()

int Blam::Rendering::GetRenderHeight ( )

Retrieves the current height of the OGRE viewport.

Returns
The height of the OGRE viewport, in pixels.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRenderWidth()

int Blam::Rendering::GetRenderWidth ( )

Retrieves the current width of the OGRE viewport.

Returns
The width of the OGRE viewport, in pixels.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRenderWindow()

Ogre::Window * Blam::Rendering::GetRenderWindow ( )

Retrieves the primary OGRE rendering window.

Returns
The primary OGRE rendering window.

◆ GetScreenPointFrom3DPoint()

BlamVector2 Blam::Rendering::GetScreenPointFrom3DPoint ( BlamVector3  point)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleWindowReisze()

void Blam::Rendering::HandleWindowReisze ( int  width,
int  height 
)

Instructs OGRE to handle a window resize.

This should typically only be called when the main application window is resized.

Parameters
width- The new width of the window.
height- The new height of the window.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Initialize()

bool Blam::Rendering::Initialize ( )

Initializes the OGRE rendering library.

Returns
true if OGRE was successfully initialized, otherwise returns false. If this returns false, engine startup should be aborted.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PauseRenderThread()

void Blam::Rendering::PauseRenderThread ( )

Pauses the render thread.

This function will halt the render thread and wait for the current frame render to pause. This can be used in cases where certain operations (such as loading render models) need to happen while OGRE is not currently rendering a frame.

When finished, ResumeRenderThread should be called to resume rendering - otherwise, rendering may be permanently paused.

◆ ProcessSDLEvents()

void Blam::Rendering::ProcessSDLEvents ( SDL_Event event)

Function used to allow OGRE to handle SDL events.

Parameters
event- The SDL event that was fired.
+ Here is the caller graph for this function:

◆ Raycast()

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 
)
+ Here is the call graph for this function:

◆ RaycastScreen()

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 
)
Todo:
Document
Note
Must be called from rendering thread.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RaycastScreenNormalized()

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 
)
+ Here is the call graph for this function:

◆ RenderLoop()

void Blam::Rendering::RenderLoop ( )

Function to handle the render loop.

Should be called each frame.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderThread()

void Blam::Rendering::RenderThread ( )

Function used to handle the render thread.

Note
This is a blocking function, intended only for use as part of the rendering thread.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResumeRenderThread()

void Blam::Rendering::ResumeRenderThread ( )

Resumes the render thread.

◆ Shutdown()

void Blam::Rendering::Shutdown ( )

Shuts down OGRE and cleans up any memory used by it.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TakeScreenshot()

void Blam::Rendering::TakeScreenshot ( )

Instructs OGRE to save a screenshot on the next frame.

+ Here is the caller graph for this function:

◆ WriteScreenshot()

void Blam::Rendering::WriteScreenshot ( )

Saves a screenshot of the current frame to a file.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: