[android-developers] Nexus 1 opengl driver problem

2010-02-14 Thread Carlo
Hi,

We are facing 2 issues on the nexus 1 using opengl  ( under NDK ) :

1)  glNormalPointer(GL_BYTE, x ,  y);   does no work, there no lighting
done on any model using normals stored using byte, the same code is
working properly on a motorola droid/milestone.

2)   Changine Lighting states are very slow and freeze the display
frame for 1 sec on the Nexus 1, we are using dynamic light ON/OFF  and
i am under the impression that is because of the emulation of the
opengl 1.x pipeline under a 2.0 pipeline -> some hidden upload of
shaders of some sort in the drivers, but this is to a point that there
is no way to use realtime lighting on our game for the nexus 1 so
somebody has to look into this issue.

If somebody has some advise to share, workaround, how to  fix those 2
issues , I'll be very happy to hear from you.

thank you,

Carlo

-- 
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


Re: [android-developers] Nexus 1 opengl driver problem

2010-02-14 Thread Ralf Schneider
Hello Carlo,

Im using the NDK, but I don't think this makes a difference

1)  glNormalPointer(GL_BYTE, x ,  y);   does no work, there no
> lighting
> done on any model using normals stored using byte, the same code is
> working properly on a motorola droid/milestone.
>
>
GL_FLOAT seems to work.


> 2)   Changine Lighting states are very slow and freeze the display
> frame for 1 sec on the Nexus 1, we are using dynamic light ON/OFF  and
> i am under the impression that is because of the emulation of the
> opengl 1.x pipeline under a 2.0 pipeline -> some hidden upload of
> shaders of some sort in the drivers, but this is to a point that there
> is no way to use realtime lighting on our game for the nexus 1 so
> somebody has to look into this issue.
>
>
I do not experience this kind of slow down on the Nexus One.
Enabling/Disabling GL_LIGHTNING while rendering a frame works fine for me.

May be the problem is specific to some settings? So for the record I'm using
this:

Display:setEGLConfigChooser(5, 6, 5, 8, 16, 0)
Datatypes: GL_FLOAT for everything
TextureMaps: 8-8-8-(8)
Vertex Colors: None
VBOs: None
Lights: 1
Fog: Linear
Average Scene: After basic frustum culling 1 Triangles per frame are
sent to OpenGL
Other: glShadeModel(GL_SMOOTH);
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glFogf(GL_FOG_MODE, GL_LINEAR );
glHint(GL_FOG_HINT, GL_NICEST);

... I know these settings cry for optimizations, but currently I'm mainly
experimenting with some basic stuff.
I'm still amazed by the performance. It seems you can easily push 30
lighted tris/sec. After some optimizations probably even more.

Regards,
Ralf

-- 
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