00001 /* 00002 File: VLgl.h 00003 00004 Purpose: Provides some handy wrappers for using svl with 00005 OpenGL. 00006 */ 00007 00008 #ifndef __VLgl__ 00009 #define __VLgl__ 00010 00011 00012 #ifdef VL_FLOAT 00013 00014 inline Void glVertex(const Vec2 &a) 00015 { glVertex2fv(a.Ref()); } 00016 00017 inline Void glVertex(const Vec3 &a) 00018 { glVertex3fv(a.Ref()); } 00019 00020 inline Void glVertex(const Vec4 &a) 00021 { glVertex4fv(a.Ref()); } 00022 00023 inline Void glColor(const Vec2 &a) 00024 { glColor2fv(a.Ref()); } 00025 00026 inline Void glColor(const Vec3 &a) 00027 { glColor3fv(a.Ref()); } 00028 00029 inline Void glColor(const Vec4 &a) 00030 { glColor4fv(a.Ref()); } 00031 00032 inline Void glNormal(const Vec2 &a) 00033 { glNormal2fv(a.Ref()); } 00034 00035 inline Void glNormal(const Vec3 &a) 00036 { glNormal3fv(a.Ref()); } 00037 00038 inline Void glNormal(const Vec4 &a) 00039 { glNormal4fv(a.Ref()); } 00040 00041 #else 00042 00043 inline Void glVertex(const Vec2 &a) 00044 { glVertex2dv(a.Ref()); } 00045 00046 inline Void glVertex(const Vec3 &a) 00047 { glVertex3dv(a.Ref()); } 00048 00049 inline Void glVertex(const Vec4 &a) 00050 { glVertex4dv(a.Ref()); } 00051 00052 inline Void glColor(const Vec2 &a) 00053 { glColor2dv(a.Ref()); } 00054 00055 inline Void glColor(const Vec3 &a) 00056 { glColor3dv(a.Ref()); } 00057 00058 inline Void glColor(const Vec4 &a) 00059 { glColor4dv(a.Ref()); } 00060 00061 inline Void glNormal(const Vec2 &a) 00062 { glNormal2dv(a.Ref()); } 00063 00064 inline Void glNormal(const Vec3 &a) 00065 { glNormal3dv(a.Ref()); } 00066 00067 inline Void glNormal(const Vec4 &a) 00068 { glNormal4dv(a.Ref()); } 00069 00070 00071 #endif 00072 00073 #endif