Re: [osg-users] osg::Vec3Array as uniform to Shader
Hi, I found a way to solve this problem: converting the array to texture. Follows an example: Code: osg::ref_ptr image = new osg::Image; image->setImage(myVec3Array->size(), 1, 1, GL_RGBA8, GL_RGBA, GL_FLOAT, (unsigned char*) &myVec3Array[0], osg::Image::NO_DELETE); osg::ref_ptr texture = new osg::Texture2D; texture->setImage(image); ... ss->addUniform( new osg::Uniform("vertexMap", texture) ); ... Thank you! Cheers, Rômulo[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73012#73012 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Copy a region of an image x,y,w,h / s,t,r
Hi, Does the code in the osghud.cpp examples help? Cheers, Tony Tony V -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73011#73011 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg::Vec3Array as uniform to Shader
Hi, can I pass a osg::Vec3Array as uniform to Shader? ... Thank you! Cheers, Rômulo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73010#73010 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Copy a region of an image x,y,w,h / s,t,r
lol I posted without reading the post I refer to ... In theory glu has been reimplemented so it doesn't require a context to be bound anymore Give us a sample code, it's strange this feature doesn't work... mp3butcher wrote: > Hi Steal, > http://forum.openscenegraph.org/viewtopic.php?t=7810&highlight=GLU > All image manipulation methods are GLU based, which require a proper GL > context to be created and made current. > Perhaps popping a dummy osgViewer before calling these methods should do the > trick... > Cheers > > > Steal wrote: > > Hi, > > > > My question is: How do I copy a part of an image? > > > > Thanks for reading > > > > - John > -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73009#73009 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Copy a region of an image x,y,w,h / s,t,r
Hi Steal, http://forum.openscenegraph.org/viewtopic.php?t=7810&highlight=GLU All image manipulation methods are GLU based, which require a proper GL context to be created and made current. Perhaps popping a dummy osgViewer before calling these methods should do the trick... Cheers Steal wrote: > Hi, > > My question is: How do I copy a part of an image? > > Thanks for reading > > - John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73008#73008 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Copy a region of an image x,y,w,h / s,t,r
Hi, My question is: How do I copy a part of an image? Thanks for reading - John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73007#73007 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org