Alice Yin wrote:
Hi,
I am rewriting my code into OSG. One function I want to use is to specify each
level of the mipmap image by myself, just as glTexImage2D(GL_TEXTURE_2D, level,
GL_RGB, cols, rows, 0, GL_RGB, GL_FLOAT, Data) does.
Is there a function in OSG like this? I haven't found yet. If not, is it
possible to extend the osg::Texture2D class to do this job?
Hi, Alice,
You can do this with the setImage() and setMipmapLevels() methods in
osg::Image. It's rather clunky to use, but it works.
If you need an example, look at the dds plugin (around line 655 of
ReaderWriterDDS.cpp)
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org