Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglLoadImage_sgi.hpp

00001 /*****************************************************************************
00002  * SGL: A Scene Graph Library
00003  *
00004  * Copyright (C) 1997-2001  Scott McMillan   All Rights Reserved.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  *****************************************************************************
00020  *     File: sglLoadImage_sgi.hpp
00021  *   Author: Toms Stimson
00022  *  Created: 26 March 2001
00023  *  Summary: read SGI format images
00024  *****************************************************************************/
00025 
00026 #ifndef __SGL_LOAD_IMAGE_SGI_HPP
00027 #define __SGL_LOAD_IMAGE_SGI_HPP
00028 
00029 #include <sgldb.h>
00030 #include <sglTexture.hpp>
00031 
00032 // Helper function to load a .sgi, .rgb, .rgba, .int, .inta, or .bw file.
00033 // Returns a pointer to the data and sets the number of components and size
00034 // parameters.  Will return NULL if there was a problem loading the image
00035 extern "C"
00036 {
00037    SGLDB_DLL_API void *loadImageSGI(const string &filepath,
00038                                     unsigned int &width,
00039                                     unsigned int &height,
00040                                     sglTexture::ExternalFormatEnum &format,
00041                                     sglTexture::TypeEnum &type);
00042 }
00043 
00044 
00045 // Helper function to write a .sgi, .rgb, .rgba, .int, .inta, or .bw file.
00046 // Returns false if an error occured while writing the file.
00047 extern "C"
00048 {
00049    SGLDB_DLL_API bool writeImageSGI(const string &filepath,
00050                                     const void *image,
00051                                     unsigned int width,
00052                                     unsigned int height,
00053                                     sglTexture::ExternalFormatEnum format,
00054                                     sglTexture::TypeEnum type);
00055 }
00056 #endif

Generated at Mon Jul 1 18:00:05 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001