www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: aeroxr1 on August 28, 2014, 01:22:35 pm

Title: GLSurfaceView.Renderer running in a separate thread ?
Post by: aeroxr1 on August 28, 2014, 01:22:35 pm
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 (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 :)
Title: Re: GLSurfaceView.Renderer running in a separate thread ?
Post by: EgonOlsen on August 28, 2014, 03:16:36 pm
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).
Title: Re: GLSurfaceView.Renderer running in a separate thread ?
Post by: aeroxr1 on August 28, 2014, 03:32:13 pm
Thanks ! Perfect :)
Another "little" question :
- GLSurfaceView can it lies in a fragment or for the fragment there are better SurfaceViews ?
Title: Re: GLSurfaceView.Renderer running in a separate thread ?
Post by: EgonOlsen on August 28, 2014, 04:38:36 pm
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.
Title: Re: GLSurfaceView.Renderer running in a separate thread ?
Post by: aeroxr1 on September 02, 2014, 12:34:52 am
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  :'(