ULRE/inc/hgl/graph/Renderable.h

41 lines
1.1 KiB
C
Raw Normal View History

#ifndef HGL_GRAPH_RENDERABLE_INCLUDE
#define HGL_GRAPH_RENDERABLE_INCLUDE
#include<hgl/graph/VertexArray.h>
#include<hgl/graph/Shader.h>
2018-12-05 21:08:18 +08:00
namespace hgl
{
namespace graph
{
/**
*
*/
class Renderable
{
protected:
uint primitive; ///<绘制的图元类型
VertexArray *vao;
// Material *mtl;
public:
Renderable(uint prim,VertexArray *va=nullptr)
{
primitive=prim;
vao=va;
}
const uint GetPrimitive()const { return primitive; } ///<取得要绘制的图元类型
public:
uint GetDrawCount(); ///<取得可绘制的数据总数量
bool Draw(); ///<绘制
};//class Renderable
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_RENDERABLE_INCLUDE