The Joe Engine
Joe's engine programming playground
JoeEngine::JEForwardShader Class Reference

The JEForwardShader class. More...

#include <VulkanShader.h>

Inheritance diagram for JoeEngine::JEForwardShader:
JoeEngine::JEVulkanShader JoeEngine::JEShader

Public Member Functions

 JEForwardShader ()=delete
 Default constructor (delete). More...
 
 JEForwardShader (const MaterialComponent &materialComponent, uint32_t numSourceTextures, uint32_t numUniformBuffers, VkDevice device, VkPhysicalDevice physicalDevice, const JEVulkanSwapChain &swapChain, VkRenderPass renderPass, const std::string &vertPath, const std::string &fragPath)
 Constructor. More...
 
void BindPushConstants_ViewProj (VkCommandBuffer commandBuffer, const glm::mat4 &viewProj) const
 Bind the view-projection matrix push constant. More...
 
void BindPushConstants_InstancedData (VkCommandBuffer commandBuffer, const std::array< uint32_t, 4 > &instancedData) const
 Bind the instanced data push constant. More...
 
- Public Member Functions inherited from JoeEngine::JEVulkanShader
 JEVulkanShader ()=delete
 Default constructor (deleted). More...
 
 JEVulkanShader (VkDevice device, const std::string &vertPath, const std::string &fragPath)
 Constructor. More...
 
virtual ~JEVulkanShader ()=default
 Destructor (default) (deleted). More...
 
void Cleanup () override
 Vulkan API-specific cleanup function. More...
 
virtual void UpdateUniformBuffers (VkDevice device, uint32_t currentImage) override
 Default shader data buffer update function. More...
 
VkPipeline GetPipeline () const
 
VkPipelineLayout GetPipelineLayout () const
 
VkDescriptorSetLayout GetDescriptorSetLayout (uint32_t index) const
 Get descriptor set layout object. More...
 
- Public Member Functions inherited from JoeEngine::JEShader
 JEShader ()=delete
 Delete constructor (deleted). More...
 
 JEShader (const std::string &vertPath, const std::string &fragPath)
 Constructor. More...
 
virtual ~JEShader ()=default
 Destructor (default) (virtual). More...
 

Additional Inherited Members

- Protected Member Functions inherited from JoeEngine::JEVulkanShader
virtual void CreateDescriptorSetLayouts (VkDevice device, uint32_t numSourceTextures, uint32_t numUniformBuffers, uint32_t numStorageBuffers)
 Base class version of descriptor set layout creation. More...
 
- Protected Attributes inherited from JoeEngine::JEVulkanShader
VkPipeline m_graphicsPipeline = VK_NULL_HANDLE
 Graphics pipeline object. More...
 
VkPipelineLayout m_pipelineLayout = VK_NULL_HANDLE
 Pipeline layout object. More...
 
std::vector< VkDescriptorSetLayout > m_descriptorSetLayouts
 List of descriptor set layouts (number of elements dependent on the purpose of the derived shader). More...
 
const VkDevice m_device
 Reference to the Vulkan logical device. More...
 
- Protected Attributes inherited from JoeEngine::JEShader
const std::string m_vertPath
 Path to vertex shader source file. More...
 
const std::string m_fragPath
 Path to fragment shader source file. More...
 

Detailed Description

The JEForwardShader class.

Shader for typical forward shading. Currently used for rendering of translucent objects.

See also
JEShader, JEVulkanShader

Constructor & Destructor Documentation

◆ JEForwardShader() [1/2]

JoeEngine::JEForwardShader::JEForwardShader ( )
delete

Default constructor (delete).

◆ JEForwardShader() [2/2]

JoeEngine::JEForwardShader::JEForwardShader ( const MaterialComponent materialComponent,
uint32_t  numSourceTextures,
uint32_t  numUniformBuffers,
VkDevice  device,
VkPhysicalDevice  physicalDevice,
const JEVulkanSwapChain swapChain,
VkRenderPass  renderPass,
const std::string &  vertPath,
const std::string &  fragPath 
)
inline

Constructor.

Member Function Documentation

◆ BindPushConstants_InstancedData()

void JoeEngine::JEForwardShader::BindPushConstants_InstancedData ( VkCommandBuffer  commandBuffer,
const std::array< uint32_t, 4 > &  instancedData 
) const

Bind the instanced data push constant.

Parameters
commandBufferthe command buffer to record the bind command to.
instancedDataper-geometry-instance data to provide to the shader.

◆ BindPushConstants_ViewProj()

void JoeEngine::JEForwardShader::BindPushConstants_ViewProj ( VkCommandBuffer  commandBuffer,
const glm::mat4 &  viewProj 
) const

Bind the view-projection matrix push constant.

Parameters
commandBufferthe command buffer to record the bind command to.
viewProjthe view projection matrix to provide to the shader.

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