Skip to main content
13 events
when toggle format what by license comment
Feb 14, 2013 at 17:11 answer added dforce timeline score: 3
Sep 13, 2012 at 22:03 review First posts
Sep 14, 2012 at 22:55
Aug 18, 2012 at 13:06 vote accept bonzairob
Aug 16, 2012 at 16:26 comment added Phill.Zitt Ah. That makes the question more clear. Are you targeting something that has an extremely limited amount of RAM? If not, storing all of the UI elements in an array, and 'turning' them on and off via a class variable ( bool, I'd think ) should save you draw calls. You might want to edit in what platform and programming language you are targeting ( as tags as well, perhaps? ) to give people a little more knowledge as to your situation.
Aug 16, 2012 at 15:48 comment added bonzairob @Phill.Zitt The problem isn't counting the textures, it's being able to keep things flexible. My plan was to be able to add and remove UI elements as they're needed. Now it looks like that's not possible.
Aug 16, 2012 at 14:13 comment added Phill.Zitt I'm not sure what language you're using, but I know that most languages have some sort of managed List or Vector that will tell you it's .size or .length. Regardless, if the List is storing textures, wouldn't you know exactly how many textures are in it ( i.e. you have to load them all in anyways, right?) ? Member int or float that increments every time a new texture is loaded will fix that problem.
Aug 16, 2012 at 10:15 answer added Liosan timeline score: 3
Aug 16, 2012 at 8:08 comment added bonzairob @Phill.Zitt I'd thought of that but the number of elements would be an issue. Things will be changing a lot in this system, but you need to know how many elements are in the list to start with. I suppose I could set it to a high number and pad it...
Aug 16, 2012 at 2:54 history tweeted twitter.com/#!/StackGameDev/status/235932519718080512
Aug 16, 2012 at 0:07 answer added Nathan Reed timeline score: 4
Aug 15, 2012 at 23:26 comment added Phill.Zitt Do you have to switch textures inside of the Shader? Perhaps store a list of Textures, and inside of the object ( your objects have their own class, right? ) store an int relative to which Texture it uses, then use that to set the Texture during the draw call.
Aug 15, 2012 at 23:00 history edited bonzairob CC BY-SA 3.0
added 6 characters in body
Aug 15, 2012 at 22:51 history asked bonzairob CC BY-SA 3.0