Add LineRenderer
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "copium/renderer/RendererVertex.h"
|
||||
#include "copium/mesh/VertexPassthrough.h"
|
||||
#include "copium/mesh/Vertex.h"
|
||||
#include "copium/renderer/LineVertex.h"
|
||||
#include "copium/util/FileSystem.h"
|
||||
|
||||
namespace Copium
|
||||
@@ -44,6 +45,11 @@ namespace Copium
|
||||
creator.SetVertexDescriptor(Vertex::GetDescriptor());
|
||||
creator.SetBlending(metaFileClass.GetValue("alpha-blending", "false") == "true" ? true : false);
|
||||
}
|
||||
else if (type == "LineRenderer")
|
||||
{
|
||||
creator.SetVertexDescriptor(LineVertex::GetDescriptor());
|
||||
creator.SetPrimitiveTopology(VK_PRIMITIVE_TOPOLOGY_LINE_LIST);
|
||||
}
|
||||
InitializeDescriptorSetLayout(creator);
|
||||
InitializePipeline(creator);
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ namespace Copium
|
||||
|
||||
ShaderReflector shaderReflector;
|
||||
VertexDescriptor vertexDescriptor{};
|
||||
VkPrimitiveTopology topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
VkCullModeFlags cullMode = VK_CULL_MODE_FRONT_BIT;
|
||||
VkFrontFace frontFace = VK_FRONT_FACE_CLOCKWISE;
|
||||
VkRenderPass renderPass = VK_NULL_HANDLE;
|
||||
bool depthTest = true;
|
||||
bool blending = false;
|
||||
VkPrimitiveTopology topology{VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST};
|
||||
VkCullModeFlags cullMode{VK_CULL_MODE_FRONT_BIT};
|
||||
VkFrontFace frontFace{VK_FRONT_FACE_CLOCKWISE};
|
||||
VkRenderPass renderPass{VK_NULL_HANDLE};
|
||||
bool depthTest{true};
|
||||
bool blending{false};
|
||||
|
||||
public:
|
||||
PipelineCreator(VkRenderPass renderPass, const std::string& vertexShader, const std::string& fragmentShader);
|
||||
|
||||
Reference in New Issue
Block a user