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"
31 #define EGLU_CHECK() eglu::checkError(DE_NULL, __FILE__, __LINE__)
32 #define EGLU_CHECK_MSG(MSG) eglu::checkError(MSG, __FILE__, __LINE__)
33 #define EGLU_CHECK_CALL(CALL) do { CALL; eglu::checkError(#CALL, __FILE__, __LINE__); } while (deGetFalse())
35 /*--------------------------------------------------------------------*//*!
36 * \brief EGL utilities
37 *//*--------------------------------------------------------------------*/
41 class Error : public tcu::TestError
44 Error (deInt32 errCode, const char* errStr);
45 Error (deInt32 errCode, const char* message, const char* expr, const char* file, int line);
46 ~Error (void) throw() {}
48 deInt32 getError (void) const { return m_error; }
54 class BadAllocError : public tcu::ResourceError
57 BadAllocError (const char* errStr);
58 BadAllocError (const char* message, const char* expr, const char* file, int line);
59 ~BadAllocError (void) throw() {}
62 void checkError (const char* msg, const char* file, int line);
67 Version (int major, int minor) : m_major(major), m_minor(minor) {}
69 int getMajor (void) const { return m_major; }
70 int getMinor (void) const { return m_minor; }
72 bool operator< (const Version& v) const;
73 bool operator== (const Version& v) const;
75 bool operator!= (const Version& v) const;
76 bool operator> (const Version& v) const;
77 bool operator<= (const Version& v) const;
78 bool operator>= (const Version& v) const;
87 #endif // _EGLUDEFS_HPP