Skip to content

Instantly share code, notes, and snippets.

@flagoworld
Created December 8, 2012 20:33
Show Gist options
  • Save flagoworld/4241795 to your computer and use it in GitHub Desktop.
Save flagoworld/4241795 to your computer and use it in GitHub Desktop.
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D,texture);
glUniform1i(uni.texture,0);
glUniform1f(uni.seed,1.0/glfwGetTime());
glBindBuffer(GL_ARRAY_BUFFER,vbo);
glNormalPointer(GL_FLOAT,sizeof(OOKVertex),(void *)offsetof(OOKVertex,nor));
glVertexPointer(3,GL_FLOAT,sizeof(OOKVertex),(void *)offsetof(OOKVertex,pos));
glTexCoordPointer(2,GL_FLOAT,sizeof(OOKVertex),(void *)offsetof(OOKVertex,tex));
glDrawArrays(GL_TRIANGLES,0,vbo_count);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment