46
Support / Re: Polyline
« on: December 09, 2013, 11:48:28 pm »
Thanks. I think I was blind there (time to stop working...).
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Polyline polyline = new Polyline(triangle, Color.BLACK);
polyline.setWidth(2f);
addPolyline(polyline);
Another "problem" might occur when using an ITextureEffect. Note that the array is a little bit larger than the actual texture. If that causes the problem, just fill the last row with the former one and you should be fine.
That's what this was meant for: http://www.jpct.net/doc/com/threed/jpct/ITextureEffect.html
[...] gc whichforcessuggests to the vm to free unused memory. [...]
@Sampling: I'm using SAMPLINGMODE_OGSS. The other sampling modes were producing way too many "pixel".Well, in that case, you aren't clearing 16mb but 64mb of data in each frame.
Config.fadeoutLight = false;
Config.useMultipleThreads = true;
Config.maxNumberOfCores = Runtime.getRuntime().availableProcessors();
Config.loadBalancingStrategy = 1;
Config.useMultiThreadedBlitting = true;
Config.mipmap = true;
Config.texelFilter = false;
Logger.setLogLevel(Logger.ERROR);
I tried a lot of things to get these operations faster (including native operation via System.arraycopy) and the current solution is the best that i could come up with. The current implementation will use multiple threads if Config.useMultipleThreads is true. Are you using that? If no, it might be worth a try. If yes, it might be worth a try to disable it before clearing and enable it again afterwards.I was already using multiple threads. Disabling it for the clearing increases the time from 14 to 20 ms. So that's not helping. Guess I will have to accept it. Could you explain what is happening when clearing? As I understand it, it's "just" deleting all the old data and (re)initializing the data structure. Why is that taking such a long time (I'm just curious)?
If you reduce the polygon count, draw might improve as well as renderScene. But with the software renderer, you are usually fill rate bound in almost any case.Is there a way to determine what the bottle neck is? Considering that the optimization I have in mind is far from trivial I'd be nice to know if it's worth it. If you can think of an easy way to add profiling, that would be very much appreciated!
Edit: Thanks for the screen shots. I'll add the project, when i find the time.Np, take your time!