arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

texture.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////
00002 // 9/6/02       Aaron Lefohn    Scientific Computing and Imaging Institute
00003 // School of Computing          University of Utah
00004 //
00005 //  This library is free software; you can redistribute it and/or
00006 //  modify it under the terms of the GNU Lesser General Public
00007 //  License as published by the Free Software Foundation; either
00008 //  version 2.1 of the License, or (at your option) any later version.
00009 //
00010 //  This library is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 //  Lesser General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU Lesser General Public
00016 //  License along with this library; if not, write to the Free Software
00017 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 #ifndef GLIFT_BASE_TEXTURE_H
00020 #define GLIFT_BASE_TEXTURE_H
00021 
00022 #include "../state/stateGLI.h"
00023 #include <string>
00024 
00025 namespace glift {
00026 
00027 /////////////////////////////////////////////////////////////////////////
00028 /// Texture     - Base class for any texture class.
00029 ///                     - The parameter-checking functions should be redefined if the subclass
00030 ///               has different constraints than the default implementation.
00031 ///
00032 /// Base, abstract class for any texture
00033 class _export_ Texture : public StateGLI
00034 {
00035 public:
00036    virtual ~Texture() {}
00037    virtual int numTexUnits() const = 0;
00038 
00039    std::string getName()                 { return _name; }
00040    void        setName(std::string name) { _name = name; }
00041 
00042 protected:
00043    Texture(std::string name = std::string(""))
00044       : _name(name) {}
00045       virtual void bindDef() = 0;
00046       virtual void releaseDef() = 0;
00047 
00048       std::string _name;
00049 };
00050 
00051 } /// End of namespace glift
00052 
00053 #endif

Send questions, comments, and bug reports to:
jmk