Blamite Game Engine - blam!  00296.01.12.21.0102.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 <vulkan/vulkan.h>
#include <vulkan/vulkan_win32.h>
#include <glew/glew.h>
#include <sdl2/SDL.h>
#include <string>
#include <vector>
#include "components/3rdparty/imgui/imgui.h"
#include "components/diagnostics/errors/errors.h"

Go to the source code of this file.

Namespaces

 BlamRendering
 Namespace for things relating to rendering.
 
 BlamRendering::Vulkan
 Namespace containing functions exclusive to Vulkan.
 
 BlamRendering::Vulkan::DebugMessenger
 Namespace containing functions relating to the Vulkan debug messenger.
 
 BlamRendering::Vulkan::Device
 Namespace containing functions relating to Vulkan physical device selection.
 
 BlamRendering::Vulkan::Presentation
 Namespace containing functions relating to Vulkan presentation on-screen.
 
 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::OpenGL
 Namespace containing functions exclusive to OpenGL.
 
 BlamRendering::BGFX
 
 Blam
 Namespace surrounding all major engine components.
 

Macros

#define BLAM
 

Enumerations

enum  BlamRenderingEngine {
  DirectX11, Vulkan, OpenGL3, BGFX,
  NotReady
}
 

Functions

BLAM void BlamRendering::Vulkan::DebugMessenger::Initialize ()
 Initializes the Vulkan debug messenger. More...
 
BLAM void BlamRendering::Vulkan::DebugMessenger::Shutdown ()
 Shuts down the Vulkan debug messenger. More...
 
BLAM void BlamRendering::Vulkan::DebugMessenger::PopulateCreateInfo (VkDebugUtilsMessengerCreateInfoEXT *create_info)
 Populates debug messenger creation information. More...
 
BLAM std::vector< VkPhysicalDevice > BlamRendering::Vulkan::Device::GetDeviceList ()
 Retrieves the list of physical devices available to Vulkan. More...
 
BLAM bool BlamRendering::Vulkan::Device::IsDeviceSuitable (VkPhysicalDevice device)
 Determines whether or not a given Vulkan device is suitable for the engine's requirements. More...
 
BLAM int BlamRendering::Vulkan::Device::RateDeviceSuitability (VkPhysicalDevice device)
 Rates a given physical device based on its capabilities and features. More...
 
BLAM void BlamRendering::Vulkan::Device::SelectManualDevice (int device_index)
 Instructs Vulkan to try to select a specific device. More...
 
BLAM void BlamRendering::Vulkan::Device::SelectBestDevice ()
 Instructs Vulkan to select the best compatiable device. More...
 
BLAM void BlamRendering::Vulkan::Device::SelectDefaultDevice ()
 Instructs Vulkan to select the first compatiable device. More...
 
BLAM void BlamRendering::Vulkan::Device::CreateLogicalDevice ()
 
BLAM void BlamRendering::Vulkan::Device::DestroyLogicalDevice ()
 
BLAM void BlamRendering::Vulkan::Presentation::CreateSurface ()
 Prepares the Vulkan surface used for rendering. More...
 
BLAM VkSurfaceKHR * BlamRendering::Vulkan::Presentation::GetSurface ()
 Retrieves the Vulkan window surface. More...
 
BLAM void BlamRendering::Vulkan::Presentation::DestroySurface ()
 Destroys the Vulkan surface. More...
 
BLAM VkQueue * BlamRendering::Vulkan::Presentation::GetPresentQueue ()
 Retrieves the Vulkan presentation queue. More...
 
BLAM void BlamRendering::Vulkan::Initialize ()
 Initializes Vulkan. More...
 
BLAM void BlamRendering::Vulkan::RenderLoop ()
 Renders engine graphics onscreen. More...
 
BLAM void BlamRendering::Vulkan::Shutdown ()
 Shuts down Vulkan. More...
 
BLAM bool BlamRendering::Vulkan::CheckValidationLayerSupport ()
 Checks whether or not Vulkan's default validation layer is available. More...
 
BLAM VkInstance * BlamRendering::Vulkan::GetInstance ()
 Retrieves the Vulkan instance. More...
 
BLAM bool BlamRendering::Vulkan::ValidationLayersEnabled ()
 Checks whether or not validation layers are enabled. More...
 
BLAM std::vector< const char * > BlamRendering::Vulkan::GetEnabledLayers ()
 Retrieves the list of all enabled Vulkan layers. More...
 
BLAM std::vector< VkExtensionProperties > BlamRendering::Vulkan::GetAvailableExtensions ()
 Retrieves the list of all extensions available to Vulkan. More...
 
BLAM std::vector< VkLayerProperties > BlamRendering::Vulkan::GetAvailableLayers ()
 Retrieves the list of all validation layers available to Vulkan. More...
 
BLAM std::vector< const char * > BlamRendering::Vulkan::GetRequiredExtensions ()
 Gets a list of required Vulkan extensions. More...
 
BLAM void BlamRendering::Vulkan::PrintVulkanAvailabilityInfo ()
 Prints lists of available Vulkan extensions and validation layers. More...
 
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 ImVec4 * BlamRendering::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 BlamResult BlamRendering::OpenGL::Initialize ()
 Initializes OpenGL. More...
 
BLAM void BlamRendering::OpenGL::RenderLoop ()
 Renders a frame to the application window. More...
 
BLAM void BlamRendering::OpenGL::Shutdown ()
 Shuts down OpenGL. More...
 
BLAM SDL_GLContext * BlamRendering::OpenGL::GetGLContext ()
 Retrieves the current OpenGL context. 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 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 ImVec4 * BlamRendering::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
DirectX11 
Vulkan 
OpenGL3 
BGFX 
NotReady