Wisdom8888 / beginning-android-games

Automatically exported from code.google.com/p/beginning-android-games
0 stars 0 forks source link

Object Loader problem #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Copy the code for ObjLoader Class
2. Change the LightTest class to use the ObjLoader
3. Use the invader.obj file 

What is the expected output? What do you see instead?

I have a lot triangles missing maybe about half

What version of the product are you using? On what operating system?

MacOs X 10.6.8

Please provide any additional information below.

Original issue reported on code.google.com by david.D...@googlemail.com on 2 Jan 2012 at 1:49

GoogleCodeExporter commented 8 years ago
I've found the Issue, it was hard coding of the draw method when displaying the 
model, in the present method of GLScreen object i.e.

model.draw(GL10.GL_TRIANGLES,0,6*2*3);   //model being a Vertices3 object

so i changed the the code to below plus adding code so Vertices3 stores the 
number of vertices it's using

model.draw(GL10.GL_TRIANGLES,0,model.numVertices);

Original comment by david.D...@googlemail.com on 4 Jan 2012 at 12:17