<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      Your internal format needs to be 16bit per channel to I think, so
      GL_UNSIGNED_INT_8_8_8_8_REV might be inappropriate. <br>
      GL_R16UI might do, but I thing you need to use GL_RGBA_INTEGER_EXT
      as source. Alternatively you can use GL_LUMINANCE with
      GL_LUMINACE16F.<br>
      <br>
      What exactly are you doing with the image? <br>
      <br>
      Cheers<br>
      Sebastian<br>
    </div>
    <blockquote
cite="mid:CAO-SbSsGTTF=+orMYoccRV0T4VE-MbxxGQi_8z3ticj93xF-8Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>Hello,<br>
                      <br>
                    </div>
                    I have a 16bit per channel, 4 channel, image. The
                    format is short (uint16_t). Note that this image is
                    scaled to the full 16bit depth [0, 65536]<br>
                    <br>
                    <br>
                  </div>
                  I have this code that works well for a 8bit, 4 channel
                  image:<br>
                  <br>
                  osg::ref_ptr<osg::Image> image = new
                  osg::Image(); <br>
                   image->setImage(ImageSize, ImageSize,1,<br>
                  GL_RGBA8,<br>
                  GL_RGBA,<br>
                  GL_UNSIGNED_INT_8_8_8_8_REV, <br>
                </div>
                MyDataPtr,<br>
                osg::Image::NO_DELETE);<br>
                <br>
                <br>
                <br>
              </div>
              Now I want to por this to 16bit depth.<br>
            </div>
            How is this done?<br>
            <br>
          </div>
          I tried<br>
          <br>
           image->setImage(ImageSize, ImageSize,1,<br>
          GL_RGBA16UI,<br>
          GL_RGBA,<br>
          GL_UNSIGNED_INT_8_8_8_8_REV, <br>
          MyDataPtr,<br>
          osg::Image::NO_DELETE);<br>
          <br>
        </div>
        But this yields all black textures. How can I do this without
        converting my 16bit image pixel data?<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<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>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>