[osg-users] Drawing to Texture2D

James Dickson james.dickson at gmail.com
Sat Jul 12 14:29:01 PDT 2008

I decided to go down the route of writting my own line, circle etc
algorithms as I only need a few, but I have hit a slight snag. :-( I have
attached an image to show the effect I am getting, ideally I would like the
Texture2D which is projected onto the billboard to be sharper? I.e the lines
drawn on the white billboard not to have blurred edges. The texture
resolution is 256x256, and increasing it only partially helps, are there any
filters I can turn on\off for the texture to help fix it?

Many thanks,

2008/7/11 Jean-Sébastien Guay <jean-sebastien.guay at cm-labs.com>:

> Hi James,
> I was wondering if it is possible to draw on a Texture2D instance. I know
>> this isn't possible, but I am wondering if you can do the equivalent of:
>> Texture2Dinstance->DrawCircle(x,y,r);
> OSG does not do 2D drawing to images. You can do your own by getting the
> data pointer from an osg::Image and drawing pixels into that (if you feel
> the need to write your own line, circle, flood-filling etc. algorithms :-)
> ), or you can use an imaging library (ImageMagick, etc.) to make the image
> and then get the data from that library and copy it into an osg::Image (or
> perhaps even use the same pointer if it's a raw format). No need to save the
> image to disk and re-read it with OSG.
> Hope this helps,
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

James Dickson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080712/491afec8/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.JPG
Type: image/jpeg
Size: 7976 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080712/491afec8/attachment-0003.jpeg>

More information about the osg-users mailing list