1 // BEGIN_COPYRIGHT -*- glean -*-
3 // Copyright (C) 1999 Allen Akin All Rights Reserved.
5 // Permission is hereby granted, free of charge, to any person
6 // obtaining a copy of this software and associated documentation
7 // files (the "Software"), to deal in the Software without
8 // restriction, including without limitation the rights to use,
9 // copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
19 // KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20 // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ALLEN AKIN BE
22 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 // DEALINGS IN THE SOFTWARE.
30 // tpgos.h: Polygon offset tests.
31 // Derived in part from tests written by Angus Dorbie <dorbie@sgi.com>
32 // in September 2000 and Rickard E. (Rik) Faith <faith@valinux.com> in
43 // Auxiliary struct for holding a glPolygonOffset result
44 class POResult
: public BaseResult
{
55 bool slopeOffsetsPassed
;
71 smallEnoughMRD
= true;
72 slopeOffsetsPassed
= true;
74 failingAxis
[0] = failingAxis
[1] = failingAxis
[2] = 0.0;
80 void putresults(ostream
& s
) const {
83 << nextToNear
<< ' ' << nextToFar
<< '\n'
84 << idealMRDNear
<< ' ' << idealMRDFar
<< '\n'
85 << actualMRDNear
<< ' ' << actualMRDFar
<< '\n'
86 << bigEnoughMRD
<< ' ' << smallEnoughMRD
<< '\n'
87 << slopeOffsetsPassed
<< '\n'
88 << failingAngle
<< '\n'
89 << failingAxis
[0] << ' ' << failingAxis
[1] << ' '
90 << failingAxis
[2] << '\n'
91 << failingOffset
<< ' ' << minGoodOffset
<< ' '
92 << maxGoodOffset
<< '\n'
96 bool getresults(istream
& s
) {
106 >> slopeOffsetsPassed
108 >> failingAxis
[0] >> failingAxis
[1] >> failingAxis
[2]
109 >> failingOffset
>> minGoodOffset
>> maxGoodOffset
115 #define PGOS_WIN_SIZE 128
117 class PgosTest
: public BaseTest
<POResult
> {
119 GLEAN_CLASS_WH(PgosTest
, POResult
, PGOS_WIN_SIZE
, PGOS_WIN_SIZE
);
124 #endif // __tpgos_h__