1 #ifndef _ESEXTCTEXTURECUBEMAPARRAYFBOINCOMPLETENESS_HPP 2 #define _ESEXTCTEXTURECUBEMAPARRAYFBOINCOMPLETENESS_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 esextcTextureCubeMapArrayFBOIncompleteness.hpp 28 * \brief texture_cube_map_array extenstion - FBO incompleteness (Test 9) 29 */ /*-------------------------------------------------------------------*/ 30 31 #include "../esextcTestCaseBase.hpp" 32 33 namespace glcts 34 { 35 /** Implementation part one of (Test 9). Test description follows: 36 * 37 * Make sure FBO incompleteness is reported as per specified when at least 38 * one cube-map array texture is used as an attachment. 39 * 40 * Category: Coverage. 41 * Priority: Must-have. 42 * 43 * (Condition 1) 44 * Make sure that a framebuffer is considered incomplete, if a non-existing 45 * layer (whose index is larger or equal to the layer count) of a cube-map 46 * array texture is attached to any of the framebuffer's non-layered 47 * attachments; 48 * 49 * (Condition 2) 50 * Make sure that a framebuffer is considered incomplete if the layer count 51 * of a cube-map array texture that has been bound to a layered framebuffer 52 * is larger than or equal to GL_MAX_FRAMEBUFFER_LAYERS_EXT. 53 * 54 * (Condition 3) 55 * Make sure that a layered framebuffer is considered incomplete and its 56 * status is reported as GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT, if 57 * a cube-map array texture level has been bound to its zeroth color attachment 58 * and a 2D array texture level has been bound to its first color attachment. 59 **/ 60 61 class TextureCubeMapArrayFBOIncompleteness : public TestCaseBase 62 { 63 public: 64 /* Public methods */ 65 TextureCubeMapArrayFBOIncompleteness(Context& context, const ExtParameters& extParams, const char* name, 66 const char* description); 67 ~TextureCubeMapArrayFBOIncompleteness(void)68 virtual ~TextureCubeMapArrayFBOIncompleteness(void) 69 { 70 } 71 72 virtual void deinit(void); 73 virtual IterateResult iterate(void); 74 75 private: 76 /* Private methods */ 77 glw::GLboolean checkState(glw::GLint expectedState, const char* message); 78 void initTest(); 79 80 /* Private static constants */ 81 static const glw::GLint m_small_texture_depth = 6; 82 static const glw::GLint m_texture_levels = 1; 83 static const glw::GLint m_texture_height = 1; 84 static const glw::GLint m_texture_width = 1; 85 86 /* Variables for general usage */ 87 glw::GLuint m_fbo_id; 88 glw::GLuint m_lots_of_layers_to_id; 89 glw::GLuint m_non_layered_to_id; 90 glw::GLuint m_small_to_id; 91 }; 92 93 } /* glcts */ 94 95 #endif // _ESEXTCTEXTURECUBEMAPARRAYFBOINCOMPLETENESS_HPP 96