View Full Version : How can I do?
12-22-2003, 05:36 AM
I'm making a CAD programa with a object and over this object I put pieces with lines, circles, other objects, and so on.
I'd like the object will move quickly when user move it and move quickly when the user draw over the object.
How can I do?
Now, I've a triangles' structure and the object have over 100.000 triangles with pieces.
Thank you for all
12-22-2003, 05:57 AM
hm.. what exactly do you want to do? Make the object move/zoom/rotate when the user move the mouse over it, while a button is clicked?
If that's the case, put the object into a display list, and use glTranslate and glRotate (and of course glCallList) to move/rotate and draw it.
To keep track of the mouse movements you need an gui api (but I guess you already use one).
You can try several things :
- first, put all the currently static geometry in a display list. So there will be less data transfered from CPU to GPU. See
- second, you can try to 'stripify' your geometry, to send less vertices. Draw with 'GL_TRIANGLE_STRIP'.
- third, check this extension, wich is coming from Kinetix (once developper of 3DSMax) : http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt
It allows to save a part of the frame buffer and redraw it quickly, it will be useful for parts of the screen wich are not changing at all.
You can try VBO, if you have huge dynamic data : http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_buffer_object.txt
12-22-2003, 06:31 AM
A example is a shoes CAD. Over the last the designer can draw the shoes' pieces.
The last must to move lightly for a good work of the designer.
Now I have a structure of triangles with 3 points everyone.
Thank you very much.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.