• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ESEXTCTEXTUREBORDERCLAMPPARAMETERBORDERCOLORERROR_HPP
2 #define _ESEXTCTEXTUREBORDERCLAMPPARAMETERBORDERCOLORERROR_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2014-2016 The Khronos Group Inc.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */ /*!
22  * \file
23  * \brief
24  */ /*-------------------------------------------------------------------*/
25 
26 /*!
27  * \file esextcTextureBorderClampParameterBorderColorError.hpp
28  * \brief Texture Border Clamp Border Color Error (Test 1)
29  */ /*-------------------------------------------------------------------*/
30 
31 #include "esextcTextureBorderClampBase.hpp"
32 
33 namespace glcts
34 {
35 
36 /** Implementation of Test 1 from CTS_EXT_texture_border_clamp. Description follows
37  *
38  *   Verify glTexParameterf(), glTexParameteri(), glSamplerParameterf(),
39  *   glSamplerParameteri() report errors as per spec.
40  *
41  *   Category: Negative tests,
42  *             Optional dependency on EXT_texture_cube_map_array.
43  *   Priority: Must-have.
44  *
45  *   Make sure that the functions report GL_INVALID_ENUM if
46  *   each function is called for GL_TEXTURE_BORDER_COLOR_EXT texture
47  *   parameter.
48  *
49  *   All texture targets available in ES3.1, as well as
50  *   GL_TEXTURE_CUBE_MAP_ARRAY_EXT (if supported) should be checked
51  */
52 class TextureBorderClampParameterBorderColorErrorTest : public TextureBorderClampBase
53 {
54 public:
55 	/* Public functions */
56 	TextureBorderClampParameterBorderColorErrorTest(Context& context, const ExtParameters& extParams, const char* name,
57 													const char* description);
58 
~TextureBorderClampParameterBorderColorErrorTest()59 	virtual ~TextureBorderClampParameterBorderColorErrorTest()
60 	{
61 	}
62 
63 	virtual void		  deinit(void);
64 	virtual IterateResult iterate(void);
65 
66 private:
67 	/* Private functions */
68 	void initTest(void);
69 
70 	void VerifyGLTexParameterf(glw::GLenum target, glw::GLenum pname, glw::GLfloat param, glw::GLenum expected_error);
71 
72 	void VerifyGLTexParameteri(glw::GLenum target, glw::GLenum pname, glw::GLint param, glw::GLenum expected_error);
73 
74 	void VerifyGLSamplerParameterf(glw::GLenum pname, glw::GLfloat param, glw::GLenum expected_error);
75 
76 	void VerifyGLSamplerParameteri(glw::GLenum pname, glw::GLint param, glw::GLenum expected_error);
77 
78 	/* Private variables */
79 	glw::GLuint	m_sampler_id;
80 	glw::GLboolean m_test_passed;
81 
82 	/* Private static variables */
83 	static const glw::GLuint m_texture_unit;
84 };
85 
86 } // namespace glcts
87 #endif // _ESEXTCTEXTUREBORDERCLAMPPARAMETERBORDERCOLORERROR_HPP
88