<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Liberation Mono">Hi, <br>
      <br>
      The OpenGL command used to update a sampler* uniform is
      glUniformi[fv].<br>
      Sampler* uniforms are int uniforms.<br>
      <br>
      An uniform of type '</font><font face="Liberation Mono"><font
        face="Liberation Mono">array of</font> INT' works (It works for
      me). <br>
    </font><br>
    <div class="moz-cite-prefix">On 22/03/2016 10:36, Sebastian
      Messerschmidt wrote:<br>
    </div>
    <blockquote cite="mid:56F11221.8040602@gmx.de" type="cite">Hi Chris,
      <br>
      <blockquote type="cite">Hi,
        <br>
        <br>
        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.
        <br>
        <br>
        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.
        <br>
      </blockquote>
      <br>
      <blockquote type="cite">
        <br>
        It looks like I could use sampler arrays (e.g. sampler2D
        myTextures[20]; ), but osg::Uniform doesn't seem to support such
        a thing.
        <br>
      </blockquote>
      Arrays of samplers is used almost by no one any more. I usually
      use TextureArrays and simply resize the textures to a common size
      (usually the "biggest"). Texture arrays are efficient and easy to
      use.
      <br>
      I'd like to see the "array of sampler"-support in OSG anyways,
      since there might be situations where texture arrays are not
      efficient.
      <br>
      Another alternative are bindless textures, but we would need to
      add support to OSG too.
      <br>
      Last alternative could be a texture atlas.
      <br>
      <br>
      Since you mentioned "texture processing", you might want to look
      into BufferTextures. They don't have any filtering (only
      texelfetch), but IIRC they support large amounts of texels.
      <br>
      So if you don't need HW-filtering/mipmapping you can use them as
      atlas textures.
      <br>
      <br>
      Cheers
      <br>
      Sebastian
      <br>
      <blockquote type="cite">
        <br>
        <br>
        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?
        <br>
        <br>
        Thank you!
        <br>
        <br>
        Cheers,
        <br>
        Chris
        <br>
        <br>
        ------------------------
        <br>
        <a class="moz-txt-link-freetext" href="http://www.hrwallingford.com/facilities/ship-simulation-centre">http://www.hrwallingford.com/facilities/ship-simulation-centre</a>
        (<a class="moz-txt-link-freetext" href="http://www.hrwallingford.com/facilities/ship-simulation-centre">http://www.hrwallingford.com/facilities/ship-simulation-centre</a>)
        <br>
        <br>
        ------------------
        <br>
        Read this topic online here:
        <br>
        <a class="moz-txt-link-freetext" href="http://forum.openscenegraph.org/viewtopic.php?p=66577#66577">http://forum.openscenegraph.org/viewtopic.php?p=66577#66577</a>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        _______________________________________________
        <br>
        osg-users mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
        <br>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
        <br>
      </blockquote>
      <br>
      _______________________________________________
      <br>
      osg-users mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
      <br>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>