Added few codes of ShaderCreateInfoGeometry
This commit is contained in:
parent
ed9ba3876f
commit
eb51df8dd0
@ -5,9 +5,15 @@
|
||||
namespace hgl{namespace graph{
|
||||
class ShaderCreateInfoGeometry:public ShaderCreateInfo
|
||||
{
|
||||
AnsiString input_prim;
|
||||
AnsiString output_prim;
|
||||
uint32_t max_vertices;
|
||||
|
||||
public:
|
||||
|
||||
ShaderCreateInfoGeometry(MaterialDescriptorInfo *m):ShaderCreateInfo(VK_SHADER_STAGE_GEOMETRY_BIT,m){}
|
||||
~ShaderCreateInfoGeometry()=default;
|
||||
|
||||
bool SetGeom(const Prim &ip,const Prim &op,const uint32_t mv);
|
||||
};
|
||||
}}//namespace hgl::graph
|
@ -0,0 +1,28 @@
|
||||
#include<hgl/shadergen/ShaderCreateInfoGeometry.h>
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
{
|
||||
bool ShaderCreateInfoGeometry::SetGeom(const Prim &ip,const Prim &op,const uint32_t mv)
|
||||
{
|
||||
if(ip==Prim::Points )input_prim="points";else
|
||||
if(ip==Prim::Lines )input_prim="lines";else
|
||||
if(ip==Prim::LinesAdj )input_prim="lines_adjacency";else
|
||||
if(ip==Prim::Triangles )input_prim="triangles";else
|
||||
if(ip==Prim::TrianglesAdj )input_prim="triangles_adjacency";else
|
||||
return(false);
|
||||
|
||||
if(op==Prim::Points )output_prim="points";else
|
||||
if(op==Prim::LineStrip )output_prim="line_strip";else
|
||||
if(op==Prim::TriangleStrip )output_prim="triangle_strip";else
|
||||
return(false);
|
||||
|
||||
if(mv==0)
|
||||
return(false);
|
||||
|
||||
max_vertices=mv;
|
||||
return(true);
|
||||
}
|
||||
}//namespace graph
|
||||
}//namespace hgl
|
Loading…
x
Reference in New Issue
Block a user