Wednesday, July 3, 2013

Something shaped like a Tank


I played around with LearningWebGL's Lesson 4, and got gl.drawElements working. I now get that it's using the same indices to look up the vertex positions as well as the color positions, which is why the vertices were duplicated. I still think there's a way to be smarter about this, but I'm going to have to dig further back into my OpenGL attic to dredge it out.

the grey quadrilateral on the ground is a shadow, but it's not because I've done anything fancy with the lighting - I just made a polygon that lies on the ground to give the vehicle more solidity.

So, next up:

  • smarter handling of colors - right now, if I want a vertex to be colored differently on different faces, that means duplicating the position data. Maybe that's unavoidable, but it seems like we're storing and transforming positions more than we need.
  • more model tweaking - that tank needs a gun barrel
  • movement - the tank should be able to drive around
  • player input - the player should be able to drive around

No comments:

Post a Comment