GLSurfaceView.Renderer running in a separate thread ?

Started by aeroxr1, August 28, 2014, 01:22:35 PM

Previous topic - Next topic

aeroxr1

Hi :)
I'm new in Jpct-ae and OpenGL's programmation.
I read some ufficial's material on OpenGL, but I have a doubt.
GLSurfaceView.Renderer it's running in separate thread automatically generated ? Therefore the rendering is executed in a different thread of UI Thread ?
I read this : http://developer.android.com/reference/android/opengl/GLSurfaceView.Renderer.html

And I suppose that the answer of my question is "Yes" , but I'm newbie and I prefer to ask to the experts :)

I will have problems to implement my animation in a fragments using GLSurfaceView ?

Thanks to everyone :)

EgonOlsen

Yes, it's another thread. That's why you are not supposed to modify jPCT related instances in the UI thread (like inside of touch listeners for example).

aeroxr1

Thanks ! Perfect :)
Another "little" question :
- GLSurfaceView can it lies in a fragment or for the fragment there are better SurfaceViews ?

EgonOlsen

I don't know, maybe somebody else here does...
I would expect it to work, but i've never tried anything like it. My apps are usually full screen only.

aeroxr1

ah ok thanks :)
I want to move a leg of a rigged model in according from data read from bluetooth sensor .
I'm scared from quaternion  :'(