1 // BEGIN_COPYRIGHT -*- glean -*-
4 * Copyright (C) 2007 Intel Coporation All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person
7 * obtaining a copy of this software and associated documentation
8 * files (the "Software"), to deal in the Software without
9 * restriction, including without limitation the rights to use,
10 * copy, modify, merge, publish, distribute, sublicense, and/or
11 * sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
20 * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
21 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22 * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ALLEN AKIN BE
23 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
25 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 * DEALINGS IN THE SOFTWARE.
30 // tpointsprite.h: Test basic ARB_point_sprite support.
31 // Author: Nian Wu <nian.wu@intel.com>
34 #ifndef __tpointsprite_h__
35 #define __tpointsprite_h__
37 #include "tmultitest.h"
43 class PointSpriteTest
: public MultiTest
46 PointSpriteTest(const char* testName
, const char* filter
,
47 const char *extensions
, const char* description
):
48 MultiTest(testName
, filter
, extensions
, description
){
51 virtual void runOne(MultiTestResult
&r
, Window
&w
);
54 GLfloat
*texImages
[6];
55 GLfloat mTolerance
[3];
59 void SetupMipmap(GLuint
*texID
);
60 void CheckDefaultState(MultiTestResult
&r
);
61 void CalculateTolerance();
62 GLboolean
OutOfPoint(int x
, int y
, int pSize
, int x0
, int y0
);
63 GLfloat
*GetTexColor(int pSize
, int dir
);
64 GLboolean
CompareColor(GLfloat
*actual
, GLfloat
*expected
);
65 GLboolean
ComparePixels(GLfloat
*buf
, int pSize
, GLenum coordOrigin
);
66 }; // class PointSpriteTest
70 #endif // __tpointsprite_h__