1 #ifndef _ESEXTCTEXTURECUBEMAPARRAYETC2SUPPORT_HPP
2 #define _ESEXTCTEXTURECUBEMAPARRAYETC2SUPPORT_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2017 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  esextcTextureCubeMapArrayETC2Support.hpp
23  * \brief texture_cube_map_array extension - ETC2 support (Test 11)
24  */ /*-------------------------------------------------------------------*/
25 
26 #include "../esextcTestCaseBase.hpp"
27 
28 namespace glcts
29 {
30 class TextureCubeMapArrayETC2Support : public TestCaseBase
31 {
32 public:
33     /* Public methods */
34     TextureCubeMapArrayETC2Support(glcts::Context &context, const ExtParameters &extParams, const char *name,
35                                    const char *description);
36 
~TextureCubeMapArrayETC2Support()37     virtual ~TextureCubeMapArrayETC2Support()
38     {
39     }
40 
41     virtual void deinit(void);
42     virtual IterateResult iterate(void);
43 
44 protected:
45     void prepareFramebuffer();
46     void prepareVertexArrayObject();
47     void prepareProgram();
48     void prepareTexture();
49     void draw();
50     bool isRenderedImageValid();
51     void clean();
52 
53 private:
54     glw::GLuint m_fbo;
55     glw::GLuint m_rbo;
56     glw::GLuint m_vao;
57     glw::GLuint m_texture;
58     glw::GLuint m_program;
59 
60     static const glw::GLchar s_vertex_shader[];
61     static const glw::GLchar s_fragment_shader[];
62     static const glw::GLubyte s_RGB_texture_data[];
63     static const glw::GLsizei s_RGB_texture_data_size;
64     static const glw::GLubyte s_compressed_RGB_texture_data[];
65     static const glw::GLsizei s_compressed_RGB_texture_data_size;
66 };
67 
68 } // namespace glcts
69 
70 #endif // _ESEXTCTEXTURECUBEMAPARRAYETC2SUPPORT_HPP
71