Scrive Tomas Hnilica <[EMAIL PROTECTED]>:

> Hello Carsten,
>
> many thanks for your answer, it helped me a lot! Some comments below...
>
> Carsten Neumann napsal(a):
> >     Hello Tomas,
> > [...]
> >> - is it better to use openSG since I only need graphics optimization or
> >> is it better to implement such optimizaion algorithms? I thnik openSG
> >> offers me matured functionality for displaying text, legends, selection
> >> highlighting, etc...On the other hand writing optimization algorithms
> >> would be something like reinventing the wheel...but more customized.
> >>
> >
> > Hm, hard to say for me. Maybe if you tell us what optimizations you need
> > we can attempt to make a guess, but in the end you will likely have to
> > make that decision yourself, since you know your requirements and data
> > structures best.
> >
> >
> OK, in very easy way: I have an array of nodes (points - holds it's
> x,y,z position) and array of elements. Element is typically tetrahedron
> (holds pointers to 4 nodes which it constitst of), but can be any other
> geometric figure.
> There is no structure in the model - just flat arrays.I need to be able
> to set color to every single element.  And what I want is to draw it all
> as fast as possible.
> Currently most stupid draw is done - go through all elements and draw
> them - set color, glBegin, draw element (tetrahedron is made like
> trianglestrip), glEnd....

Well, at this point maybe OpenSG could improve your program a lot. As
OpenSG holds all geometries in DisplayLists, everytime you draw your
tetrahedon, it just uses the vertices already present in graphics
memory (if it fits!). Your algorithm seems to retransmit the vertex
data every time, that's quite time consuming. (this holds under the
assumption that you use transformation matrices to move/rotate/scale
every single tetrahedon instead of calculation absolute vertex
coordinates).

Regards,

  Toni


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to