| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2002 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 00018 // $Id: textureunitsettinggl.h 6378 2008-06-02 13:30:09Z Konstantin_Baumann $ 00019 // $Date: 2008-06-02 15:30:09 +0200 (Mon, 02 Jun 2008) $ 00020 // $Revision: 6378 $ 00021 // $State$ 00022 // $Author: Konstantin_Baumann $ 00023 // 00024 // $Log$ 00025 // Revision 1.15 2005/09/20 09:36:11 baumann 00026 // visitor mechanism refined 00027 // 00028 // Revision 1.14 2005/06/16 16:38:04 baumann 00029 // acceptChildren() added 00030 // 00031 // Revision 1.13 2005/06/15 16:30:02 baumann 00032 // added methods SharedObj::isEqual() and SharedObj::IsEqual() (define operator==() in derived classes for a real implementaton) 00033 // 00034 // Revision 1.12 2005/01/03 01:43:10 klimetschek 00035 // - modified win32 project layout, splitted vrs.vcproj into vrs_container, vrs_core, vrs_sg, vrs_image, vrs_opengl and vrs_io 00036 // - removed vrs.vcproj 00037 // minor things: 00038 // - added all glutexamples to vrs4glut.sln 00039 // - fixed some problems in glutexamples 00040 // - removed all project references from all VS projects (using solution wide project dependencies instead) 00041 // 00042 // Revision 1.11 2004/11/03 14:45:07 saar 00043 // Class comment changed (Doxygen style) 00044 // 00045 // Revision 1.10 2004/03/12 16:28:41 baumann 00046 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00047 // 00048 // Revision 1.9 2004/01/19 11:43:58 baumann 00049 // serialization mechanism improved 00050 // 00051 // Revision 1.8 2003/11/07 14:19:25 kirsch 00052 // removed leading underscore from include guards 00053 // 00054 // Revision 1.7 2002/11/08 12:02:56 nienhaus 00055 // TextureUnitSettingGL uses TextureUnitSelectorGL explicitly to 00056 // indicate texture unit 00057 // 00058 // Revision 1.6 2002/11/07 18:03:14 nienhaus 00059 // code clean-up 00060 // 00061 // Revision 1.5 2002/11/07 16:05:42 baumann 00062 // code cleanup 00063 // 00064 // Revision 1.4 2002/11/07 16:00:56 kirsch 00065 // made default constructor protected 00066 // 00067 // Revision 1.3 2002/11/07 15:56:45 kirsch 00068 // do not include vrs.h 00069 // 00070 // Revision 1.2 2002/11/07 15:43:31 kirsch 00071 // gcc warnings fixed 00072 // 00073 // Revision 1.1 2002/11/07 14:35:21 nienhaus 00074 // initial check-in 00075 // 00076 00077 #ifndef VRS_OPENGL_TEXTUREUNITSETTINGGL_H_ 00078 #define VRS_OPENGL_TEXTUREUNITSETTINGGL_H_ 00079 00080 #include <vrs/monoattribute.h> 00081 #include <vrs/opengl/textureunitselectorgl.h> 00082 #include <vrs/opengl/texenvgl.h> 00083 #include <vrs/opengl/texgengl.h> 00084 #include <vrs/opengl/texturegl.h> 00085 00086 namespace VRS {; 00087 00089 class VRS_CORE_API TextureUnitSettingGL : public MonoAttribute { 00090 public: 00091 TextureUnitSettingGL(unsigned int unit, TextureGL* tex, TexEnvGL* env = 0,TexGenGL* gen = 0); 00100 bool operator==(const TextureUnitSettingGL& other) const; 00101 00102 unsigned int getUnit() const; 00103 void setUnit(unsigned int); 00104 TextureUnitSelectorGL* getUnitSelector() const; 00106 00107 void setTexture(TextureGL* texture); 00108 TextureGL* getTexture() const; 00110 00111 void setEnvironment(TexEnvGL* env); 00112 TexEnvGL* getEnvironment() const; 00114 00115 void setCoordGeneration(TexGenGL* gen); 00116 TexGenGL* getCoordGeneration() const; 00118 00119 VRS_TYPEINFO(TextureUnitSettingGL, MonoAttribute); 00120 VRS_SERIALIZABLE(TextureUnitSettingGL); 00121 00122 protected: 00123 TextureUnitSettingGL(); // for serialization 00124 00125 protected: 00126 virtual void acceptChildren(std::vector<Visitable*>& appendChildrenHere) const; 00127 00128 private: 00129 unsigned int unit_; 00130 SO<TextureGL> texture_; 00131 SO<TexEnvGL> environment_; 00132 SO<TexGenGL> generation_; 00133 SO<TextureUnitSelectorGL> unitSelector_; 00134 }; 00135 00136 inline unsigned int TextureUnitSettingGL::getUnit() const { return unit_; } 00137 00138 inline TextureUnitSelectorGL* TextureUnitSettingGL::getUnitSelector() const { return unitSelector_; } 00139 00140 inline TextureGL* TextureUnitSettingGL::getTexture() const { return texture_; } 00141 00142 inline TexEnvGL* TextureUnitSettingGL::getEnvironment() const { return environment_; } 00143 00144 inline TexGenGL* TextureUnitSettingGL::getCoordGeneration() const { return generation_; } 00145 00146 } // namespace VRS 00147 00148 #endif // VRS_OPENGL_TEXTUREUNITSETTINGGL_H_