added MVPMatrix attrib and GetUBOBytes function at RenderNode.
This commit is contained in:
parent
e83fc97bb4
commit
6623f16f0b
@ -1,8 +1,9 @@
|
|||||||
#ifndef HGL_GRAPH_RENDER_NODE_INCLUDE
|
#ifndef HGL_GRAPH_RENDER_NODE_INCLUDE
|
||||||
#define HGL_GRAPH_RENDER_NODE_INCLUDE
|
#define HGL_GRAPH_RENDER_NODE_INCLUDE
|
||||||
|
|
||||||
#include<hgl/math/Vector.h>
|
#include<hgl/math/Vector.h>
|
||||||
#include<hgl/type/List.h>
|
#include<hgl/type/List.h>
|
||||||
|
#include<hgl/graph/SceneInfo.h>
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
namespace graph
|
namespace graph
|
||||||
@ -11,12 +12,21 @@ namespace hgl
|
|||||||
|
|
||||||
struct RenderNode
|
struct RenderNode
|
||||||
{
|
{
|
||||||
|
MVPMatrix matrix;
|
||||||
|
|
||||||
Vector4f WorldCenter;
|
Vector4f WorldCenter;
|
||||||
|
|
||||||
float distance_to_camera_square;
|
float distance_to_camera_square;
|
||||||
// float distance_to_camera;
|
// float distance_to_camera;
|
||||||
|
|
||||||
RenderableInstance *ri;
|
RenderableInstance *ri;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取得渲染对象ubo独占区大小
|
||||||
|
*/
|
||||||
|
virtual const uint32 GetUBOBytes()const{return sizeof(MVPMatrix);}
|
||||||
};//struct RenderNode
|
};//struct RenderNode
|
||||||
|
|
||||||
using RenderNodeList=List<RenderNode *>;
|
using RenderNodeList=List<RenderNode *>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user