Andrew
Andrew

Reputation: 592

OpenGL ES 2.0 - glDrawElements and different indexing for vertex and other buffers (normals, colors for ex.)

My question is closely related with this one

So this seems like I can't use glDrawElements when I want flat shading for instance(or making one face in the mesh with specific color for ex.), coz I need different normals(colors) for the same vertex (one normal value for each triange(face) in which this vertex participate), right? So glDrawArrays(banch of tris) - the only way for such things, right?

Thx.

Upvotes: 0

Views: 215

Answers (1)

Trax
Trax

Reputation: 1910

You need to repeat the vertices or remove that face from your glDrawArrays and run a second one with only just that face (but with different normals). There is not flat shading in OpenGL ES 2.0

Upvotes: 1

Related Questions