ImageProcessor 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
  2. *
  3. * This library is open source and may be redistributed and/or modified under
  4. * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
  5. * (at your option) any later version. The full license is in LICENSE file
  6. * included with this distribution, and on the openscenegraph.org website.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * OpenSceneGraph Public License for more details.
  12. */
  13. #ifndef OSGDB_IMAGEPROCESSOR
  14. #define OSGDB_IMAGEPROCESSOR 1
  15. #include <osg/Object>
  16. namespace osgDB {
  17. class ImageProcessor : public osg::Object
  18. {
  19. public:
  20. ImageProcessor():
  21. osg::Object(true) {}
  22. ImageProcessor(const ImageProcessor& rw,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
  23. osg::Object(rw,copyop) {}
  24. virtual ~ImageProcessor() {}
  25. META_Object(osgDB,ImageProcessor);
  26. enum CompressionMethod
  27. {
  28. USE_CPU, /// Use CPU for compression even when GPU compression is available
  29. USE_GPU /// Use GPU for compression when available (i.e CUDA), otherwise fallback to CPU
  30. };
  31. enum CompressionQuality
  32. {
  33. FASTEST,
  34. NORMAL,
  35. PRODUCTION,
  36. HIGHEST
  37. };
  38. virtual void compress(osg::Image& /*image*/, osg::Texture::InternalFormatMode /*compressedFormat*/, bool /*generateMipMap*/, bool /*resizeToPowerOfTwo*/, CompressionMethod /*method*/, CompressionQuality /*quality*/) {}
  39. virtual void generateMipMap(osg::Image& /*image*/, bool /*resizeToPowerOfTwo*/, CompressionMethod /*method*/) {}
  40. };
  41. }
  42. #endif