| 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, Potsdam, Germany. 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 This library is distributed in the hope that it will be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 See the GNU Lesser General Public License for more details. 00013 You should have received a copy of the GNU Lesser+ General Public 00014 License along with this library; if not, write to the FreeSoftware 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00016 **********************************************************************/ 00017 // $Id: $ 00018 // 00019 // $Log: $ 00020 00021 #ifndef VRS_GL2_SHADERTEXTUREUNITSELECTOR_H_ 00022 #define VRS_GL2_SHADERTEXTUREUNITSELECTOR_H_ 00023 00024 // 00025 // VRS 00026 // 00027 #include <vrs/monoattribute.h> 00028 #include <vrs/opengl/textureunitselectorgl.h> 00029 00030 00031 namespace VRS 00032 { 00033 namespace GL2 00034 { 00036 00041 class VRS_CORE_API ShaderTextureUnitSelector : public TextureUnitSelectorGL 00042 { 00043 public: 00044 00046 enum TextureTarget 00047 { 00048 VertexShader = 0, 00049 FragmentShader = 1, 00050 Combined = 2, 00051 00052 };//endenum TextureTarget 00053 VRS_SERIALIZABLE_CLASS_ENUM(TextureTarget); 00054 00055 00056 ShaderTextureUnitSelector(unsigned int unit = 0, TextureTarget textureTarget = Combined); 00057 00059 bool operator==(const ShaderTextureUnitSelector& other) const; 00060 00062 inline unsigned int getTextureTarget(void) const 00063 { 00064 return this->textureTarget_; 00065 } 00067 void setTextureTarget(TextureTarget textureTarget); 00068 00069 VRS_TYPEINFO(ShaderTextureUnitSelector, TextureUnitSelectorGL); 00070 VRS_SERIALIZABLE(ShaderTextureUnitSelector); 00071 00072 private: 00073 00074 TextureTarget textureTarget_; 00075 00076 };//endclass ShaderTextureUnitSelector 00077 00078 }//endnamespace GL2 00079 00080 }//endnamespace VRS 00081 00082 #endif // VRS_GL2_SHADERTEXTUREUNITSELECTOR_H_