If you render the Open GL graphics in the main thread (where user-
input is received and handled), how are you going to program animated
graphics when the user does not interact with the screen/keyboard at
all? by issuing a log of handler.post(Runnable) commands ?

Also, your sample code is simple and it's therefore rendered pretty
fast. If you start adding many more vertices, adding textures,
lighting models, etc, the rendering will slow down.

In short, i strongly suggest seperating the user-input(=main) thread
and the Open GL drawing code into a seperate thread. It'll keep your
app performance predictable and, in the end, better maintainable.


On Feb 25, 11:33 pm, quakeboy <prasna...@gmail.com> wrote:
> Yes I forgot to mention that, I took pains to change code to follow
> the same model as in
> OpenGL samples and found no improvement too !
>
> My guess is that
>
> Its either OpenGL commands memory bandwidth is very less... as I use
> DrawElements only and only person I have heard to get tremendous fps
> was using VBOs. But I cannot use VBO due to the nature of the game
> elements and the changing vertices.
>
> Or I am doing something wrong with OpenGL initialization code and
> pixel format etc ??
>
> On Feb 26, 2:15 am, Jon Colverson <jjc1...@gmail.com> wrote:
>
>
>
> > On Feb 25, 11:39 am, quakeboy <prasna...@gmail.com> wrote:
>
> > > More info:-
> > > I tested by rendering on the touch event only.. frame rate drops only
> > > when u touch and drag
> > > and here I have just tested by tapping and releasing gently on the
> > > emulator and on the device
>
> > As I said before, this is a very unusual way of doing things. Have you
> > tried drawing continuously in a separate thread as in the API demos?
>
> > --
> > Jon- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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