Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::VulkanWindow Class Reference

Vulkan per-window swapchain, render pass, and rendering state. More...

#include <C:/Code/AeonEngine/engine/renderers/vulkan/VulkanWindow.hpp>

Collaboration diagram for AeonGames::VulkanWindow:
Collaboration graph

Public Member Functions

 VulkanWindow (VulkanRenderer &aVulkanRenderer, void *aWindowId)
 Construct from a renderer and native window handle.
 VulkanWindow (VulkanWindow &&aVulkanWindow)
 Move constructor.
 VulkanWindow (const VulkanWindow &aVulkanWindow)=delete
VulkanWindowoperator= (const VulkanWindow &aVulkanWindow)=delete
VulkanWindowoperator= (VulkanWindow &&aVulkanWindow)=delete
void BeginRender ()
void EndRender ()
 End the current frame, submit commands, and present.
void Render (const Matrix4x4 &aModelMatrix, const Mesh &aMesh, const Pipeline &aPipeline, const Material *aMaterial=nullptr, const BufferAccessor *aSkeleton=nullptr, Topology aTopology=Topology::TRIANGLE_LIST, uint32_t aVertexStart=0, uint32_t aVertexCount=0xffffffff, uint32_t aInstanceCount=1, uint32_t aFirstInstance=0) const
 Render a mesh with the given pipeline, material, and transform.
void SetProjectionMatrix (const Matrix4x4 &aMatrix)
 Set the projection matrix for this window.
void SetViewMatrix (const Matrix4x4 &aMatrix)
 Set the view matrix for this window.
const Matrix4x4GetProjectionMatrix () const
 Get the current projection matrix.
const Matrix4x4GetViewMatrix () const
 Get the current view matrix.
const FrustumGetFrustum () const
 Get the view frustum derived from the current matrices.
void ResizeViewport (int32_t aX, int32_t aY, uint32_t aWidth, uint32_t aHeight)
 Resize the rendering viewport.
BufferAccessor AllocateSingleFrameUniformMemory (size_t aSize)
 Allocate transient uniform memory for the current frame.
VkRenderPass GetRenderPass () const
 Get the Vulkan render pass for this window.
VkCommandBuffer GetCommandBuffer () const
 Get the current command buffer being recorded.

Detailed Description

Vulkan per-window swapchain, render pass, and rendering state.

Definition at line 35 of file VulkanWindow.hpp.

Constructor & Destructor Documentation

◆ VulkanWindow() [1/2]

AeonGames::VulkanWindow::VulkanWindow ( VulkanRenderer & aVulkanRenderer,
void * aWindowId )

Construct from a renderer and native window handle.

Definition at line 49 of file VulkanWindow.cpp.

◆ ~VulkanWindow()

AeonGames::VulkanWindow::~VulkanWindow ( )

Definition at line 102 of file VulkanWindow.cpp.

◆ VulkanWindow() [2/2]

AeonGames::VulkanWindow::VulkanWindow ( VulkanWindow && aVulkanWindow)

Move constructor.

Definition at line 66 of file VulkanWindow.cpp.

Member Function Documentation

◆ AllocateSingleFrameUniformMemory()

BufferAccessor AeonGames::VulkanWindow::AllocateSingleFrameUniformMemory ( size_t aSize)

Allocate transient uniform memory for the current frame.

Definition at line 984 of file VulkanWindow.cpp.

◆ BeginRender()

void AeonGames::VulkanWindow::BeginRender ( )
Todo
Allow for changing the clear values.

Definition at line 721 of file VulkanWindow.cpp.

◆ EndRender()

void AeonGames::VulkanWindow::EndRender ( )

End the current frame, submit commands, and present.

Definition at line 776 of file VulkanWindow.cpp.

◆ GetCommandBuffer()

VkCommandBuffer AeonGames::VulkanWindow::GetCommandBuffer ( ) const

Get the current command buffer being recorded.

Definition at line 994 of file VulkanWindow.cpp.

◆ GetFrustum()

const Frustum & AeonGames::VulkanWindow::GetFrustum ( ) const

Get the view frustum derived from the current matrices.

Definition at line 686 of file VulkanWindow.cpp.

◆ GetProjectionMatrix()

const Matrix4x4 & AeonGames::VulkanWindow::GetProjectionMatrix ( ) const

Get the current projection matrix.

Definition at line 676 of file VulkanWindow.cpp.

◆ GetRenderPass()

VkRenderPass AeonGames::VulkanWindow::GetRenderPass ( ) const

Get the Vulkan render pass for this window.

Definition at line 989 of file VulkanWindow.cpp.

◆ GetViewMatrix()

const Matrix4x4 & AeonGames::VulkanWindow::GetViewMatrix ( ) const

Get the current view matrix.

Definition at line 681 of file VulkanWindow.cpp.

◆ Render()

void AeonGames::VulkanWindow::Render ( const Matrix4x4 & aModelMatrix,
const Mesh & aMesh,
const Pipeline & aPipeline,
const Material * aMaterial = nullptr,
const BufferAccessor * aSkeleton = nullptr,
Topology aTopology = Topology::TRIANGLE_LIST,
uint32_t aVertexStart = 0,
uint32_t aVertexCount = 0xffffffff,
uint32_t aInstanceCount = 1,
uint32_t aFirstInstance = 0 ) const

Render a mesh with the given pipeline, material, and transform.

Parameters
aModelMatrixModel-to-world transform matrix.
aMeshMesh geometry to render.
aPipelineShader pipeline to use.
aMaterialOptional material, may be nullptr.
aSkeletonOptional skeleton buffer accessor for skinning.
aTopologyPrimitive topology.
aVertexStartFirst vertex index.
aVertexCountNumber of vertices to draw.
aInstanceCountNumber of instances.
aFirstInstanceFirst instance index.

Definition at line 828 of file VulkanWindow.cpp.

◆ ResizeViewport()

void AeonGames::VulkanWindow::ResizeViewport ( int32_t aX,
int32_t aY,
uint32_t aWidth,
uint32_t aHeight )

Resize the rendering viewport.

Definition at line 621 of file VulkanWindow.cpp.

◆ SetProjectionMatrix()

void AeonGames::VulkanWindow::SetProjectionMatrix ( const Matrix4x4 & aMatrix)

Set the projection matrix for this window.

Definition at line 662 of file VulkanWindow.cpp.

◆ SetViewMatrix()

void AeonGames::VulkanWindow::SetViewMatrix ( const Matrix4x4 & aMatrix)

Set the view matrix for this window.

Definition at line 669 of file VulkanWindow.cpp.


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