Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actuallarspensjo

Posted 26 June 2012 - 06:53 AM

A check: You are doing the linking (glLinkProgram) of the shader program after the call of glBindAttribLocation(), don't you?


I usually do the glVertexAttribPointer offset as follows:

struct Vertex *p = 0;
glVertexAttribPointer ( VERTEX_POS_INDX, VERTEX_POS_SIZE, GL_FLOAT, GL_FALSE, sizeof(Vertex), &p->pos);
glVertexAttribPointer ( VERTEX_NORMAL_INDX, VERTEX_NORMAL_SIZE, GL_FLOAT, GL_FALSE, sizeof(Vertex), &p->normal );
glVertexAttribPointer ( VERTEX_TEXCOORD_INDX, VERTEX_TEXCOORD_INDX, GL_FLOAT, GL_FALSE, sizeof(Vertex), &p->u );

#1larspensjo

Posted 26 June 2012 - 06:41 AM

A check: You are doing the linking (glLinkProgram) of the shader program after the call of glBindAttribLocation(), don't you?

PARTNERS