jPCT - a 3d engine for Java > Projects

VoxelShop - voxel editor

(1/7) > >>

aZen:
This project relies on JPCT on a large scale and I'm very grateful for it!

>> VoxelShop - a voxel editor with animation support



This currently uses the software renderer and I'm still planning to change that.

Please consider using the Blackflux forum if you want to give feedback. I will probably not be able to check this thread regularly in the future.

Regards,
flux

EgonOlsen:
Looks cool. I think the software renderer is actually a good solution for this...less hassle, works everywhere, no hardware dependencies and no fighting between OpenGL and the GUI over world domination.

Edit: And if it's too slow, there always the option to enable multi-threading for it: http://www.jpct.net/wiki/index.php/Multithreading#The_software_renderer_on_multiple_cores

aZen:
Thank you for the reply!

The software renderer is already multi-threaded. The problem is that the refresh rate goes down significantly when one expands the viewport (e.g. 2560x1440). I think the drawing onto the canvas is just taking too long.

Is there a way to improve that?

EgonOlsen:
How are you doing that drawing into the canvas?

aZen:
In reality it's more complicated, but the basic idea is:


--- Code: ---World world = ...;
FrameBuffer buffer = ...;

buffer.clear(BGCOLOR);
world.renderScene(buffer);
world.draw(buffer);
buffer.update();

Graphics2D igr = (Graphics2D) buffer.getGraphics();
[...] (draw on the igr)

Graphics2D gr = (Graphics2D) BufferedImage.getGraphics();
buffer.display(gr);

--- End code ---

I already did some profiling and most time is spend on draw(...) and update(), but not sure what exactly happens when the canvas enlarges, so I'll need to test that again.

Navigation

[0] Message Index

[#] Next page

Go to full version