diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-03-21 15:53:24 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-05 17:17:51 +0100 |
commit | 28f2baea42e44011c23b89473028b9bfc0376c00 (patch) | |
tree | 3f822c19c76f697e5a134ac0fad9b019223410fc /src | |
parent | 14989ee5a4bf1c60cb1455500f3dfabfa22441cb (diff) | |
download | usdx-28f2baea42e44011c23b89473028b9bfc0376c00.tar.gz usdx-28f2baea42e44011c23b89473028b9bfc0376c00.tar.xz usdx-28f2baea42e44011c23b89473028b9bfc0376c00.zip |
utils/rectangle: added constructor for array of values
the new constructor is used to make a rectangle object from the array
of values returned from glGet(GL_SCISSOR_BOX)
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/rectangle.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp index abe26ef1..2131afc8 100644 --- a/src/utils/rectangle.hpp +++ b/src/utils/rectangle.hpp @@ -63,6 +63,12 @@ namespace usdx { } + Rectangle(const T rectangle[]) : + point1(rectangle[0], rectangle[1]), + point2(rectangle[0] + rectangle[2], rectangle[1] + rectangle[3]) + { + } + Rectangle(const Rectangle<T>& rectangle) : point1(rectangle.point1), point2(rectangle.point2) { |