PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
PixelBullet::Graphics Class Reference

Module that manages the Vulkan m_Instance, Surface, Window and the renderpass structure. More...

#include <Graphics.hpp>

Public Member Functions

void Update ()
 
void CaptureScreenshot (const VirtualPath &filename, std::size_t id=0) const
 
const std::shared_ptr< CommandPool > & GetCommandPool (const std::thread::id &threadId=std::this_thread::get_id())
 
RendererGetRenderer () const
 
void SetRenderer (std::unique_ptr< Renderer > &&renderer)
 
const RenderStageGetRenderStage (uint32_t index) const
 
const DescriptorGetAttachment (const std::string &name) const
 
const PhysicalDeviceGetPhysicalDevice () const
 
const LogicalDeviceGetLogicalDevice () const
 
const VkPipelineCache & GetPipelineCache () const
 
const SurfaceGetSurface (std::size_t id) const
 
const SwapchainGetSwapchain (std::size_t id) const
 
void SetFramebufferResized (std::size_t id)
 
const InstanceGetInstance () const
 

Static Public Member Functions

static std::string StringifyResultVk (VkResult result)
 
static void CheckVk (VkResult result)
 
template<typename T >
static const T * SafeVkPtr (const std::vector< T > &vec)
 
template<typename T , std::size_t N>
static const T * SafeVkPtr (const std::array< T, N > &arr)
 

Detailed Description

Module that manages the Vulkan m_Instance, Surface, Window and the renderpass structure.

Member Function Documentation

◆ CaptureScreenshot()

void PixelBullet::Graphics::CaptureScreenshot ( const VirtualPath & filename,
std::size_t id = 0 ) const

Takes a screenshot of the current image of the display and saves it into a image file.

Parameters
filenameThe file to save the screenshot as.

◆ GetRenderer()

Renderer * PixelBullet::Graphics::GetRenderer ( ) const
inline

Gets the current renderer.

Returns
The renderer.

◆ SetRenderer()

void PixelBullet::Graphics::SetRenderer ( std::unique_ptr< Renderer > && renderer)
inline

Sets the current renderer to a new renderer.

Parameters
rendererThe new renderer.

The documentation for this class was generated from the following files: