Author Topic: GLSurfaceView.Renderer running in a separate thread ?  (Read 2999 times)

Offline aeroxr1

  • int
  • **
  • Posts: 82
    • View Profile
GLSurfaceView.Renderer running in a separate thread ?
« 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

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 :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: GLSurfaceView.Renderer running in a separate thread ?
« Reply #1 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).

Offline aeroxr1

  • int
  • **
  • Posts: 82
    • View Profile
Re: GLSurfaceView.Renderer running in a separate thread ?
« Reply #2 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 ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: GLSurfaceView.Renderer running in a separate thread ?
« Reply #3 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.

Offline aeroxr1

  • int
  • **
  • Posts: 82
    • View Profile
Re: GLSurfaceView.Renderer running in a separate thread ?
« Reply #4 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  :'(