Re: problems with adding to a container.



On Thu, 24 Apr 2003 00:54:00 -0700 (PDT) Stoyan karanfilov wrote:

> 10x a lot for the help. But maybe I was'n clear
> enough. If I had to draw a 3D object, if I have 4
> glareas I'll have to draw it 4 times. Is this the best
> way to do this.

Yes, you have to draw them four times.  A gtkglarea introduces only
little overhead -- you are calling OpenGL functions for the real work
anyway.  I'm not aware of OpenGL functions that draw the same geometry
to different "views".


> The alternate way is to use display
> lists and "shred areas", but inconvinience of display
> lists is that they do not allow dynamically to add or
> remove objects to/from them. So I am asking of a way
> to make things as they have to be. I thing that 4
> glareas will make make application "havy" and "clumsy"
> from performance point of view. Is there any other way
> to do this with no lack of performance?

Either way you should convert your geometry data into triangle strips.
In that form each vertex is only transfered once to the graphic card. 
If you don't have a stripping routine, you can find one in the gts: 

  http://gts.sourceforge.net/


hth,
michael



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]