<div dir="ltr"><div><div><br>Your OpenGL implementation might signal a maximum texture size of 4096.<br><br></div>Which is why there is no alternative to downsizing it.<br><br></div><div>There is also an <span class="gmail-st">OSG_MAX_TEXTURE_SIZE environment variable. I am not sure what its default value is, or if it has a default at all. Have you tried forcing this to 8192?<br></span></div><div><br></div>Christian<br><br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-22 13:58 GMT+01:00 Uma Devi Selvaraj <span dir="ltr"><<a href="mailto:umaselvam1503@gmail.com" target="_blank">umaselvam1503@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
   I have simple code that renders image using osgviewer. I am able to render the image successfully with the code. My problem now is the size of the image is reduced. for example the original size of the image is 4683 * 3035, the image is reduced to 4096 * 3035. Is this expected behaviour or is there anything I need to add in my code. I have added my code.<br>
<br>
<br>
//required header files<br>
<br>
int main(int argc,char**argv)<br>
{<br>
<br>
        osg::ref_ptr<osg::Image> image;<br>
    image = osgDB::readImageFile("C:\\<wbr>Users\\mcw\\Desktop\\DemModel.<wbr>tif.gdal");<br>
        std::cout << "Image info are " << image->s() << "\n" <<image->t() <<"\n" <<image->r() << std::endl;<br>
        if (!(image.valid()))<br>
        {<br>
                std::cout << "Unable to read image file " << std::endl;<br>
                getchar();<br>
                return 0;<br>
        }<br>
<br>
        osg::ref_ptr<osg::Geode> geode =(osg::createGeodeForImage(<wbr>image));<br>
<br>
        osg::Texture2D *texture = new osg::Texture2D();<br>
        texture->setFilter(osg::<wbr>Texture::MIN_FILTER, osg::Texture::LINEAR);<br>
        texture->setFilter(osg::<wbr>Texture::MAG_FILTER, osg::Texture::LINEAR);<br>
        texture->setWrap(osg::Texture:<wbr>:WRAP_R, osg::Texture::REPEAT);<br>
        texture-><wbr>setResizeNonPowerOfTwoHint(<wbr>false);<br>
        texture->setImage(image);<br>
        texture->setBorderColor(osg::<wbr>Vec4d(0.4f, 0.5f, 0.6f, 1.0f));<br>
        osg::StateSet* stateset = new osg::StateSet;<br>
<br>
        stateset-><wbr>setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON);<br>
<br>
        geode->setStateSet(stateset);<br>
        osgViewer::Viewer viewer;<br>
        viewer.setSceneData(geode.get(<wbr>));<br>
        getchar();<br>
        return viewer.run();<br>
<br>
}<br>
<br>
...<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Uma<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=69470#69470" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=69470#<wbr>69470</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>