*
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#ifndef IShaderGraph_h__
|
||||
#define IShaderGraph_h__
|
||||
|
||||
#include "shaders/IShaderGraphNodeFactory.h"
|
||||
#include "delegate/Delegate.h"
|
||||
#include <vector>
|
||||
#include <IMemoryStream.h>
|
||||
|
||||
namespace LifeGraphics
|
||||
{
|
||||
class IShaderGraph
|
||||
{
|
||||
public:
|
||||
EVENT1(GraphEvent, IShaderGraphNode*);
|
||||
GraphEvent Event_AddNode;
|
||||
|
||||
IShaderGraph(IShaderGraphNodeFactory* factory);
|
||||
~IShaderGraph();
|
||||
IShaderGraphNode* AddNode(const String& name);
|
||||
bool DeleteNode(int id);
|
||||
void Serialize(LifeCore::IMemoryStream* stm);
|
||||
bool Deserialize(LifeCore::IMemoryStream* stm);
|
||||
void SerializeXML(LifeCore::IMemoryStream* stm);
|
||||
bool DeserializeXML(LifeCore::IMemoryStream* stm);
|
||||
IShaderGraphNode* GetNodeByID(int id);
|
||||
IShaderGraphNode* GetNodeByArrayID(int id);
|
||||
size_t GetNodeCount();
|
||||
void Clear();
|
||||
private:
|
||||
int texture_slots[16];
|
||||
int last_id;
|
||||
int GrabTextureSlot();
|
||||
int GetID(){return last_id++;}
|
||||
IShaderGraphNodeFactory* pFactory;
|
||||
typedef std::vector<IShaderGraphNode*> NodeCollection;
|
||||
typedef std::vector<IShaderGraphNode*>::iterator NodeCollectionIt;
|
||||
NodeCollection Nodes;
|
||||
};
|
||||
}
|
||||
#endif // IShaderGraph_h__
|
||||
Reference in New Issue
Block a user