libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd/cvd gl_helpers.h


From: Edward Rosten
Subject: [libcvd-members] libcvd/cvd gl_helpers.h
Date: Thu, 14 Dec 2006 00:45:32 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        06/12/14 00:45:32

Modified files:
        cvd            : gl_helpers.h 

Log message:
        glClearColor helper to match glColor

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/gl_helpers.h?cvsroot=libcvd&r1=1.27&r2=1.28

Patches:
Index: gl_helpers.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/gl_helpers.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- gl_helpers.h        28 Nov 2006 11:08:29 -0000      1.27
+++ gl_helpers.h        14 Dec 2006 00:45:31 -0000      1.28
@@ -334,6 +334,26 @@
                glColor4d(v[0], v[1], v[2], v[3]);
        }
 
+       /// Set the new clear colour to the red, green, blue and alpha 
components given in the Vector
+       /// (where 0.0 represents zero intensity and 1.0 full intensity)
+       /// @param v The new colour
+       ///@ingroup gGL
+       inline void glClearColor(const TooN::Vector<4>& v)
+       {
+               ::glClearColor((GLclampf)v[0], (GLclampf)v[1], (GLclampf)v[2], 
(GLclampf)v[3]);
+       }
+
+       /// Set the new clear colour to the red, green, blue components given 
in the Vector
+       /// alpha is set to 0
+       /// @param v The new colour
+       ///@ingroup gGL
+       inline void glClearColor(const TooN::Vector<3>& v)
+       {
+               ::glClearColor((GLclampf)v[0], (GLclampf)v[1], (GLclampf)v[2], 
0);
+       }
+
+
+
        /// glColor version for dynamic TooN::Vector, will test for 3 or 4 
components
        /// @param v The new colour
        /// @ingroup gGL




reply via email to

[Prev in Thread] Current Thread [Next in Thread]