Antonio Bleile wrote:
> Scrive Tomas Hnilica <[EMAIL PROTECTED]>:
>
>   
>> 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).
>   
Indeed. It might also help anyway, since OpenSG uses vertex arrays, 
which are a bit faster. (I think OpenSG 2.0 will use vertex buffers, 
which are again even faster).

Cheers,
/Marcus



-------------------------------------------------------------------------
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