Add GEVulkanDynamicSPMBuffer
This commit is contained in:
parent
fd579111e1
commit
d5fdcb2d98
@ -81,6 +81,7 @@ set(GE_SOURCES
|
||||
src/ge_vulkan_driver.cpp
|
||||
src/ge_vulkan_draw_call.cpp
|
||||
src/ge_vulkan_dynamic_buffer.cpp
|
||||
src/ge_vulkan_dynamic_spm_buffer.cpp
|
||||
src/ge_vulkan_fbo_texture.cpp
|
||||
src/ge_vulkan_features.cpp
|
||||
src/ge_vulkan_mesh_cache.cpp
|
||||
|
25
lib/graphics_engine/include/ge_vulkan_dynamic_spm_buffer.hpp
Normal file
25
lib/graphics_engine/include/ge_vulkan_dynamic_spm_buffer.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef HEADER_GE_VULKAN_DYNAMIC_SPM_BUFFER_HPP
|
||||
#define HEADER_GE_VULKAN_DYNAMIC_SPM_BUFFER_HPP
|
||||
|
||||
#include "ge_spm_buffer.hpp"
|
||||
|
||||
namespace GE
|
||||
{
|
||||
class GEVulkanDynamicBuffer;
|
||||
|
||||
class GEVulkanDynamicSPMBuffer : public GESPMBuffer
|
||||
{
|
||||
private:
|
||||
GEVulkanDynamicBuffer* m_vertex_buffer;
|
||||
|
||||
GEVulkanDynamicBuffer* m_index_buffer;
|
||||
public:
|
||||
// ------------------------------------------------------------------------
|
||||
GEVulkanDynamicSPMBuffer();
|
||||
// ------------------------------------------------------------------------
|
||||
~GEVulkanDynamicSPMBuffer();
|
||||
};
|
||||
|
||||
} // end namespace GE
|
||||
|
||||
#endif
|
27
lib/graphics_engine/src/ge_vulkan_dynamic_spm_buffer.cpp
Normal file
27
lib/graphics_engine/src/ge_vulkan_dynamic_spm_buffer.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "ge_vulkan_dynamic_spm_buffer.hpp"
|
||||
|
||||
#include "ge_vulkan_driver.hpp"
|
||||
#include "ge_vulkan_dynamic_buffer.hpp"
|
||||
|
||||
namespace GE
|
||||
{
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
GEVulkanDynamicSPMBuffer::GEVulkanDynamicSPMBuffer()
|
||||
{
|
||||
m_vertex_buffer = new GEVulkanDynamicBuffer(
|
||||
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, 100,
|
||||
GEVulkanDriver::getMaxFrameInFlight() + 1, 0);
|
||||
m_index_buffer = new GEVulkanDynamicBuffer(
|
||||
VK_BUFFER_USAGE_INDEX_BUFFER_BIT, 100,
|
||||
GEVulkanDriver::getMaxFrameInFlight() + 1, 0);
|
||||
} // GEVulkanDynamicSPMBuffer
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
GEVulkanDynamicSPMBuffer::~GEVulkanDynamicSPMBuffer()
|
||||
{
|
||||
delete m_vertex_buffer;
|
||||
delete m_index_buffer;
|
||||
} // ~GEVulkanDynamicSPMBuffer
|
||||
|
||||
} // end namespace GE
|
Loading…
Reference in New Issue
Block a user