1#ifndef _EGLUUTIL_HPP
2#define _EGLUUTIL_HPP
3/*-------------------------------------------------------------------------
4 * drawElements Quality Program Tester Core
5 * ----------------------------------------
6 *
7 * Copyright 2014 The Android Open Source Project
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 EGL utilities
24 *//*--------------------------------------------------------------------*/
25
26#include "tcuDefs.hpp"
27#include "egluHeaderWrapper.hpp"
28#include "egluNativeWindow.hpp"
29
30#include <vector>
31#include <map>
32#include <string>
33
34namespace tcu
35{
36class CommandLine;
37}
38
39namespace eglu
40{
41
42class NativeDisplay;
43class NativePixmap;
44
45typedef std::map<EGLint, EGLint> AttribMap;
46
47std::vector<std::string>	getPlatformExtensions		(void);
48std::vector<std::string>	getClientExtensions			(EGLDisplay display);
49std::vector<EGLConfig>		getConfigs					(EGLDisplay display);
50std::vector<EGLConfig>		chooseConfig				(EGLDisplay display, const AttribMap& attribs);
51EGLConfig					chooseSingleConfig			(EGLDisplay display, const AttribMap& attribs);
52EGLint						getConfigAttribInt			(EGLDisplay display, EGLConfig config, EGLint attrib);
53EGLint						querySurfaceInt				(EGLDisplay display, EGLSurface surface, EGLint attrib);
54tcu::IVec2					getSurfaceSize				(EGLDisplay display, EGLSurface surface);
55tcu::IVec2					getSurfaceResolution		(EGLDisplay display, EGLSurface surface);
56EGLDisplay					getDisplay					(NativeDisplay& nativeDisplay);
57EGLSurface					createWindowSurface			(NativeDisplay& nativeDisplay, NativeWindow& window, EGLDisplay display, EGLConfig config, const EGLAttrib* attribList);
58EGLSurface					createPixmapSurface			(NativeDisplay& nativeDisplay, NativePixmap& pixmap, EGLDisplay display, EGLConfig config, const EGLAttrib* attribList);
59
60WindowParams::Visibility	parseWindowVisibility		(const tcu::CommandLine& commandLine);
61
62std::vector<EGLint>			toLegacyAttribList			(const EGLAttrib* attribs);
63
64} // eglu
65
66#endif // _EGLUUTIL_HPP
67