Author Topic: New to jPCT-AE, some clearances needed.  (Read 1893 times)

Offline aur8l

  • byte
  • *
  • Posts: 6
    • View Profile
New to jPCT-AE, some clearances needed.
« on: July 02, 2011, 07:58:32 pm »
Hello everybody.
I downloaded the jPCT-AE packages to start coding 3D stuff on my Eee Transformer. I'm (or have been, actually) pretty used to Android dev, and familiar with3D programming (I used ogre3D in some -far away, it seems- past). Anyway, jPCT seemed pretty easy to learn, so I decided to go with it. Still, I'm a bit confused...
I started looking at the HelloWorld example (from the jPCT wiki), and I understanded it all pretty much. As I started to look into the jPCT-AE HelloWorld, it began less clearer.

Hence the question(s) :
- the example does not seem to show any rendering loop (to me, at least), I was looking for some as in the jPCT example.
- I assume that the onDrawFrame() method is acting as the rendering loop. It tries on 'stop', but the stop() method is not invoked any where in the code.

These might seem some pretty basics questions for you all, but whether I'm completely missing something here, or I'm a bit rusty, which would explain the first.

Anyway, thank you for taking the time for reading my first post.

Peace.

[edit]
Another question has been hitting my mind. The x:y values for the frame buffer doesn't seem to bet set anywhere. Adds to the confusion.
Sorry again for the [stupid maybe] questions.
[/edit]
« Last Edit: July 03, 2011, 11:51:16 am by aur8l »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: New to jPCT-AE, some clearances needed.
« Reply #1 on: July 02, 2011, 09:26:20 pm »
You should try to get familiar with the Activity concept of Android and how the GLSurfaceView works. jPCT-AE itself doesn't make any assumptions about the environment it's running in. The frame buffer's size for example, is set by Android when the GLSurfaceView calls the onSurfaceChanged-method. It also ensures that the onDrawMethod is being called for example 60times/second, which makes it the actual "render loop".

Offline aur8l

  • byte
  • *
  • Posts: 6
    • View Profile
Re: New to jPCT-AE, some clearances needed.
« Reply #2 on: July 03, 2011, 11:51:02 am »
Thank you for the reply Egon.
In fact, I was disturbed by the example for jPCT, and the fact that there's a difference with the jPCT-AE example. I spent some time looking in-depth of the HelloWorld code, and things became a little clearer.
Anyway, I must admit that the concept of the onDrawMethod being called 60 times a sec was unknown to me, what explained the questions.
There's one that still hangs in my mind though :
When is the stop() function being called ?

[edit]
OK, I guess this is Activity related, but... Man, I'm lost.
[/edit]
« Last Edit: July 03, 2011, 01:02:11 pm by aur8l »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: New to jPCT-AE, some clearances needed.
« Reply #3 on: July 03, 2011, 04:19:16 pm »
The Activity should call it...i'm not 100% that it really does. Maybe one has to do it himself in the onStop()-method of the Activity.

Offline aur8l

  • byte
  • *
  • Posts: 6
    • View Profile
Re: New to jPCT-AE, some clearances needed.
« Reply #4 on: July 03, 2011, 06:20:17 pm »
So it IS not clear !!  ;)
Well, simple question : how does one exit the HelloWorld (jPCT-AE version) demo ?

Offline aur8l

  • byte
  • *
  • Posts: 6
    • View Profile
Re: New to jPCT-AE, some clearances needed.
« Reply #5 on: July 03, 2011, 06:59:16 pm »
Okay, I managed to make it out somehow.
Guess I got the basics. Keep you informed in other threads maybe ;).