Author Topic: Version updates!  (Read 177788 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Version updates!
« Reply #165 on: December 18, 2010, 09:22:13 pm »
No. getPosition() is what getTranslation() or getTransformedCenter() do, setPosition() would be either translate(...) or clearTranslation();translate(...). No need to add additional methods that do the same thing.
For example, if I want to set position of object3D same as light, I must do this everytime:

Code: [Select]
SimpleVector lv = new SimpleVector(sun.getPosition());
sun.rotate(new SimpleVector(0, 0.05f, 0), plane.getTransformedCenter());
SimpleVector nlv = new SimpleVector(sun.getPosition());
light.translate(nlv.calcSub(lv));

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #166 on: December 18, 2010, 09:53:03 pm »
No, you can do this as well:

Code: [Select]
SimpleVector lv = new SimpleVector(sun.getPosition());
sun.rotate(new SimpleVector(0, 0.05f, 0), plane.getTransformedCenter());
light.clearTranslation();
light.translate(sun.getPosition());

If you really want to have a setPosition() for light, just extend Object3D and add it using the same two lines of code.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Version updates!
« Reply #167 on: December 18, 2010, 10:28:44 pm »
oh, thanks :) ... I dont know, why I must do everything complicated :D

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #168 on: December 19, 2010, 12:40:07 am »
Uploaded a new build (http://www.jpct.net/jpct-ae/download/alpha/jpct_ae.jar) that adds the LensFlare class from jPCT, fixes a problem with indexed geometry and VBOs as well as two minor fixes that i forgot about...

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Version updates!
« Reply #169 on: January 13, 2011, 07:19:02 pm »
please... can you add method for add child Light to Object3D? something like this: Object3D.addChild(Light);

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #170 on: January 13, 2011, 10:38:11 pm »
I would rather not add this. If you have to synchronize their positions, just extend Object3D and let your code do the job.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #171 on: February 01, 2011, 03:05:31 pm »
bones definetely need a JIT ::)
The JIT on the crappy Galaxy increases Bones' framerate in this test by ~30%. That's actually more than i expected...

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Version updates!
« Reply #172 on: February 01, 2011, 10:47:18 pm »
right, today i've accidentally upgraded my Nexus One to 2.2.2. bones demo runs at 20fps with 8 animated characters. it was around ~10fps if i remember correctly.

Offline Kaiidyn

  • long
  • ***
  • Posts: 103
    • View Profile
Re: Version updates!
« Reply #173 on: February 02, 2011, 01:21:51 pm »
how can one accidentally upgrade their phone ? lol
nice to see the improvement though :)
Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer’s intent but rather is full of crisp abstractions and straightforward lines of control. - Grady Booch

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Version updates!
« Reply #174 on: February 02, 2011, 07:17:18 pm »
I was sleepy and hit the upgrade button thinking it was snooze button ;D

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #175 on: February 15, 2011, 10:44:07 pm »
Another update. This version improves performance for some collision detection methods and should fix render targets on phones where they didn't work before (like mine): http://www.jpct.net/jpct-ae/download/alpha/jpct_ae.jar

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Version updates!
« Reply #176 on: February 17, 2011, 12:32:18 am »
I have still problem with render to texture... when I just clear fb, texture is black, but if I whatever try blit, texture is not visible in rendered frame
« Last Edit: February 17, 2011, 12:34:01 am by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #177 on: February 17, 2011, 06:32:10 am »
Are you sure that you are using it correctly? Can you post some code snippet?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Version updates!
« Reply #178 on: February 17, 2011, 08:48:51 am »
is it correct?
Code: [Select]
private Texture tex = new Texture(512, 256);
...
fb.setRenderTarget(tex);
fb.clear();
blitText("hello", 5, 5);
fb.removeRenderTarget();
fb.clear();
...
fb.blit(tex, 0, 0, 0, 0, 512, 256, false);

Offline Kaiidyn

  • long
  • ***
  • Posts: 103
    • View Profile
Re: Version updates!
« Reply #179 on: February 17, 2011, 10:07:07 am »
I never used this, but to me this would be logical:

In your initialization:
Code: [Select]
private Texture tex = new Texture(512, 256);
fb.setRenderTarget(tex);

Render loop:
Code: [Select]
fb.clear();
blitText("hello", 5, 5);
fb.update();
buffer.displayGLOnly(); // optional? i only use gl.. not sure if this is required for software render.

your function
Code: [Select]
fb.blit(tex, 0, 0, 0, 0, 512, 256, false);
« Last Edit: February 17, 2011, 10:09:47 am by Kaiidyn »
Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer’s intent but rather is full of crisp abstractions and straightforward lines of control. - Grady Booch