View Single Post
Old 06/07/07, 3:58 PM   #370
Celandro
Don Flamenco
 
Night Elf Warrior
 
Cenarius
I'd suggest using an 'update graph' type event that the addon could fire itself. Updaing a TPS graph 2 times a second should be ok from a cpu perspective.

Also Im not sure how you are generating the graphs, but if you are creating a texture what you can do is make a texture with the width and height of the graph, say 10 by 10. You then start with texture coordinates of 0,0 -> 1,1. On first update, you change the texture coordinates to 0.1,0 -> 1.1,1. You then only have to change 10 pixels of the texture. Not having to recreate the entire texture is a faster operation. Also the addon will only have to send you a message that says 'add one data point' instead of 'display all these data points' Once you get up to 1.0,0 -> 2.0,1 you can put the coords back to 0,0 -> 1,1 since the textures will map that way anyhow.
 
User is offline.
Reply With Quote