Look in include/osg at the file called Image. There are several methods in
the Image class that allow you to specify data of various formats, a lot
like the OpenGL glTexImage2d() function where you specify format, type, and
a pointer to the data. Then create an osg::Texture2D object and set its
Image to the Image you just created.
   -Paul


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Sascha Kuhn
> Sent: Wednesday, January 17, 2007 8:02 PM
> To: osg users
> Subject: RE: [osg-users] Created Array Picture on a suface
> 
> I am not so familiar with OSG. How can I convert the colors 
> to an Image?
> 
> Thanks.
> Sascha
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Paul Martz
> Sent: Wednesday, January 17, 2007 5:51 PM
> To: 'osg users'
> Subject: RE: [osg-users] Created Array Picture on a suface
> 
> 
> You could use it as a color array and bind colors per vertex 
> on a quad mesh, or you could convert the colors to an Image 
> and use it as a texture map.
>    -Paul
>  
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> Sascha Kuhn
> > Sent: Wednesday, January 17, 2007 6:34 PM
> > To: osg users
> > Subject: [osg-users] Created Array Picture on a suface
> > 
> > Hi,
> > I have a picture saved in a array of osg::vec4. I want to map this 
> > picture on a surface(osg::Geometry object) in the scene graph.
> > Does anybody know how I can do this?
> > 
> > Thanks.
> > Sascha
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to