[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd gl_helpers.h
From: |
Gerhard Reitmayr |
Subject: |
[libcvd-members] libcvd/cvd gl_helpers.h |
Date: |
Wed, 16 Dec 2009 14:36:30 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Gerhard Reitmayr <gerhard> 09/12/16 14:36:30
Modified files:
cvd : gl_helpers.h
Log message:
glRect interface
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/gl_helpers.h?cvsroot=libcvd&r1=1.42&r2=1.43
Patches:
Index: gl_helpers.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/gl_helpers.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- gl_helpers.h 14 Apr 2009 12:57:53 -0000 1.42
+++ gl_helpers.h 16 Dec 2009 14:36:30 -0000 1.43
@@ -94,6 +94,15 @@
glEnd();
}
+ /// Draws a rectangle by specifing two opposing vertices
+ /// @param p the first vertex
+ /// @param q the second vertex
+ /// @ingroup gGL
+ inline void glRect( const ImageRef & p, const ImageRef & q)
+ {
+ glRecti(p.x, p.y, q.x, q.y);
+ }
+
#ifdef CVD_HAVE_TOON
/// Specify the (x,y) co-ordinates of a vertex
/// @param v The vertex location
@@ -143,6 +152,15 @@
glTexCoord4d(v[0], v[1], v[2], v[3]);
}
+ /// Draws a rectangle by specifing two opposing vertices
+ /// @param p the first vertex
+ /// @param q the second vertex
+ /// @ingroup gGL
+ inline void glRect( const TooN::Vector<2> & p, const TooN::Vector<2> &
q)
+ {
+ glRectd(p[0], p[1], q[0], q[1]);
+ }
+
#ifdef GL_GLEXT_PROTOTYPES
/// Specify the (s,t) texture coordinates for a specific texture unit
/// @param v The texture coordinates
- [libcvd-members] libcvd/cvd gl_helpers.h,
Gerhard Reitmayr <=