Version updates!

Started by EgonOlsen, March 28, 2010, 09:47:50 PM

Previous topic - Next topic

Thomas.

Quote from: EgonOlsen on December 17, 2010, 09:09:56 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:

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

EgonOlsen

No, you can do this as well:


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.

Thomas.

oh, thanks :) ... I dont know, why I must do everything complicated :D

EgonOlsen

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...

Thomas.

please... can you add method for add child Light to Object3D? something like this: Object3D.addChild(Light);

EgonOlsen

I would rather not add this. If you have to synchronize their positions, just extend Object3D and let your code do the job.

EgonOlsen

Quote from: raft on April 09, 2010, 11:53:08 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...

raft

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.

Kaiidyn

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

raft

I was sleepy and hit the upgrade button thinking it was snooze button ;D

EgonOlsen

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

Thomas.

#176
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

EgonOlsen

Are you sure that you are using it correctly? Can you post some code snippet?

Thomas.

is it correct?
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);

Kaiidyn

#179
I never used this, but to me this would be logical:

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


Render loop:
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

fb.blit(tex, 0, 0, 0, 0, 512, 256, false);
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