If you setup your internalFormat and pixelFormat correctly, then the code should work.
Art --- Mael Blanchard <[EMAIL PROTECTED]> schrieb: > Hi all, > I have an array of floats (float tab[taille]) I > would like to set a OSG > texture 1D of float but i am not sure if my method > is good : see the > parameters of setImage mention below : > > float * tab = new float [taille]; > [...] > > osg::ref_ptr<osg::Image> imageOSG = new > osg::Image(); > > GLint internalTextureformat=1; > GLenum pixelFormat=GL_LUMINANCE; > > imageOSG->setImage (taille, > 1, > 1, > internalTextureformat, > pixelFormat, > GL_FLOAT, > (unsigned char *)tab, > > osg::Image::USE_NEW_DELETE); > > // Attach the image in a Texture2D object > osg::ref_ptr<osg::Texture1D> texOSG = new > osg::Texture1D; > texOSG->setImage( imageOSG.get() ); > > > Thanks, > > Mael > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > __________________________________ Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

