View Full Version : Performance issues
10-24-2000, 04:56 AM
I am writing an opengl application for Windows. Every time the program needs to add one line to a big drawing (say 10,000 lines), I have to refresh the whole drawing again. Is there a way in opengl to refresh only one line and leave the 10,000 lines as-is. Thanks.
10-24-2000, 05:27 AM
Yes, you can render to the front buffer directly. So if you have the 10000 lines already displayed and you just want to add one more:
glFlush(); // required to ensure that the line will actually show up on the screen
(or something along those lines)
Note that a lot of buggy apps fail to call glFlush() after front-buffered rendering. Don't fall into this trap. When you render to the front buffer, if you don't call glFlush(), everything you've done so far may just be buffered up still.
10-24-2000, 11:25 AM
Thank you very much, Matt. That really helps.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.