Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualPpenGlProg

Posted 17 July 2013 - 10:06 AM

snimok33pn_1299167_8486224.png
 

 

void Obj_render::DrawObject()
{
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);

glVertexPointer( 3, GL_FLOAT, sizeof( Vertex ), &verts.data()->pos );
glNormalPointer(GL_FLOAT,sizeof( Vertex ),&verts.data()->norm);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), &verts.data()->tex);

glDrawArrays( GL_TRIANGLES, 12,indices.size());
glDisableClientState(GL_VERTEX_ARRAY);

std::cout << glGetError() << std::endl;
}


#1PpenGlProg

Posted 17 July 2013 - 10:05 AM

snimok33pn_1299167_8486224.png
 


PARTNERS