I still think that is the problem. I have published on the BB PlayBook
and looking at my code it's single threaded. My iOS code is also
single threaded. From what I have seen only Android requires the
multithreaded rendering. Because the swap blocks you're also likely
getting nailed by vsync even if you're not drawing.
BTW I downloaded that game engine and from what I can see opengl is
being initialized on the main thread so it must be single threaded.
It's sad that Android has this limitation. I would think that the
driver should be able to handle sending a 'push buffer' to the GPU
better than the app using threads. Maybe since iOS and PlayBook both
do the hardware and software, they are able to remove this limitation.
On Tuesday, August 14, 2012 1:55:13 AM, mortoray wrote:
> I'm not doing any rendering beyond just calling "glClear" and I get
> the slowdown.
>
> On Tuesday, August 14, 2012 2:25:46 AM UTC+2, Leigh McRae wrote:
>
> Make sure you have one thread for your simulation and one for
> rendering. Some platforms, such as Android, has eglSwapBuffers as a
> blocking call.
>
> On 8/13/2012 4:37 PM, mortoray wrote:
> > I'm having an issue with a low framerate on my Android Tablet
> (Lenovo
> > IdeaPad). The frame rate is extremely variable, from 20-55 even
> if all
> > I do is call the glClear command.
> >
> > This is done within a framework <
gameplay3d.org
> <
http://gameplay3d.org>> but I believe I've
> > narrowed it down to the call to eglSwapBuffers. Everything else
> takes
> > < 1ms to execute, so the variable is eglSwapBuffers. The time
> doesn't
> > seem to depend at all on what I draw -- and the horrible time
> persists
> > when calling just glClear. If I don't call clear, that is, make
> no gl
> > calls, the swapping is fast.
> >
> > I've tried altering the contexts and attributes of the
> configuration
> > but cannot get rid of this delay. I'm at a loss as to what I can
> > check, or how I can further debug this issue.
> >
> > On the same tablet the Java interface produces smooth 60FPS
> > animations, even with lots of objects. So I know it isn't
> > fundamentally a hardware issue. I'm detecting FPS by using the NDK
> > logging facility and measuring elapsed time using clock_gettime.
> > --
> > You received this message because you are subscribed to the Google
> > Groups "android-ndk" group.
> > To view this discussion on the web visit
> >
https://groups.google.com/d/msg/android-ndk/-/MezXcl7nN2gJ
> <
https://groups.google.com/d/msg/android-ndk/-/MezXcl7nN2gJ>.
> <javascript:>.
> > To unsubscribe from this group, send email to
> >
android-ndk...@googlegroups.com <javascript:>.
> <
http://groups.google.com/group/android-ndk?hl=en>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "android-ndk" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/android-ndk/-/jQlrG0sJSoUJ.