Any news about having a mipmap generation thing directly into OSG? I cannot include code of VPB (LGPL) in my app (proprietary), and I do not think about linking to VPB just for mipmaps...
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
----- "Sukender" <suky...@free.fr> a écrit :
> Hi Brad and Robert,
>
> Well thanks for the answers. I don't know if I'll wait for Robert's
> implementation or use VPB. Is there a plan to move this code from VPB
> to OSG?
>
> Sukender
> PVLE - Lightweight cross-platform game engine -
> http://pvle.sourceforge.net/
>
> ----- "Brad Christiansen" <brad.chr...@thalesgroup.com.au> a
> écrit :
>
> > Hi,
> >
> > The latest version of VPB has all the code you need to generate mip
> > maps for an osg::Image / Texture. This code also allows you to
> select
> > between NVTT (no context) or the current context based approach. The
> > code is in TextureUtils:
> >
> > void compress(State& state, Texture& texture,
> > Texture::InternalFormatMode compressedFormat, bool generateMipMap,
> > bool resizeToPowerOfTwo, CompressionMethod method);
> >
> > void generateMipMap(State& state, Texture& texture, bool
> > resizeToPowerOfTwo, CompressionMethod method);
> >
> > While this does have a cuple of VPB dependancies, these would be
> very
> > easy to remove.
> >
> >
> > Cheers,
> > Brad
> >
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=33518#33518
> >
> >
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-...@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
On Tue, Feb 1, 2011 at 10:57 AM, Sukender <suky...@free.fr> wrote:
> Any news about having a mipmap generation thing directly into OSG? I cannot include code of VPB (LGPL) in my app (proprietary), and I do not think about linking to VPB just for mipmaps...
You obviously missed the news about GLU integration into the core OSG
that provides minmap generation without the need for a graphics
context, and a new NVTT plugin that provides mipmap generation and
texture compression without the need for graphics context.
The NVTT plugin is accessed via the osgDB::ImageProcessor interface
class. You can get the ImageProcessor from the osgDB::Registry via:
osgDB::ImageProcessor* ip = osgDB::Registry::instance()->getImageProcessor();
This will automatically load the NVTT if it's available.
VPB now uses this NVTT support, so doesn't required NVTT as an
external dependency, if you want NVTT support then you simply build
the OSG with it and VPB will pick the ImageProcessor implementation
automatically.
Robert.
I indeed missed the news. Many thanks.
However I don't understand one point: must I have NVTT to build mipmaps in my app (I do not use VBP, only OSG), or will the ImageProcessor default to another implementation if not found? Or is the NVTT source code directly integrated in OSG? (or am I wrong somewhere? ;) )
Cheers,
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
----- "Robert Osfield" <robert....@gmail.com> a écrit :
On Tue, Feb 1, 2011 at 12:06 PM, Sukender <suky...@free.fr> wrote:
> I indeed missed the news. Many thanks.
> However I don't understand one point: must I have NVTT to build mipmaps in my app (I do not use VBP, only OSG), or will the ImageProcessor default to another implementation if not found? Or is the NVTT source code directly integrated in OSG? (or am I wrong somewhere? ;) )
If all you want to do is generate mipmaps than you can use the OSG's
internal glu functions. It's been my intention to add a convenience
method into osg::Image to generate the mipmaps use the glu functions,
but I haven't had a chance to do this yet. All that needs to be do is
to use the custom gluScaleImage entry point to create the individual
mipmaps and assign them to the osg::Image.
If you want texture compression then you'll need the NVTT plugin and
use ImageProcessor.
Oh. Well, what I actually was loking for was the convenience method! And about compression, I already created some code using the libsquish directly...
So if I add NVTT when building OSG, I'll be able to generate mipmaps (as the convenience method would do) AND do compression?
Maybe I'll switch to NVTT (= drop libsquish as it is included) if so.
Thanks.
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
----- "Robert Osfield" <robert....@gmail.com> a écrit :
> Hi Sukender,
On Tue, Feb 1, 2011 at 12:36 PM, Sukender <suky...@free.fr> wrote:
> Oh. Well, what I actually was loking for was the convenience method!
You could always write it and submit it ;-)
It'd only be 10 to 20 lines of code, I'd tackle it right away if I
didn't have dozens of other TODO items on my list.
> And about compression, I already created some code using the libsquish directly...
> So if I add NVTT when building OSG, I'll be able to generate mipmaps (as the convenience method would do) AND do compression?
> Maybe I'll switch to NVTT (= drop libsquish as it is included) if so.
I briefly experiment with libsquish in VPB but didn't adopt it it
would require users to obtain a separate license for the S3TC patents.
NVTT comes with a license grant for the S3TC patents, there are still
few restrictions so it's worth reading up about it in the NVTT docs.
FYI, NVTT uses libsquish.
It'd also be possible to write an ImageProcessor implementation that
just uses libsquish, but as this doesn't change the patent situation
it probably isn't worth the effort writing until these parents expire,
or when software patents are declare void by governments/the courts.
> > Oh. Well, what I actually was loking for was the convenience
> method!
>
> You could always write it and submit it ;-)
>
> It'd only be 10 to 20 lines of code, I'd tackle it right away if I
> didn't have dozens of other TODO items on my list.
Well, same thing for me! This is why I didn't wrote it...
> > And about compression, I already created some code using the
> libsquish directly...
> > So if I add NVTT when building OSG, I'll be able to generate mipmaps
> (as the convenience method would do) AND do compression?
> > Maybe I'll switch to NVTT (= drop libsquish as it is included) if
> so.
>
> I briefly experiment with libsquish in VPB but didn't adopt it it
> would require users to obtain a separate license for the S3TC
> patents.
> NVTT comes with a license grant for the S3TC patents, there are still
> few restrictions so it's worth reading up about it in the NVTT docs.
> FYI, NVTT uses libsquish.
Yes, I knew NVTT included libsquish. However I did not find anything related to patents or such in the docs.
> It'd also be possible to write an ImageProcessor implementation that
> just uses libsquish, but as this doesn't change the patent situation
> it probably isn't worth the effort writing until these parents
> expire,
> or when software patents are declare void by governments/the courts.
Agreed.
Cheers,
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/