• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ESEXTCTEXTURECUBEMAPARRAYTEX3DVALIDATION_HPP
2 #define _ESEXTCTEXTURECUBEMAPARRAYTEX3DVALIDATION_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  esextcTextureCubeMapArrayTex3DValidation.hpp
28  * \brief texture_cube_map_array extension - Tex3DValidation (Test 4)
29  */ /*-------------------------------------------------------------------*/
30 
31 #include "../esextcTestCaseBase.hpp"
32 
33 namespace glcts
34 {
35 /** Implementation of Test 4 from CTS_EXT_texture_cube_map_array.
36  *   Test description follows:
37  *
38  *   Make sure specified errors are generated if glTexImage3D() or glTexStorage3D()
39  *   is called for a GL_TEXTURE_CUBE_MAP_ARRAY_EXT texture target with invalid
40  *   arguments
41  *
42  *   Category: Coverage.
43  *   Priority: Must-have.
44  *
45  *   Make sure that GL_INVALID_VALUE error is generated if glTexImage3D() or
46  *   glTexStorage3D() is called for GL_TEXTURE_CUBE_MAP_ARRAY_EXT texture target,
47  *   and width or height arguments are not equal.
48  *   Make sure that GL_INVALID_VALUE error is generated if glTexImage3D() or
49  *   glTexStorage3D() is called for GL_TEXTURE_CUBE_MAP_ARRAY_EXT texture target,
50  *   and depth is not a multiple of six.
51  *   Make sure GL_INVALID_OPERATION error is generated by glTexStorage3D(),
52  *   if the function is called for GL_TEXTURE_CUBE_MAP_ARRAY_EXT texture target,
53  *   and levels argument is greater than floor(log2(max(width, height))) + 1;
54  **/
55 class TextureCubeMapArrayTex3DValidation : public TestCaseBase
56 {
57 public:
58 	/* Public methods */
59 	TextureCubeMapArrayTex3DValidation(Context& context, const ExtParameters& extParams, const char* name,
60 									   const char* description);
61 
~TextureCubeMapArrayTex3DValidation(void)62 	virtual ~TextureCubeMapArrayTex3DValidation(void)
63 	{
64 	}
65 
66 	virtual void		  deinit(void);
67 	virtual IterateResult iterate(void);
68 
69 private:
70 	/* Private methods */
71 	bool checkError(glw::GLint expectedError, const char* message);
72 	void createTexture(void);
73 	void deleteTexture(void);
74 
75 	/* Private variables */
76 	glw::GLuint m_to_id;
77 };
78 
79 } /* glcts */
80 
81 #endif // _ESEXTCTEXTURECUBEMAPARRAYTEX3DVALIDATION_HPP
82