![]() |
Blamite Game Engine - blam!
00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
|
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::GraphicsSystem * | GetGraphicsSystem () |
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) |
Namespace for things relating to rendering.
void Blam::Rendering::DisplayBasicCrashScreen | ( | std::string | additional_info = "" | ) |
Displays a basic crash screen, with an optional message.
additional_info | - Additional information to display on the crash screen. |
void Blam::Rendering::DisplayDetailedCrashScreen | ( | std::string | expression, |
std::string | file, | ||
int | line, | ||
std::string | message | ||
) |
Displays a detailed crash screen.
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. |
Ogre::Camera * Blam::Rendering::Get2DCamera | ( | ) |
Retrieves the camera used to handle 2D rendering.
Ogre::SceneManager * Blam::Rendering::Get2DSceneManager | ( | ) |
Retrieves the scene manager used to handle 2D rendering.
double Blam::Rendering::GetDeltaTime | ( | ) |
Retrieves delta time that has passed since the previous frame was completed.
BlamVector3 Blam::Rendering::GetGizmoMousePosition3D | ( | ) |
Demo::GraphicsSystem * Blam::Rendering::GetGraphicsSystem | ( | ) |
Retrieves the graphics system used by OGRE.
bool Blam::Rendering::GetImGuiHiddenState | ( | ) |
Checks whether ImGUI is currently hidden or not.
true
if ImGUI is currently hidden, otherwise returns false
. BlamVector3 Blam::Rendering::GetMousePosition3D | ( | ) |
int Blam::Rendering::GetRenderHeight | ( | ) |
Retrieves the current height of the OGRE viewport.
int Blam::Rendering::GetRenderWidth | ( | ) |
Retrieves the current width of the OGRE viewport.
Ogre::Window * Blam::Rendering::GetRenderWindow | ( | ) |
Retrieves the primary OGRE rendering window.
BlamVector2 Blam::Rendering::GetScreenPointFrom3DPoint | ( | BlamVector3 | point | ) |
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.
width | - The new width of the window. |
height | - The new height of the window. |
bool Blam::Rendering::Initialize | ( | ) |
Initializes the OGRE rendering library.
true
if OGRE was successfully initialized, otherwise returns false
. If this returns false
, engine startup should be aborted. 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.
void Blam::Rendering::ProcessSDLEvents | ( | SDL_Event * | event | ) |
Function used to allow OGRE to handle SDL events.
event | - The SDL event that was fired. |
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 |
||
) |
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 |
||
) |
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 |
||
) |
void Blam::Rendering::RenderLoop | ( | ) |
Function to handle the render loop.
Should be called each frame.
void Blam::Rendering::RenderThread | ( | ) |
Function used to handle the render thread.
void Blam::Rendering::ResumeRenderThread | ( | ) |
Resumes the render thread.
void Blam::Rendering::Shutdown | ( | ) |
Shuts down OGRE and cleans up any memory used by it.
void Blam::Rendering::TakeScreenshot | ( | ) |
Instructs OGRE to save a screenshot on the next frame.
void Blam::Rendering::WriteScreenshot | ( | ) |
Saves a screenshot of the current frame to a file.