[osg-users] Draw vertex as Circle with color given by some Vec4 array

Robert Osfield robert.osfield at gmail.com
Fri Jan 6 00:49:18 PST 2017


On 5 January 2017 at 20:03, Bruno Oliveira
<bruno.manata.oliveira at gmail.com> wrote:
> Hi all,
> Robert: I've tried that approach, the problem is that I need to define
> point's sizes in World coordinates, not in pixel! Is this possible with
> PointSprites in any way?

You can set up the osg::Point distance attenuation coefficients to
alter it's size in different ways.  Have a look at online docs for
glPoint.  Note, for point sprites you use osg::Point and
osg::PointSprite together.

An alternative is to manually doing the same thing as point sprites
using geometry sharers.  The advantage with this approach is that you
can compute all the sizes in your vertex and geometry shaders which
provides more control.

Robert.



More information about the osg-users mailing list