1 #ifndef _GLCTESTSUBCASE_HPP
2 #define _GLCTESTSUBCASE_HPP
3 /*-------------------------------------------------------------------------
4 * OpenGL Conformance Test Suite
5 * -----------------------------
7 * Copyright (c) 2014-2016 The Khronos Group Inc.
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 */ /*-------------------------------------------------------------------*/
26 #include "deSharedPtr.hpp"
27 #include "glcTestCase.hpp"
28 #include "gluCallLogWrapper.hpp"
29 #include "gluStrUtil.hpp"
30 #include "tcuDefs.hpp"
36 #define NOT_SUPPORTED 0x10
42 class GLWrapper : public glu::CallLogWrapper
53 class SubcaseBase : public GLWrapper
56 typedef de::SharedPtr<SubcaseBase> SubcaseBasePtr;
58 virtual ~SubcaseBase();
59 virtual long Run() = 0;
61 virtual long Cleanup();
63 virtual std::string Title() = 0;
64 virtual std::string Purpose() = 0;
65 virtual std::string Method() = 0;
66 virtual std::string PassCriteria() = 0;
67 std::string VertexShader();
68 std::string VertexShader2();
70 std::string TessControlShader();
71 std::string TessControlShader2();
73 std::string TessEvalShader();
74 std::string TessEvalShader2();
76 std::string GeometryShader();
77 std::string GeometryShader2();
79 std::string FragmentShader();
80 std::string FragmentShader2();
82 void OutputNotSupported(std::string message);
85 class TestSubcase : public TestCase
88 TestSubcase(Context& context, const char* name, SubcaseBase::SubcaseBasePtr (*factoryFunc)());
89 virtual ~TestSubcase(void);
91 IterateResult iterate(void);
94 static SubcaseBase::SubcaseBasePtr Create()
96 return SubcaseBase::SubcaseBasePtr(new Type());
100 TestSubcase(const TestSubcase& other);
101 TestSubcase& operator=(const TestSubcase& other);
104 SubcaseBase::SubcaseBasePtr (*m_factoryFunc)();
105 int m_iterationCount;
110 #endif // _GLCTESTSUBCASE_HPP