[osg-users] Support for sampler arrays
Robert Osfield
robert.osfield at gmail.com
Tue Mar 22 01:24:02 PDT 2016
Hi Chris,
You can subclass from osg::StateAttribute and implement your own GL state
calls in the same way as all the core StateAttribute classes implement
their GL state calls. The osg::Uniform is an exception though as there are
particular rules about when uniforms can be applied - you have to know that
the appropriate glProgram is applied prior to assign the uniforms to them.
osg::State manages this task, applying all osg::StateAttribute then
applying the osg::Uniform. The add sampler arrays the natural place would
be to modify the core osg::Uniform and simply submit this for inclusion in
the core OSG.
Robert
On 22 March 2016 at 06:32, Chris Kuliukas <chris at kuliukas.com> wrote:
> Hi,
>
> Working on an app that is going to be doing a lot of work with large
> texture processing, and will need to squeeze as much data into graphics
> memory as possible and allow many textures to be referenced
> programmatically.
>
> I've got texture arrays working, but can't use this for all requirements
> since all layers in a texture array have to be the same size.
>
> It looks like I could use sampler arrays (e.g. sampler2D myTextures[20];
> ), but osg::Uniform doesn't seem to support such a thing.
>
>
> I'm also wondering if there's an easy way to easily run your own OpenGL
> commands in case something isn't supported yet and you just want to use GL
> directly instead of waiting for the OSG implementation?
>
> Thank you!
>
> Cheers,
> Chris
>
> ------------------------
> http://www.hrwallingford.com/facilities/ship-simulation-centre (
> http://www.hrwallingford.com/facilities/ship-simulation-centre)
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66577#66577
>
>
>
>
>
> _______________________________________________
> 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/20160322/48beb3c3/attachment-0002.htm>
More information about the osg-users
mailing list