View Full Version : grouping storing or something like that
09-29-2005, 11:25 AM
I am new in graphic programming and I do not know whether there is the right place to ask this question or not.
My problem is that when I draw some lines arc etc. ı want to treat them as single object and if possible to store it. So when I call it do not need to redraw it.
Is this possible? what kind of tool do I have to use?
09-29-2005, 02:12 PM
Graphics application rendering tends to be data driven, so you can simply store the data to describe the arc somewhere in memory and call your rendering with that data. This is particularly effective with something like glDrawArrays.
Alternatively you can use display lists, but be warned that this is good for large ammounts of data but drawing small uncomplex objects this way is not a good idea. To use Display Lists you need to use calls like:
// make draw calls here
Then to draw that object in the future just make the single call:
You can still move that object around with matrix calls and change the texture and color it uses if you define it without that state and bind textures or specify colors externally to the list. Alternatively you can make the positional information, the texture and the color etc. part of the object simply by making those calls inside the display list creation code. You have complete flexibility.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.