Sign in to follow this  
WiredCat

One way list into glVertexPointer

Recommended Posts

WiredCat    1452
struct VertexDynArrayElement {
public:
t3dpoint p;
t3dpoint c;
float 	 a;
textpoint uv;

double VERTEX_R;
double VERTEX_G;
double VERTEX_B;



int VERTEX_Cr;
int VERTEX_Cg;
int VERTEX_Cb;

VertexDynArrayElement * next;
VertexDynArrayElement * prev;
bool blank;
VertexDynArrayElement() {
 prev = NULL;
 next = NULL;
 blank = true;
					 	}
};

 

i want to put this into glvertexpointer or is it any other way to speed up rendering instead of using glbegin glend.

Cheers :}

Share this post


Link to post
Share on other sites
WiredCat    1452

well i do not understand how &data->p will tell glVertexPointer that next array element is in the 'next' variable

 

can you tell me more thing about how to use glVertexAttribPointer in this case? thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this