My somewhat uneducated guess would be that emulator + some devices do
calculations using GLfixed instead of full GLfloat capacity. AFAIK GLfixed
should be able to handle values up to ~65535 though - but it's possible
that during during applying transformations etc OpenGL requires some of
this precision for internal purposes. Personally I would've expect this
wasn't the case though but can't think of any other reason for limit of
~7000 you're facing.

--
H
On Feb 20, 2012 12:16 PM, "Zveroid" <zver...@gmail.com> wrote:

> Hello!
>
> Sometimes I'm need to draw my objects with pretty hight coordinates
> (more than 200000). But when I trying to render even objects with
> coordinates about 10000, there's nothing on my emulator. But on my
> Samsung Galaxy S2 there's all ok!
> I tried to change coordinates and found highest coodinates - there's
> about 7000. If we use bigger values, we willn't see any objects.
> There's parts of my code:
> Initialization:
>        ByteBuffer vbb = ByteBuffer.allocateDirect(VERTS * 3 * 4);
>        vbb.order(ByteOrder.nativeOrder());
>        mFVertexBuffer = vbb.asFloatBuffer();
>
>        float[] coords = {
>                6985.5f, 6985.5f, 0,
>                6984.5f, 6985.5f, 0,
>                6985.0f, 6984.5f, 0,
>                6985.5f, 6985.5f,0,
>                6984.5f, 6985.5f, 0,
>                6985.0f, 6984.5f, 0
>        }; //there's all ok with such coords. With >7000 triangle doesn't
> rendered.
>
>        for (int i = 0; i < VERTS; i++) {
>                for (int j = 0; j < 3; j++) {
>                        mFVertexBuffer.put(coords[i * 3 + j]);
>                }
>        }
>
>        mFVertexBuffer.rewind();
>
> Render loop:
>        gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
>        gl.glMatrixMode(GL10.GL_MODELVIEW);
>        gl.glLoadIdentity();
>
>        GLU.gluLookAt(gl, 6985, 6985, 4, 6985, 6985, 0, 0f, 1f, 0f);
>
>        gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
>        gl.glColor4f(1.0f, 0.0f, 0.0f, 0.0f);
>
>        gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mFVertexBuffer);        //
> gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, 0);
>        gl.glDrawArrays(GL10.GL_TRIANGLES, 0,
> mFVertexBuffer.capacity() / 3);
>
>        gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
>
>
> Is there emulator bug or there's my mistake somewhere?
> How I can solve this problem? I really need it - lots of chinense
> devices has pretty same bugs as emulator :(
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Reply via email to