Utility.h

00001 /***************************************************************************
00002  *   Copyright (c) 2008   Art Tevs                                         *
00003  *                                                                         *
00004  *   This library is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU Lesser General Public License as        *
00006  *   published by the Free Software Foundation; either version 3 of        *
00007  *   the License, or (at your option) any later version.                   *
00008  *                                                                         *
00009  *   This library is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU Lesse General Public License for more details.                    *
00013  *                                                                         *
00014  *   The full license is in LICENSE file included with this distribution.  *
00015  ***************************************************************************/
00016 
00017 #ifndef _C_OSGPPU__H_
00018 #define _C_OSGPPU__H_
00019 
00020 
00021 #include <osg/Uniform>
00022 #include <osg/Texture>
00023 
00024 #include <osgPPU/Export.h>
00025 
00026 /**
00027  * \namespace osgPPU
00028  * osgPPU module
00029  **/
00030 namespace osgPPU
00031 {
00032     /**
00033     * Utility function to derive source texture format from the internal format.
00034     * For example GL_RGB16F_ARB corresponds to GL_RGB
00035     **/
00036     OSGPPU_EXPORT GLenum createSourceTextureFormat(GLenum internalFormat);
00037 
00038     /**
00039     * Utility function to derive uniform type based on the given texture.
00040     **/
00041     OSGPPU_EXPORT osg::Uniform::Type convertTextureToUniformType(osg::Texture* tex);
00042 
00043     /**
00044     * Compute memory size in bytes, which is allocated by the texture.
00045     **/
00046     OSGPPU_EXPORT unsigned int computeTextureSizeInBytes(osg::Texture* tex);
00047 
00048 };
00049 
00050 #endif
00051 

Back to Homepage of osgPPU

Copyright (C) 2008 by Art Tevs (LGPL)