[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendering triangle meshes with OpenGL



Jorrit Tyberghein wrote:
> 
> Miguel A. Osorio wrote:
> 
> >       Thing is, I'd like to know if this way of doing it is ok in terms of
> >performance, if this could be the cause of my slowdown. I know there are
> >more efficient ways of doing this, like for instance, pre-processing the
> >geometric data and converting everything to triangle strips, but is the
> >presented way a bit too slow?
> >
> I think you should have a look at glDrawElements() instead. This is a
> lot faster
> compared to using display lists.
> 

	Ok, I took a look at the glDrawElements() and the whole system behind
it (setting up the arrays with glVertexPointer and the like, etc.) Thing
is, if I got it right, glDrawElements uses an array of indeces to the
other arrays (vertex, normal, texture coords) to draw primitives. But
one thing with the ASE files is that there are more texture coordinates
than vertices - in fact, I believe there are as many texture coords as
faces, and not as vertices. So how can I use the texture coordinates
array if it's bigger than the vertex and the normal array?




Thanks for your attention,
Miguel A. Osorio.