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

gutzAttrib.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////
00002 // 6/19/03      Joe Kniss       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_GUTZATTRIB_DOT_H
00020 #define __GLIFT_GUTZATTRIB_DOT_H
00021 
00022 #include <mathGutz.h>
00023 
00024 namespace glift {
00025 
00026 /////////////////////////////////////////////////////////////////////////
00027 ///
00028 ///@name some handy structs for mapping gutz features to glift types
00029 ///@{
00030 
00031 template<
00032    class SYST,
00033    class STORT,
00034    int   SZ,
00035    int   GLENUMVAL
00036 >
00037 struct GutzAttrib {
00038    typedef SYST    SYSTYPE;
00039    typedef STORT   STORTYPE;
00040    enum {
00041       DIM = SZ
00042    };
00043    enum {
00044       GLTYPE = GLENUMVAL
00045    };
00046 };
00047 
00048 typedef GutzAttrib<double,double,      1,GL_DOUBLE> DoubleV1A;
00049 typedef GutzAttrib<double,gutz::vec2d, 2,GL_DOUBLE> DoubleV2A;
00050 typedef GutzAttrib<double,gutz::vec3d, 3,GL_DOUBLE> DoubleV3A;
00051 typedef GutzAttrib<double,gutz::vec4d, 4,GL_DOUBLE> DoubleV4A;
00052 
00053 typedef GutzAttrib<float,float,      1,GL_FLOAT> FloatV1A;
00054 typedef GutzAttrib<float,gutz::vec2f,2,GL_FLOAT> FloatV2A;
00055 typedef GutzAttrib<float,gutz::vec3f,3,GL_FLOAT> FloatV3A;
00056 typedef GutzAttrib<float,gutz::vec4f,4,GL_FLOAT> FloatV4A;
00057 
00058 typedef GutzAttrib<int,int,        1,GL_INT> IntV1A;
00059 typedef GutzAttrib<int,gutz::vec2i,2,GL_INT> IntV2A;
00060 typedef GutzAttrib<int,gutz::vec3i,3,GL_INT> IntV3A;
00061 typedef GutzAttrib<int,gutz::vec4i,4,GL_INT> IntV4A;
00062 
00063 typedef GutzAttrib<unsigned int,unsigned int,1,GL_UNSIGNED_INT> UIntV1A;
00064 typedef GutzAttrib<unsigned int,gutz::vec2ui,2,GL_UNSIGNED_INT> UIntV2A;
00065 typedef GutzAttrib<unsigned int,gutz::vec3ui,3,GL_UNSIGNED_INT> UIntV3A;
00066 typedef GutzAttrib<unsigned int,gutz::vec4ui,4,GL_UNSIGNED_INT> UIntV4A;
00067 
00068 typedef GutzAttrib<short,short,1,GL_SHORT>       ShortV1A;
00069 typedef GutzAttrib<short,gutz::vec2s,2,GL_SHORT> ShortV2A;
00070 typedef GutzAttrib<short,gutz::vec3s,3,GL_SHORT> ShortV3A;
00071 typedef GutzAttrib<short,gutz::vec4s,4,GL_SHORT> ShortV4A;
00072 
00073 typedef GutzAttrib<unsigned short,unsigned short,1,GL_UNSIGNED_SHORT> UShortV1A;
00074 typedef GutzAttrib<unsigned short,gutz::vec2us,  2,GL_UNSIGNED_SHORT> UShortV2A;
00075 typedef GutzAttrib<unsigned short,gutz::vec3us,  3,GL_UNSIGNED_SHORT> UShortV3A;
00076 typedef GutzAttrib<unsigned short,gutz::vec4us,  4,GL_UNSIGNED_SHORT> UShortV4A;
00077 
00078 typedef GutzAttrib<char,char, 1,GL_BYTE> ByteV1A;
00079 typedef GutzAttrib<char,gutz::vec2b,2,GL_BYTE> ByteV2A;
00080 typedef GutzAttrib<char,gutz::vec3b,3,GL_BYTE> ByteV3A;
00081 typedef GutzAttrib<char,gutz::vec4b,4,GL_BYTE> ByteV4A;
00082 
00083 typedef GutzAttrib<unsigned char,unsigned char, 1,GL_UNSIGNED_BYTE> UByteV1A;
00084 typedef GutzAttrib<unsigned char,gutz::vec2b,   2,GL_UNSIGNED_BYTE> UByteV2A;
00085 typedef GutzAttrib<unsigned char,gutz::vec3b,   3,GL_UNSIGNED_BYTE> UByteV3A;
00086 typedef GutzAttrib<unsigned char,gutz::vec4b,   4,GL_UNSIGNED_BYTE> UByteV4A;
00087 
00088 ///@}
00089 
00090 }//end namespace gutz
00091 
00092 #endif
00093 

Send questions, comments, and bug reports to:
jmk