Re: [osg-users] specify particular mimap level image

2010-08-16 Thread Alice Yin
Thank you Jason,

It works very well.

Alice

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30807#30807





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] specify particular mimap level image

2010-08-12 Thread Jason Daly

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