Tuesday, August 9, 2011

[android-developers] GLSurfaceView inside gallery

Hi,

Imagine a Gallery containing 2 fullscreen views, so the user can
scroll from a view to the other. The firs view is a common view, the
second view is a subclass of GLSurfaceView with its EGLContextFactory,
where some content is drawed. The drawing works but the problem is
that I NEED (for some reason) to start drawing in the GLSurfaceView
as soon as the Activity is running (even if it is not visible for the
user), but I can't because the EGL context is not created until the
user scrolls to the GL SurfaceView.

To be clearer, 'createContext' in EGLContextFactory is called when the
user scrolls but I want it to be called from the beginin even if the
user does not scroll, to start my OpenGL ES operations when the
Activity starts.

Is there any way to tell the Gallery to 'activate' the second view
from the begining to make createContext be called?

Thanks for your help.
Goyo

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate