VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
venom::common::ShaderPipelineImpl Class Referenceabstract
+ Inheritance diagram for venom::common::ShaderPipelineImpl:

Classes

struct  VertexBufferLayout
 

Public Member Functions

vc::Error LoadShaderFromFile (const vc::String &path)
 Load a shader from a base path (e.g. ./shader_mesh to load ./shader_mesh.vert and ./shader_mesh.frag) Loading is not done when this function is called, only paths are set.
 
void AddVertexBufferToLayout (const ShaderVertexFormat format, const uint32_t binding, const uint32_t location, const uint32_t offset)
 Add a vertex buffer to the layout.
 
void AddVertexBufferToLayout (const VertexBufferLayout &layout)
 Add a vertex buffer to the layout.
 
void AddVertexBufferToLayout (const vc::Vector< VertexBufferLayout > &layouts)
 Add a vertex buffer to the layout.
 
void SetCustomMultiSamplingCount (const int samples)
 To separate from Swap Chain multisampling.
 
void SetMultiSamplingCount (const int samples)
 
vc::Error SetLineWidth (const float width)
 
vc::Error SetDepthTest (const bool enable)
 
vc::Error SetDepthWrite (const bool enable)
 
vc::Error OpenAndReloadShader ()
 
void SetRenderingPipelineType (const RenderingPipelineType type)
 
void SetRenderingPipelineShaderType (const RenderingPipelineShaderType type)
 
void SetRenderingPipelineIndex (const uint32_t index)
 
RenderingPipelineType GetRenderingPipelineType () const
 
RenderingPipelineShaderType GetRenderingPipelineShaderType () const
 
- Public Member Functions inherited from venom::common::PluginObjectImpl
template<class T>
T * As ()
 
template<class T>
const T * As () const
 
template<class T>
T * ConstAs () const
 
template<class T>
T * RAs ()
 
template<class T>
const T * RAs () const
 
void IncRefCount ()
 
void DecRefCount ()
 
- Public Member Functions inherited from venom::common::GraphicsPluginObject
virtual void Destroy () override
 /!\ THIS FUNCTION MUST BE CALLED FOR DESTRUCTION, DO NOT USE delete
 
- Public Member Functions inherited from venom::common::PluginObject
 PluginObject (const PluginType type)
 
PluginType GetType () const override
 
template<class T>
T * DAs ()
 
template<class T>
const T * DAs () const
 
- Public Member Functions inherited from venom::common::GraphicsCachedResourceHolder
template<typename T>
T * As ()
 
void SetResource (const GraphicsCachedResourceHolder &resource)
 
void SetResource (const SPtr< GraphicsCachedResource > &resource)
 
const vc::String & GetResourceName () const
 
const vc::String & GetResourceShortName () const
 

Protected Member Functions

virtual void _SetMultiSamplingCount (const int samples)=0
 
virtual void _SetLineWidth (const float width)=0
 
virtual void _SetDepthTest (const bool enable)=0
 
virtual void _SetDepthWrite (const bool enable)=0
 
virtual vc::Error _LoadShader (const vc::String &path)=0
 
virtual void _AddVertexBufferToLayout (const uint32_t vertexSize, const uint32_t binding, const uint32_t location, const uint32_t offset, const ShaderVertexFormat format)=0
 
virtual vc::Error _OpenShaders ()=0
 
virtual vc::Error _ReloadShader ()=0
 
vc::Error _ReloadShaderAfterSettings ()
 
- Protected Member Functions inherited from venom::common::GraphicsCachedResourceHolder
const SPtr< GraphicsCachedResource > & _GetResourceToCache () const
 
SPtr< GraphicsCachedResource > & _GetResourceToCache ()
 
void _LoadFromCache (const SPtr< GraphicsCachedResource > &cache)
 
virtual void _ResetResource ()=0
 Resets the resource, should be implemented by the final class, i.e. VulkanTextureResource.
 

Protected Attributes

RenderingPipelineType _renderingPipelineType
 
RenderingPipelineShaderType _renderingPipelineShaderType
 
uint32_t _renderingPipelineIndex
 
bool _loaded
 
- Protected Attributes inherited from venom::common::GraphicsCachedResourceHolder
SPtr< GraphicsCachedResource_resource
 

Additional Inherited Members

- Static Public Member Functions inherited from venom::common::GraphicsPluginObject
static bool HasCachedObject (const vc::String &path)
 Checks if an object is in the cache.
 
static SPtr< GraphicsCachedResourceGetCachedObject (const vc::String &path)
 Gets a cached object from the graphics cache.
 
static const vc::UMap< vc::String, vc::SPtr< GraphicsCachedResource > > & GetCachedObjects ()
 Gets all cached objects.
 
- Static Protected Member Functions inherited from venom::common::GraphicsPluginObject
static void _SetInCache (const vc::String &path, const SPtr< GraphicsCachedResource > &object)
 Sets an object in the cache.
 
static void _SetCacheSize (size_t size)
 Adds cache size to avoid unnecessary additional allocations.
 
static void _AddCacheSize (size_t size)
 Adds cache size to avoid unnecessary additional allocations.
 

Member Function Documentation

◆ AddVertexBufferToLayout() [1/3]

void venom::common::ShaderPipelineImpl::AddVertexBufferToLayout ( const ShaderVertexFormat format,
const uint32_t binding,
const uint32_t location,
const uint32_t offset )

Add a vertex buffer to the layout.

Parameters
formatFormat of the vertex buffer
bindingBinding of the vertex buffer (location where data comes from in the buffer)
locationLocation of the vertex buffer (location where data goes to in the shader)
offsetOffset of the vertex buffer

◆ AddVertexBufferToLayout() [2/3]

void venom::common::ShaderPipelineImpl::AddVertexBufferToLayout ( const vc::Vector< VertexBufferLayout > & layouts)

Add a vertex buffer to the layout.

Parameters
layoutsLayouts of the vertex buffer

◆ AddVertexBufferToLayout() [3/3]

void venom::common::ShaderPipelineImpl::AddVertexBufferToLayout ( const VertexBufferLayout & layout)

Add a vertex buffer to the layout.

Parameters
layoutLayout of the vertex buffer

◆ LoadShaderFromFile()

vc::Error venom::common::ShaderPipelineImpl::LoadShaderFromFile ( const vc::String & path)

Load a shader from a base path (e.g. ./shader_mesh to load ./shader_mesh.vert and ./shader_mesh.frag) Loading is not done when this function is called, only paths are set.

Parameters
path
Returns
error

◆ SetCustomMultiSamplingCount()

void venom::common::ShaderPipelineImpl::SetCustomMultiSamplingCount ( const int samples)

To separate from Swap Chain multisampling.

Parameters
samples

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