Hi Robert,
Robert Osfield wrote:
Hi J.P.
The way I'd tackle this would be to have a 1D texture that contains
all the colours, then set up the tex coords on the points so that they
pull the appropriate colour in, then use a texture matrix to update
the tex coords values and to create the animation. Setting the
filtering to nearest will ensure that you don't get smoothly gradating
colours. The advantage of this technique is that you don't change
any data except a single matrix.
Cool idea, thanks.
jp
Robert.
On Thu, Dec 10, 2009 at 10:01 AM, J.P. Delport <[email protected]> wrote:
Hi all,
I'm searching for an optimised solution for the following:
Assume I have a line represented by, make it 10000 points. The vertices are
stored in an array and are fixed. I have different colours for all the
points. Now I want to "animate" the colours. E.g. I want to treat the colour
array as a circular buffer and just move all the colours one step over.
Obviously I can do it by manipulating the array, but then the whole array
must be uploaded to the GPU again.
I've thought about making a colour array twice the size of the number of
vertices and then telling OpenGL to start picking colours from a point in
this array, but I don't know how to tell OSG this is what I want.
osg::Geometry seems to default to the start of the array for drawing.
Is there a way to do this in OSG without making my own drawImplementation?
regards
jp
--
This message is subject to the CSIR's copyright terms and conditions, e-mail
legal notice, and implemented Open Document Format (ODF) standard. The full
disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean. MailScanner thanks Transtec
Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org