pvella / beginning-android-games

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

GlBasics Example : BobScreen Example #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run BobScreen example

What is the expected output? What do you see instead?
Expected out is 100 bob moving all around the Screen and bouncing off the 
edges. However i am seeing 

02-05 23:14:01.862: E/AndroidRuntime(16593): FATAL EXCEPTION: GLThread 10
02-05 23:14:01.862: E/AndroidRuntime(16593): 
java.lang.IllegalArgumentException: Must use a native order direct Buffer
02-05 23:14:01.862: E/AndroidRuntime(16593):    at 
com.google.android.gles_jni.GLImpl.glVertexPointerBounds(Native Method)
02-05 23:14:01.862: E/AndroidRuntime(16593):    at 
com.google.android.gles_jni.GLImpl.glVertexPointer(GLImpl.java:1121)
02-05 23:14:01.862: E/AndroidRuntime(16593):    at 
game.util.Vertices.drawPrimitives(Vertices.java:74)

Code Line: gl10.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices);

where VertexSize is Size of one vertex
      vertices is FloatBuffer

I tried to debug & search several times but was not able to get any solution. 
Anybody please help me out?

Regards,
Gautam Verma

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

Please provide any additional information below.

Original issue reported on code.google.com by gau...@bitmagic.in on 5 Feb 2012 at 5:52

GoogleCodeExporter commented 8 years ago
I am using HTC Explorer(Android 2.3) and Windows 7. 

Original comment by gau...@bitmagic.in on 5 Feb 2012 at 5:58