I have to implement a 2D waterfall display that would work as follows.
Say our display is 500x500 pixels, when a new line of data arrives, it is draw at the very top of the display and all the previous data is copied one line down.
The easiest way I’ve come up with is to use glDrawPixels to draw the incoming data and glCopyPixels to copy the 499 topmost lines of data 1 down.
I have a couple of questions:
First, is this the best/most efficient way of doing this? (I may have up to 32 such displays going at once. And their size ranges from 100x100 to 1600x400 in any number of combinations limited only by the display resolution)
Second, as I have other symbols that need to be drawn on top of it but should not get copied down (ex a cursor), how do I ensure that glCopyPixels (or whatever better method one of you suggests ) only copies the data and not the symbology?
Any help, hints, links to examples, death threats, would be greatly appreciated.
seems to me that when I create a texture whose size isn’t a power of two, the program runs really slowly.
As an example, I took nehe’s lesson 8 and changed the bitmap sizes and reloaded the program. Although the program still runs with a 500x500 bitmap, the framerate drops to 1 frame per 30 seconds or something. If I resize to 1024x1024, then it runs smoothly.
Should I be setting something prior to using non power of two texture sizes?
I would suggest using power of two textures only.
You would use just a fraction of it’s width and entire height.
When updating you just go through the whole height of texture, but when diplaying you use only 500 pixels.
I’ve got something scrolling pretty smoothly now.
Now it’s just a matter of integrating it into the rest of my software to see how the performance holds up!