Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
rendering.h File Reference
#include <d3d11_1.h>
#include <d2d1_1.h>
#include <dwrite.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 dependency graph for rendering.h:

Go to the source code of this file.

Classes

struct  ogre_material_instance_data
 
class  ogre_material_info_data
 

Namespaces

 BlamRendering
 Namespace for things relating to rendering.
 
 BlamRendering::DirectX
 Namespace containing functions exclusive to DirectX.
 
 BlamRendering::DirectX::D2D
 Namespace containing functions relating to Direct2D.
 
 BlamRendering::DirectX::WIC
 Namespace containing functions relating to the Windows Imaging Component (WIC).
 
 BlamRendering::BGFX
 Namespace containing functions exclusive to bgfx.
 
 BlamRendering::OGRE
 Namespace containing functions exclusive to OGRE-Next.
 
 BlamRendering::OGRE::Materials
 Namespace containing functions for interacting with materials.
 
 BlamRendering::OGRE::Textures
 Namespace containing functions for interacting with textures.
 
 BlamRendering::OGRE::Utils
 Miscellaneous utility functions for use with OGRE.
 
 Blam
 Namespace surrounding all major engine components.
 

Macros

#define BLAM
 

Enumerations

enum  BlamRenderingEngine { DirectX11, BGFX, OGRE, NotReady }
 Enumerator listing possible rendering APIs/engines. More...
 

Functions

BLAM ID2D1DeviceContext * BlamRendering::DirectX::D2D::GetD2DRenderTarget ()
 Retrieves the Direct2D render target. More...
 
BLAM ID2D1Factory * BlamRendering::DirectX::D2D::GetD2DFactory ()
 Retrieves the Direct2D factory. More...
 
BLAM IDWriteFactory * BlamRendering::DirectX::D2D::GetDWriteFactory ()
 Retrieves the DirectWrite factory. More...
 
BLAM HRESULT BlamRendering::DirectX::D2D::LoadFontFromFile (std::string id, std::string file_path)
 Loads a TrueType font from the specified file into the list of loaded font collections. More...
 
BLAM IWICImagingFactory * BlamRendering::DirectX::WIC::GetWICFactory ()
 Retrieves the WIC Imaging Factory. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::CreateD2DBitmapFromResource (int res_id, const char *res_type, ID2D1Bitmap **bitmap_pointer)
 Creates a Direct2D bitmap from an application resource. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::CreateD2DBitmapFromFile (std::wstring path, ID2D1Bitmap **bitmap_pointer)
 Creates a Direct2D bitmap from a file. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::CreateWICBitmapFromFile (std::wstring path, IWICBitmap **bitmap_pointer)
 Creates a WIC bitmap from a file. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::CreateWICBitmapFromMemory (void *data, int size, IWICBitmap **bitmap_pointer)
 Creates a WIC bitmap from a block of memory. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::ConvertWICBitmapToD2D (IWICBitmap *wic_bitmap, ID2D1Bitmap **d2d_bitmap)
 Converts a WIC bitmap to a D2D bitmap. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::ConvertWICBitmapToD2D (IWICBitmap *wic_bitmap, ID2D1Bitmap **d2d_bitmap, ID2D1RenderTarget *render_target)
 Converts a WIC bitmap to a D2D bitmap, with a specific render target. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::ConvertWICBitmapTo32bppPBGRA (IWICBitmap *source, IWICBitmap **destination)
 Converts a WIC bitmap to a WIC bitmap, with the 32 bits-per-pixe, PBGRA format. More...
 
BLAM HRESULT BlamRendering::DirectX::WIC::Initialize ()
 Initializes the Windows Imaging Component (WIC). More...
 
BLAM void BlamRendering::DirectX::WIC::Shutdown ()
 Shuts down the Windows Imaging Component (WIC). More...
 
BLAM ID3D11Device * BlamRendering::DirectX::GetD3DDevice ()
 Retrieves the current Direct3D device. More...
 
BLAM ID3D11DeviceContext * BlamRendering::DirectX::GetD3DContext ()
 Retrieves the current Direct3D context. More...
 
BLAM IDXGISwapChain * BlamRendering::DirectX::GetDXGISwapChain ()
 Retrieves the current DXGI Swap Chain. More...
 
BLAM ID3D11RenderTargetView * BlamRendering::DirectX::GetD3DRenderTargetView ()
 Retrieves the current Direct3D Render Target. More...
 
BLAM DXGI_SWAP_CHAIN_DESC BlamRendering::DirectX::GetSwapChainDesc ()
 Retrieves the current Direct3D Swap Chain description. More...
 
BLAM HRESULT BlamRendering::DirectX::Initialize (HWND hWnd)
 Initializes DirectX 11. More...
 
BLAM void BlamRendering::DirectX::Cleanup ()
 Cleans up all DirectX data. More...
 
BLAM HRESULT BlamRendering::DirectX::HandleWindowResize (LPARAM lParam)
 Handles a window resize event. More...
 
BLAM bool * BlamRendering::DirectX::RenderTargetClearing ()
 Retrieves whether or not to enable render target clearing. More...
 
BLAM void BlamRendering::DirectX::RenderLoop (bool debug)
 Renders everything to the screen. More...
 
BLAM void BlamRendering::DirectX::ShutdownRenderThread ()
 Instructs the rendering thread to stop running. More...
 
BLAM void BlamRendering::DirectX::RenderThread (bool debug)
 Instructs the engine to start rendering on a separate thread. More...
 
BLAM bool BlamRendering::DirectX::HasRenderThreadStopped ()
 Determines whether or not the render thread has finished stopping. More...
 
BLAM void BlamRendering::DirectX::SetClearColor (ImVec4 color)
 Changes the color to used to clear the render target. More...
 
BLAM ImVec4BlamRendering::DirectX::GetClearColor ()
 Retrieves the current color used to clear the render target. More...
 
BLAM HRESULT BlamRendering::DirectX::UpdateResolution (int x, int y)
 Changes the DirectX render target resolution. More...
 
BLAM ID3D11Texture2D ** BlamRendering::DirectX::GetLastFrameTexture ()
 Retrieves the last frame that was rendered. More...
 
BLAM HRESULT BlamRendering::DirectX::GetLastFrameTextureAlt (ID3D11Texture2D *texture)
 Retrieves the last frame that was rendered. More...
 
BLAM void BlamRendering::DirectX::ScreenshotDone ()
 Informs DirectX that the screenshot has finished being captured. More...
 
BLAM HRESULT BlamRendering::DirectX::GetLastFrameHResult ()
 Unused. More...
 
BLAM void BlamRendering::DirectX::DisplayDetailedCrashScreen (const char *expression, const char *file, int line, std::string details)
 Displays a detailed engine crash screen. More...
 
BLAM void BlamRendering::DirectX::DisplayBasicCrashScreen ()
 Displays a basic engine crash screen. More...
 
BLAM void BlamRendering::DirectX::DisplaySignalCrashScreen (int signal)
 Displays a signal-based engine crash screen. More...
 
BLAM void BlamRendering::BGFX::SetPlatformData ()
 
BLAM void BlamRendering::BGFX::Initialize ()
 
BLAM void BlamRendering::BGFX::RenderLoop ()
 
BLAM void BlamRendering::BGFX::Shutdown ()
 
BLAM void BlamRendering::BGFX::HandleWindowReisze (int width, int height)
 
BLAM void BlamRendering::BGFX::SetViewClearFlags (int new_flags)
 
BLAM uint16_t BlamRendering::BGFX::Get3DViewID ()
 
BLAM uint16_t BlamRendering::BGFX::Get2DViewID ()
 
BLAM int BlamRendering::BGFX::GetRenderWidth ()
 
BLAM int BlamRendering::BGFX::GetRenderHeight ()
 
BLAM bool BlamRendering::OGRE::Initialize ()
 
BLAM void BlamRendering::OGRE::RenderLoop ()
 
BLAM void BlamRendering::OGRE::RenderThread ()
 
BLAM void BlamRendering::OGRE::Shutdown ()
 
BLAM void BlamRendering::OGRE::ProcessSDLEvents (SDL_Event *event)
 
BLAM Demo::GraphicsSystemBlamRendering::OGRE::GetGraphicsSystem ()
 
BLAM void BlamRendering::OGRE::HandleWindowReisze (int width, int height)
 
BLAM int BlamRendering::OGRE::GetRenderWidth ()
 
BLAM int BlamRendering::OGRE::GetRenderHeight ()
 
BLAM Ogre::Window * BlamRendering::OGRE::GetRenderWindow ()
 
BLAM double BlamRendering::OGRE::GetDeltaTime ()
 
BLAM void BlamRendering::OGRE::TakeScreenshot ()
 
BLAM void BlamRendering::OGRE::WriteScreenshot ()
 
BLAM Ogre::SceneManager * BlamRendering::OGRE::Get2DSceneManager ()
 
BLAM Ogre::Camera * BlamRendering::OGRE::Get2DCamera ()
 
BLAM void BlamRendering::OGRE::DisplayBasicCrashScreen (std::string additional_info="")
 
BLAM void BlamRendering::OGRE::DisplayDetailedCrashScreen (std::string expression, std::string file, int line, std::string message)
 
BLAM bool BlamRendering::OGRE::GetImGuiHiddenState ()
 
BLAM void BlamRendering::OGRE::Materials::RebuildDatablocks ()
 
BLAM bool BlamRendering::OGRE::Materials::BuildDatablockFromTag (material *material_tag, std::string tag_path)
 
BLAM void BlamRendering::OGRE::Materials::ReloadPendingMaterials ()
 
BLAM Ogre::HlmsDatablock * BlamRendering::OGRE::Materials::GetDatablockFromTag (std::string tag_path)
 
BLAM ogre_material_instance_dataBlamRendering::OGRE::Materials::GetDatablockInstanceFromTag (std::string tag_path, std::string referencing_tag_path)
 
BLAM ogre_material_instance_dataBlamRendering::OGRE::Materials::CreateDatablockInstance (std::string tag_path, std::string referencing_tag_path)
 
BLAM bool BlamRendering::OGRE::Materials::LoadPBSDatablockFromMaterialTag (Ogre::HlmsPbsDatablock *datablock, material *material_tag)
 
BLAM bool BlamRendering::OGRE::Materials::LoadUnlitDatablockFromMaterialTag (Ogre::HlmsUnlitDatablock *datablock, material *material_tag)
 
BLAM Ogre::HlmsUnlitDatablock * BlamRendering::OGRE::Materials::CreateDefaultUnlitDatablock (std::string id)
 
BLAM Ogre::HlmsUnlitDatablock * BlamRendering::OGRE::Materials::CreateDefaultUnlitDatablockForPrimitives (std::string id)
 
BLAM Ogre::HlmsPbsDatablock * BlamRendering::OGRE::Materials::CreateDefaultPbsDatablock (std::string id)
 
BLAM Ogre::HlmsPbsDatablock * BlamRendering::OGRE::Materials::CreateDefaultPbsDatablockForPrimitives (std::string id)
 
BLAM void BlamRendering::OGRE::Textures::BuildTextureFromTag (bitmap *bitmap_tag, std::string tag_path)
 
BLAM Ogre::TextureGpu * BlamRendering::OGRE::Textures::GetTextureFromTag (std::string tag_path)
 
BLAM void BlamRendering::OGRE::Textures::ReloadPendingBitmaps ()
 
BLAM Ogre::TextureGpu * BlamRendering::OGRE::Textures::LoadTexture2D (std::string id, void *pixel_data, int width, int height, Ogre::PixelFormatGpu format, int bytes_per_line)
 
BLAM BlamRenderingEngine BlamRendering::GetCurrentRenderingEngine ()
 Retrieves the current rendering engine being used. More...
 
BLAM void BlamRendering::SetClearColor (ImVec4 color)
 Changes the color to used to clear the render target. More...
 
BLAM ImVec4BlamRendering::GetClearColor ()
 Retrieves the color used for render target clearing. More...
 
BLAM void BlamRendering::ShowCrashScreen (const char *exc, const char *file, int line, std::string message)
 Displays the engine crash screen. More...
 
BLAM HRESULT BlamRendering::SetDisplayRes (int x, int y)
 Changes the game's display resolution. More...
 
BLAM void BlamRendering::HandleWindowResize (int width, int height, WPARAM wParam)
 
BLAM void Blam::TakeScreenshot ()
 Captures the current frame and saves it to a file. More...
 

Macro Definition Documentation

◆ BLAM

#define BLAM

Enumeration Type Documentation

◆ BlamRenderingEngine

Enumerator listing possible rendering APIs/engines.

Note
This will eventually be consolidated down to just OGRE, at which point this enumerator (as well as all of the middle-layer functions that sit between all of them) will become deprecated and eventually removed.
Enumerator
DirectX11 
BGFX 
OGRE 
NotReady