Hello everyone. Running into REALLY interesting problems with OpenGL
ES. Basically when I start my program in 1.5 or 1.6 emulator, it works
just fine but on HTC Hero 1.5 it does not. The problem is that the
vertices are not being rendered but the gl.glClear() command is
working just fine. I followed in with the debugger and it does go into
the rendering function and such but still not rendering the
vertices...

Here is the code in PasteBin (easier to read: http://pastebin.com/m706686e6
)

And here is the same thing pasted here:
// VERTICE INIT
int one = 65536;
int half = one / 2;
int vertices[] = {
-half, -half, half, half, -half, half,
-half, half, half, half, half, half }

ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);
vbb.order(ByteOrder.nativeOrder());
mVertexBuffer = vbb.asIntBuffer();
mVertexBuffer.put(vertices);
mVertexBuffer.position(0);

// AND IN RENDER
gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer);
gl.glColor4f(1, 0, 0, 1);
gl.glScalef(50, 50, 1);
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);


Also I got my projection set in 2D ortho projection to match screen
coordinates so that's why scale to 50,50 to actually make a bit
bigger. I've tried using glDrawElements and glDrawArrays and nothing
on the actual phone but works perfectly fine on the actual emulator.
Any ideas where I might be going wrong? Why is the actual phone not
rendering the vertices like the emulator is? Am I missing something
completely here?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to