Slick Forums

Discuss the Slick 2D Library
It is currently Sat Feb 23, 2019 12:26 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Apr 02, 2011 9:59 pm 
Offline
Regular
User avatar

Joined: Tue Apr 03, 2007 9:27 pm
Posts: 100
Location: Canada
I use a lot of particle effects, heap dump tells me I have 130,000 particle instance. I'm going to try to get this number down but in the mean time I noticed that each of those 130,000 particles spawns a needless white color object.

Can we change:
protected Color color = new Color(1f, 1f, 1f, 1f);
to:
protected Color color = Color.white;

https://bob.newdawnsoftware.com/repos/s ... ticle.java


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 10, 2011 4:23 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Actually since that color is changed by the particle it can't be assigned to Color.white without some other checks to create a new colour object when modified..

Done that in SVN.

Kev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group