gl question - editing large objects

Robert Skinner robert at texas.esd.sgi.com
Fri Jul 27 03:30:22 AEST 1990


In article <9007251346.AA24480 at acf4.NYU.EDU>, karron at ACF4.NYU.EDU (Dan
Karron) writes:
|> My understanding that graphical objects are not the way to go since
|> the new cpus can keep up with the graphics pipeline. 
|> 
|> Is it correct to say that the entire compiled objects part of the gl is
|> obsolete ? Are there any specific instances where you should use it ?
|> 
|> dan.

Compiled objects are not obsolete.  In fact, the 3.3 release now lets
you use the 'fast path' routines, bgnpolygon, v3f, endpolygon, etc. in
objects.

The point is that compiled objects have to be very general to handle
every imaginable way that a customer might want to use them.  As a
result, the way they are almost certainly not as efficient as if you
did it yourself.  I would venture to say that there is *absolutely no
way* that editing objects and redrawing will be as fast as doing all
the drawing yourself for this particular application.

In fact, editing objects will be more work.  You not only have to build
the object, you have to manage a mapping of vertices to edit points in
the object.  For each vertex that changes, you have to make 3 or 4
calls to edit that vertex in the object.

If you do it yourself, you redraw by calling the drawing commands you
used to build the object.  You change the vertex information, then
redraw.  You will have to store the static color information (if I
remember your problem correctly) but that's a pretty simple 2D array.
And you aren't using any more memory, because the GL object would store
it in your host memory anyway.

As a matter of fact, the GL object would use more memory, because it
would have to store a token that indicates that you were calling
cpack() on the color data, and there would also be a token stored for
the v3f command.  Then there is the extra overhead for the (probably)
linked list that the GL object is stored as.  And there's probably
overhead for each edit point.

You'll find you need less code without editing objects and it will run
faster.

Robert Skinner
robert at sgi.com

Well you run and you run to catch up with the sun, but it's sinking;
 racing around to come up behind you again



More information about the Comp.sys.sgi mailing list