On Fri, 2006-04-14 at 12:25 -0700, Alfred Reynolds wrote: > It is a code maintainence, performance and reuse issue. If you roll your > own Paint() code you end up having to rewrite functionality in each > paint call and you tend to make your layout logic code rather than data > driven. Paint also gets called many times per second, it is easy to blow > away performance by making expensive calls on data that rarely changes > (like the ConvertANSIToUnicode() call below), the VGUI2 framework is > event driven and expensive calls only get made when they need to be.
"Premature optimization is the root of all evil" -- Donald Knuth (or Tony Hoare, depending on who you talk to) Right then. In any case, my specific issue is with surface()->DrawTexturedRect() calls. Gauges and icons seem to call this one a lot; is it a good idea to do this manually as part of Paint()? Or is there some behind-the-scenes VGUI caching functionality that would make this a bad idea? _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders