Hi,
I try to apply texture mapping for my object, but the object is completely black. I look up some tutorials and the only difference is that I use glDrawArrays instead of glDrawElements. To apply texture mapping, are we supposed to use glDrawElements to draw objects?
Since I use V rather than vertices[] and indices[] to store vertices, I don't know how to use glDrawElements based on my current code.
It is unlickely that the problem is the use of glDrawArrays, texture mapping can be used with both of these OpenGL commands. I recommend to start from a working tutorial, and then change it for your needs.
Hi, I try to apply texture mapping for my object, but the object is completely black. I look up some tutorials and the only difference is that I use glDrawArrays instead of glDrawElements. To apply texture mapping, are we supposed to use glDrawElements to draw objects?
Since I use V rather than vertices[] and indices[] to store vertices, I don't know how to use glDrawElements based on my current code.
Thanks, Peiyue