Add more structure constructor tests.
[piglit/hramrach.git] / tests / glean / ttexenv.h
blob6cf1f1e99cb17c8ad44d0cc3870aa71b89b247b2
1 // BEGIN_COPYRIGHT -*- glean -*-
2 //
3 // Copyright (C) 1999 Allen Akin All Rights Reserved.
4 //
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
12 // conditions:
13 //
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the
16 // Software.
17 //
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.
26 //
27 // END_COPYRIGHT
30 // ttexenv.h: Test the basic texture env modes
31 // Author: Brian Paul (brianp@valinux.com) April 2001
34 #ifndef __ttexenv_h__
35 #define __ttexenv_h__
37 #include "tbasic.h"
39 namespace GLEAN {
41 class TexEnvTest: public BasicTest {
42 public:
43 TexEnvTest(const char* testName, const char* filter,
44 const char* description):
45 BasicTest(testName, filter, description) {
48 virtual void runOne(BasicResult& r, Window& w);
49 virtual void logOne(BasicResult& r);
51 private:
52 bool TestColor(const GLfloat c1[3], const GLfloat c2[3]);
53 void ComputeExpectedColor(GLenum envMode, GLenum texFormat,
54 const GLfloat texColor[4], const GLfloat fragColor[4],
55 const GLfloat envColor[4], GLfloat result[4]);
56 void MakeTexImage(GLenum baseFormat, int numColors,
57 const GLfloat colors[][4]);
58 bool MatrixTest(GLenum envMode, GLenum texFormat,
59 const char *envName, const char *formatName,
60 int numColors, const GLfloat colors[][4],
61 const GLfloat envColor[4], Window &w);
62 GLfloat mTolerance[3];
64 }; // class TexEnvTest
66 } // namespace GLEAN
68 #endif // __ttexenv_h__