Hi Robert,

I recently implemented a shader technique in FlightGear that needed to 
compute the mipmaps levels with the min operator on the alpha channel 
instead of the classical average that is usually used. For that technique,
I computed the mipmaps on the CPU. 

If you design a new function that can compute mipmaps, would it be 
possible to choose the operation that merge the four source pixels into 
the pixel of the next level ? By providing a callback or a function 
object that default to average on all channels ?

My implementation is here : 
http://gitorious.org/fg/simgear/blobs/next/simgear/scene/material/mipmap.cxx

The technique implemented is shown in this short video :
http://www.youtube.com/watch?v=lwVrKb2yShk

Regards,
-Fred

----- "Robert Osfield" a écrit :

> Hi Sukender,
> 
> My plan is to add a Image::buildMipmaps() functions that will use the
> new local gluScaleImage function that no longer requires a graphics
> context.  However, this function won't support compressed textures as
> GLU has never support texture compression, and our integration of GLU
> parts into the OSG hasn't magically changed this.
> 
> I am also planning to integrate NVidiaTextureTools as an OSG
> plugin/extension which will be able to compliment the GLU functions
> and add support for compressed texture formats.  This will however
> require the NVTT as external dependency.
> 
> I may be able to get on to these tasks next week.
> 
> Robert.
> 
> 
> On Thu, Nov 4, 2010 at 11:47 AM, Sukender <[email protected]> wrote:
> > Hi all,
> >
> > I need to generate mipmaps from an osg::Image (a 2D image actually,
> which may be S3TC-DXTC compressed or not), and I have no OpenGL
> context. I just want my image to have mipmaps. Do you know anything
> that may help me?
> > - Something to get a context without having to realize something, or
> with an invisible window?
> > - Something to allocate mipmap memory, compute mipmaps, and store
> them in the osg::Image?
> >
> > I guess osg::gluBuild2DMipmaps() is the key, but it needs a context
> and process does not appear to be straightforward to me.
> > Thanks.
> >
> > Cheers,
> >
> > Sukender
> > PVLE - Lightweight cross-platform game engine -
> http://pvle.sourceforge.net/
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to