1 #ifndef _ES3FFBOTESTCASE_HPP
2 #define _ES3FFBOTESTCASE_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program OpenGL ES 3.0 Module
5 * -------------------------------------------------
7 * Copyright 2014 The Android Open Source Project
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.
23 * \brief Base class for FBO tests.
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
27 #include "tes3TestCase.hpp"
28 #include "sglrContextWrapper.hpp"
43 class FboTestCase : public TestCase, public sglr::ContextWrapper
46 FboTestCase (Context& context, const char* name, const char* description, bool useScreenSizedViewport = false);
49 IterateResult iterate (void);
52 virtual void preCheck (void) {}
53 virtual void render (tcu::Surface& dst) = DE_NULL;
54 virtual bool compare (const tcu::Surface& reference, const tcu::Surface& result);
57 void checkFormatSupport (deUint32 sizedFormat);
58 void checkSampleCount (deUint32 sizedFormat, int numSamples);
59 void readPixels (tcu::Surface& dst, int x, int y, int width, int height, const tcu::TextureFormat& format, const tcu::Vec4& scale, const tcu::Vec4& bias);
60 void readPixels (tcu::Surface& dst, int x, int y, int width, int height);
61 void checkFramebufferStatus (deUint32 target);
62 void checkError (void);
63 void clearColorBuffer (const tcu::TextureFormat& format, const tcu::Vec4& value = tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f));
69 FboTestCase (const FboTestCase& other);
70 FboTestCase& operator= (const FboTestCase& other);
77 #endif // _ES3FFBOTESTCASE_HPP