3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Tester Core
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 EGL common defines and types
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
28 #define EGLU_CHECK(EGLW) eglu::checkError((EGLW).getError(), DE_NULL, __FILE__, __LINE__)
29 #define EGLU_CHECK_MSG(EGLW, MSG) eglu::checkError((EGLW).getError(), MSG, __FILE__, __LINE__)
30 #define EGLU_CHECK_CALL(EGLW, CALL) do { (EGLW).CALL; eglu::checkError((EGLW).getError(), #CALL, __FILE__, __LINE__); } while (deGetFalse())
32 /*--------------------------------------------------------------------*//*!
33 * \brief EGL utilities
34 *//*--------------------------------------------------------------------*/
38 class Error : public tcu::TestError
41 Error (deUint32 errCode, const char* errStr);
42 Error (deUint32 errCode, const char* message, const char* expr, const char* file, int line);
43 ~Error (void) throw() {}
45 deUint32 getError (void) const { return m_error; }
51 class BadAllocError : public tcu::ResourceError
54 BadAllocError (const char* errStr);
55 BadAllocError (const char* message, const char* expr, const char* file, int line);
56 ~BadAllocError (void) throw() {}
59 void checkError (deUint32 err, const char* msg, const char* file, int line);
64 Version (int major, int minor) : m_major(major), m_minor(minor) {}
66 int getMajor (void) const { return m_major; }
67 int getMinor (void) const { return m_minor; }
69 bool operator< (const Version& v) const;
70 bool operator== (const Version& v) const;
72 bool operator!= (const Version& v) const;
73 bool operator> (const Version& v) const;
74 bool operator<= (const Version& v) const;
75 bool operator>= (const Version& v) const;
84 #endif // _EGLUDEFS_HPP