Hi,

you can get inspiration from the OpenIG project (http://openig.compro.net)
, there is a SilverLining plugin (
https://github.com/CCSI-CSSI/MuseOpenIG/tree/master/Plugin-SilverLining)
with reflections working together with Triton

On Thu, Feb 15, 2018 at 3:51 PM, Chris Hardy <hardy...@gmail.com> wrote:

> It turns out this is pretty easy, I just made a couple of silly
> uncaffeinated mistakes. In case anyone gets stuck in the same hole, all you
> have to do is create your own TextureObject and assign it to the
> TextureCubeMap.
>
> Perhaps there are some finer details missing in this solution but the
> output on the screen is at least accurate to what I want for the moment.
>
>
> Code:
>
> unsigned int handle;
> void* ptr = &handle;
> atm->GetEnvironmentMap(ptr, 6);
>
> osg::TextureCubeMap* hdrEnvMap = new osg::TextureCubeMap;
> osg::Texture::TextureObject* textureObject = new
> osg::Texture::TextureObject(hdrEnvMap, (GLuint)ptr, GL_TEXTURE_CUBE_MAP);
> hdrEnvMap->setTextureObject(camera->getGraphicsContext()->getState()->getContextID(),
> textureObject);
>
>
>
>
> My reflections are the wrong way around but that's my own problem I
> suppose. :P
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72962#72962
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to