Search found 3 matches

by Megel
Tue Nov 03, 2009 3:12 pm
Forum: Advanced Help
Topic: Vertex Declaration for Irrlicht
Replies: 5
Views: 1639

i tryed to use this declaration in my engine and is works fine.
i can insert this declaration in engine if someone will be interested.
but in will take a lot of time
by Megel
Tue Nov 03, 2009 3:06 pm
Forum: Advanced Help
Topic: Vertex Declaration for Irrlicht
Replies: 5
Views: 1639

template<typename T>
T* GetVertexChannel(VertexType type)
{
for(int i = 0; i < Channles.size(); i++)
if(Channels[i]->Type == type)
return (T*)Channles[i]->VertexPointer;

VertexChannel* channel = VertexChannel();
channel->Type = type;
channel->Stride = sizeof(VertexType);
channel ...
by Megel
Tue Nov 03, 2009 12:29 pm
Forum: Advanced Help
Topic: Vertex Declaration for Irrlicht
Replies: 5
Views: 1639

Vertex Declaration for Irrlicht

this if my method how to add vertex declaration to Irrlicht

IMeshBuffer:

enum VertexType
{
Position, Normal, TexCoord ....
}

struct VertexChannel
{
int Stride;
char* VertexPointer;
VertexType Type;
}

class IVertexDeclaration
{
public:
virtual int getStride();
virtual int ElementOffset ...