openscenegraph
ImageProcessor
Go to the documentation of this file.
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
14#ifndef OSGDB_IMAGEPROCESSOR
15#define OSGDB_IMAGEPROCESSOR 1
16
17#include <osg/Object>
18
19namespace osgDB {
20
21class ImageProcessor : public osg::Object
22{
23 public:
24
25 ImageProcessor():
26 osg::Object(true) {}
27
28 ImageProcessor(const ImageProcessor& rw,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
29 osg::Object(rw,copyop) {}
30
31 virtual ~ImageProcessor() {}
32
33 META_Object(osgDB,ImageProcessor);
34
35 enum CompressionMethod
36 {
37 USE_CPU, /// Use CPU for compression even when GPU compression is available
38 USE_GPU /// Use GPU for compression when available (i.e CUDA), otherwise fallback to CPU
39 };
40
41 enum CompressionQuality
42 {
43 FASTEST,
44 NORMAL,
45 PRODUCTION,
46 HIGHEST
47 };
48
49 virtual void compress(osg::Image& /*image*/, osg::Texture::InternalFormatMode /*compressedFormat*/, bool /*generateMipMap*/, bool /*resizeToPowerOfTwo*/, CompressionMethod /*method*/, CompressionQuality /*quality*/) {}
50 virtual void generateMipMap(osg::Image& /*image*/, bool /*resizeToPowerOfTwo*/, CompressionMethod /*method*/) {}
51};
52
53}
54#endif