[osg-users] how to get the handle of opengl texture that corresponds to a OSG::Texture

Robert Osfield robert.osfield at gmail.com
Wed Sep 9 00:33:08 PDT 2015


Hi Qingjie,

The RenderInfo is managed by the my the rendering back end, it's passed to
all draw callbacks and Drawables.

Robert

On 9 September 2015 at 04:29, Qingjie Zhang <305479421 at qq.com> wrote:

> Hi Robert,
> I'm knowing that the RenderInfo->getContextID() can give me the contextID
> to use in the getTextureObject(uint contextID), but where can I get the
> RenderInfo? I searched the source code of Texture but did not find that..
> Many thanks.
>
> Qingjie
>
>
> robertosfield wrote:
> > Hi Qingjie,
> >
> >
> > The osgTexture::TextureObject* osg::Texture::getTextureObject(uint
> contextID)  method can be used to get the OSG's wrapper for the OpenGL
> texture object.  The TextureObject::id() method returns the OpenGL texture
> object id.
> >
> >
> > Robert.
> >
> >
> > On 8 September 2015 at 15:20, Qingjie Zhang < ()> wrote:
> >
> > > Hi,
> > > I generated a texture2d with osg, to use the texture in CUDA, I have
> to get the corresponding "opengl texture" handle(GLuint), and then access
> to the texture by the handle in CUDA.
> > > Now I don't know how to get the handle.
> > > Many thanks for your reply!!!
> > > ...
> > >
> > > Thank you!
> > >
> > > Cheers,
> > > Qingjie
> > >
> > > ------------------
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=65061#65061 (
> http://forum.openscenegraph.org/viewtopic.php?p=65061#65061)
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > osg-users mailing list
> > >  ()
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> )
> > >
> >
> >
> >  ------------------
> > Post generated by Mail2Forum
>
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65073#65073
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150909/d3b8ac1f/attachment-0003.htm>


More information about the osg-users mailing list