Hi Fred, You can try
texture->setResizeNonPowerOfTwoHint(false); Cheers. 2010/10/11 Fred Smith <[email protected]> > Hi, > > I am doing RTT using the following code: > > > Code: > Image *image = new Image(); > image->allocateImage(320, 200, 1, GL_RGBA, GL_UNSIGNED_BYTE); > Texture2D *texture = new Texture2D(); > texture->setTextureSize(320, 200); > texture->setInternalFormat(GL_RGBA); > texture->setImage(image); > camera->attach(osg::Camera::COLOR_BUFFER, texture); > > viewer->frame(); > > > > (I am using an Image because I need to read the data back. I'll probably > change this code to use a PBO in the future). > > I can see the following message in the console window: > > Scaling image from (320,200) to (256,256) > > Why? Is it that my current graphics card (GeForce 7900GS) doesn't handle > non-power of two texture sizes (seems odd)? > > When I reach the "Scaling from image" code in OSG, I can see that > _textureWidth and _textureHeight are 256,256... why? > > Cheers, > Fred > [/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=32620#32620 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

