Hi, to me this looks like a driver implementation specific problem. I would guess that the nVidia driver only allocates enough memory for the first mipmap-level on the first glTexImage2D. On the second glTexImage2D call it reallocates memory for all mipmap-level and copies the first level to the new memory. This would explain why the second glTexImage2D call is the slowest. Have you tried setting GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL before the first glTexImage2D call? Maybe this gives a hint to the driver, that the texture will have more than just one level.
Another problem you should consider is that glTexStorage2D is only in the core since version 4.2. So it will not work on older hardware. Another question: Do you now how osgEarth creates the new textures? Does is create a new texture for every loaded image? If yes, it could be a good idea to create set of textures at startup and re-use them(only change the content with glTexSubImage2D). This could also help to improve the performance. Thank you! Cheers, Marcel ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59611#59611 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

