1 #ifndef _ESEXTCTEXTUREBORDERCLAMPBASE_HPP
2 #define _ESEXTCTEXTUREBORDERCLAMPBASE_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  esextcTextureBorderClampBase.hpp
28  * \brief Base Class for Texture Border Clamp extension tests 1-6.
29  */ /*-------------------------------------------------------------------*/
30 
31 #include "../esextcTestCaseBase.hpp"
32 #include <string.h>
33 #include <vector>
34 
35 namespace glcts
36 {
37 /** Base Class for Texture Border Clamp Tests 1-6
38  *  Takes care of initializing all texture objects necessary
39  *  to run these tests.
40  **/
41 class TextureBorderClampBase : public TestCaseBase
42 {
43 public:
44     /* Public methods */
45     TextureBorderClampBase(Context &context, const ExtParameters &extParams, const char *name, const char *description);
46 
~TextureBorderClampBase()47     virtual ~TextureBorderClampBase()
48     {
49     }
50 
51     virtual void deinit(void);
52     virtual void initTest(void);
53 
54 protected:
55     /* Protected methods */
56     void deinitAllTextures(void);
57     void initAllTextures(void);
58 
59     const char *getPNameString(glw::GLenum pname);
60     const char *getTexTargetString(glw::GLenum target);
61 
62     /* Protected variables */
63     glw::GLuint m_texture_2D_array_id;
64     glw::GLuint m_texture_2D_id;
65     glw::GLuint m_texture_2D_multisample_array_id;
66     glw::GLuint m_texture_2D_multisample_id;
67     glw::GLuint m_texture_3D_id;
68     glw::GLuint m_texture_buffer_id;
69     glw::GLuint m_texture_cube_map_id;
70     glw::GLuint m_texture_cube_map_array_id;
71 
72     std::vector<glw::GLenum> m_texture_target_list;
73 };
74 
75 } // namespace glcts
76 
77 #endif // _ESEXTCTEXTUREBORDERCLAMPBASE_HPP
78