| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /********************************************************************** 00002 VRS - The Virtual Rendering System 00003 Copyright (C) 2001 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 00018 // $Id: imagecubemaptexturegl.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 2006/05/17 16:54:28 lorenz 00026 // added support for correct static (object relative) reflection maps 00027 // 00028 // Revision 1.14 2005/10/13 09:52:35 baumann 00029 // mipmap handling improved 00030 // 00031 // Revision 1.13 2005/09/25 15:30:39 baumann 00032 // acceptChildren() implemented 00033 // 00034 // Revision 1.12 2005/01/03 01:43:09 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:06 saar 00043 // Class comment changed (Doxygen style) 00044 // 00045 // Revision 1.10 2004/03/12 16:28:40 baumann 00046 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00047 // 00048 // Revision 1.9 2004/02/19 13:51:12 baumann 00049 // changed default wrap mode for cube maps from CLAMP to CLAMP_TO_EDGE 00050 // 00051 // Revision 1.8 2004/01/19 11:43:58 baumann 00052 // serialization mechanism improved 00053 // 00054 // Revision 1.7 2003/06/23 07:07:26 baumann 00055 // forward declaring VRS::Image 00056 // 00057 // Revision 1.6 2002/12/11 16:06:09 kirsch 00058 // use Matrix() instead of Matrix::identity in default constructor 00059 // 00060 // Revision 1.5 2002/11/13 07:20:50 baumann 00061 // changed TextureGL enum values to uppercase 00062 // added TextureGL::definesComponent() 00063 // 00064 // Revision 1.4 2002/07/02 15:23:48 baumann 00065 // non-persistent containers now have the prefix NonPersistent, e.g. NonPersistentArray<T> 00066 // persistent containers now have no prefix, e.g. Array<T> 00067 // 00068 // Revision 1.3 2002/04/24 20:05:36 guenther 00069 // fixed persistency: array -> persistentarray 00070 // 00071 // Revision 1.2 2002/04/07 17:14:11 baumann 00072 // Matrix::identity() changed to Matrix::identity 00073 // 00074 // Revision 1.1 2002/03/04 12:00:20 kersting 00075 // directory structure changes 00076 // 00077 // Revision 1.9 2002/03/03 21:44:26 kosta 00078 // VRS_TYPEINFO-macro rewritten 00079 // 00080 // Revision 1.8 2002/02/19 10:34:19 kosta 00081 // undone all changes since 2002-02-15 00082 // 00083 // Revision 1.5 2002/02/05 07:48:26 kosta 00084 // new persistency macros: 00085 // VRS_SERIALIZABLE(CLASS_NAME); 00086 // VRS_SERIALIZABLE_ABSTRACT_CLASS(CLASS_NAME); 00087 // VRS_SERIALIZABLE_NO_SO_CLASS(CLASS_NAME) 00088 // 00089 // Revision 1.4 2002/02/04 13:07:19 kosta 00090 // VRS_SERIALIZABLE macros completely rewritten 00091 // 00092 // Revision 1.3 2002/02/04 09:42:23 kirsch 00093 // Changed orientation of cube map images to match OpenGL specs, 00094 // added wrapping modes for cube maps 00095 // 00096 // Revision 1.2 2002/01/15 16:25:55 kosta 00097 // macros rewritten for a better namespace support 00098 // 00099 // Revision 1.1 2002/01/08 16:02:49 kosta 00100 // dir structure for textures changed 00101 // 00102 // Revision 1.4 2001/11/21 10:25:38 nienhaus 00103 // combine mode moved to opengl texture environment attribute 00104 // 00105 // Revision 1.3 2001/11/13 16:36:31 kirsch 00106 // changed line feed to unix style (removed control-M) 00107 // 00108 // Revision 1.2 2001/08/20 15:07:58 kersting 00109 // added classname to enumeration 00110 // 00111 // Revision 1.1 2001/07/25 21:27:46 kosta 00112 // new texture mechanism implemented 00113 // 00114 00115 #ifndef VRS_OPENGL_TEXTURE_IMAGECUBEMAPTEXTUREGL_H 00116 #define VRS_OPENGL_TEXTURE_IMAGECUBEMAPTEXTUREGL_H 00117 00118 #include <vrs/opengl/cubemaptexturegl.h> 00119 #include <vrs/container/array.h> 00120 #include <vrs/image/image.h> 00121 00122 namespace VRS { 00123 00124 class Image; 00125 00127 class VRS_CORE_API ImageCubeMapTextureGL : public CubeMapTextureGL { 00128 public: 00129 ImageCubeMapTextureGL( 00130 Image* right, Image* left, 00131 Image* top, Image* bottom, 00132 Image* front, Image* back, 00133 TextureGL::WrapMode wrap = TextureGL::CLAMP_TO_EDGE, 00134 TextureGL::FilterMode minFilter = TextureGL::TRILINEAR, 00135 TextureGL::FilterMode magFilter = TextureGL::LINEAR, 00136 GLfloat anisotropic = 1.0, 00137 const Matrix& matrix = Matrix(), 00138 GLenum internalFormat = GL_ZERO, 00139 bool isObjectRelativeReflectionMap = false 00140 ); 00141 00142 ImageCubeMapTextureGL( 00143 Iterator<SO<Image> >* images, 00144 TextureGL::WrapMode wrap = TextureGL::CLAMP_TO_EDGE, 00145 TextureGL::FilterMode minFilter = TextureGL::TRILINEAR, 00146 TextureGL::FilterMode magFilter = TextureGL::LINEAR, 00147 GLfloat anisotropic = 1.0, 00148 const Matrix& matrix = Matrix(), 00149 GLenum internalFormat = GL_ZERO, 00150 bool isObjectRelativeReflectionMap = false 00151 ); 00153 00160 virtual Image* getImage(CubeMapTextureGL::Side side) const; 00161 virtual void setImage(CubeMapTextureGL::Side side, Image* image); 00162 virtual Iterator<SO<Image> >* getImages() const; 00163 virtual void setImages(Iterator<SO<Image> >* images, GLenum internalFormat = GL_ZERO); 00164 00165 virtual GLenum getInternalFormat() const; 00166 00167 VRS_TYPEINFO(ImageCubeMapTextureGL, CubeMapTextureGL); 00168 VRS_SERIALIZABLE(ImageCubeMapTextureGL); 00169 00170 protected: 00171 ImageCubeMapTextureGL(); // only for serialization!!! 00172 00173 virtual void acceptChildren(std::vector<Visitable*>& appendChildrenHere) const; 00174 00175 private: 00176 SO<Array<SO<Image> > > images_; 00177 }; 00178 00179 } // namespace VRS 00180 00181 #endif // VRS_OPENGL_TEXTURE_IMAGECUBEMAPTEXTUREGL_H