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

# OgreILCodecs.cpp

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004 (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright © 2000-2002 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023 -----------------------------------------------------------------------------
    00024 */
    00025 #include "OgreStableHeaders.h"
    00026
    00027 #include "OgreImage.h"
    00028 #include "OgreCodec.h"
    00029 #include "OgreException.h"
    00030 #include "OgreILImageCodec.h"
    00031 #include "OgreILCodecs.h"
    00032
    00033 #include <IL/il.h>
    00034 #include <IL/ilu.h>
    00035
    00036 namespace Ogre {
    00037
    00038     Codec *ILCodecs::mPNGCodec;
    00039     Codec *ILCodecs::mJPGCodec;
    00040     Codec *ILCodecs::mJPEGCodec;
    00041     Codec *ILCodecs::mTGACodec;
    00042     Codec *ILCodecs::mDDSCodec;
    00043     Codec *ILCodecs::mBMPCodec;
    00044
    00045     void ILCodecs::registerCodecs(void) {
    00046         mPNGCodec = new PNGCodec;
    00047         Codec::registerCodec( mPNGCodec );
    00048         mJPEGCodec = new JPEGCodec;
    00049         Codec::registerCodec( mJPEGCodec );
    00050         mTGACodec = new TGACodec;
    00051         Codec::registerCodec( mTGACodec );
    00052         mDDSCodec = new DDSCodec;
    00053         Codec::registerCodec( mDDSCodec );
    00054         mJPGCodec = new JPGCodec;
    00055         Codec::registerCodec( mJPGCodec );
    00056         mBMPCodec = new BMPCodec;
    00057         Codec::registerCodec( mBMPCodec );
    00058     }
    00059
    00060     void ILCodecs::deleteCodecs(void) {
    00061         delete mBMPCodec;
    00062         delete mDDSCodec;
    00063         delete mTGACodec;
    00064         delete mJPGCodec;
    00065         delete mJPEGCodec;
    00066         delete mPNGCodec;
    00067     }
    00068
    00069     //---------------------------------------------------------------------
    00070     unsigned int BMPCodec::getILType(void) const
    00071     {
    00072         return IL_BMP;
    00073     }
    00074
    00075     //---------------------------------------------------------------------
    00076     unsigned int TGACodec::getILType(void) const
    00077     {
    00078         return IL_TGA;
    00079     }
    00080
    00081     //---------------------------------------------------------------------
    00082     unsigned int JPEGCodec::getILType(void) const
    00083     {
    00084         return IL_JPG;
    00085     }
    00086
    00087     //---------------------------------------------------------------------
    00088     unsigned int DDSCodec::getILType(void) const
    00089     {
    00090         return IL_DDS;
    00091     }
    00092
    00093     //---------------------------------------------------------------------
    00094     unsigned int PNGCodec::getILType(void) const
    00095     {
    00096         return IL_PNG;
    00097     }
    00098
    00099 }
    00100

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:29 2004