So far the OpenGL code has been drawing a simple cube and adding a texture which is very easy to do within the code structure by including all the required vertices required within a simple DrawCube() method, whilst this is ok for simple objects its never going to work when we want to start drawing larger objects or even progressing onto using wavefront.obj files to import complex 3d structures.
As a first step before I start with a object Parser capable of importing .obj files here are some simple changes which will allow us to draw an array.
Define the array and populate the verticies.
The render() method needs some simple changes to allow us to draw an array.
That is really all there is to drawing an array. What this does now open up is the ability to create an Array for a much larger object maybe from loading one of those wavefront.obj files.....
No comments:
Post a Comment