#ifndef _GLURENDERCONTEXT_HPP #define _GLURENDERCONTEXT_HPP /*------------------------------------------------------------------------- * drawElements Quality Program OpenGL ES Utilities * ------------------------------------------------ * * Copyright 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *//*! * \file * \brief OpenGL ES rendering context. *//*--------------------------------------------------------------------*/ #include "tcuDefs.hpp" // glw::GenericFuncType #include "glwFunctionLoader.hpp" namespace tcu { class CommandLine; class Platform; class RenderTarget; } namespace glw { class Functions; class FunctionLoader; } namespace glu { class ContextType; class ContextInfo; struct RenderConfig; enum Profile { PROFILE_ES = 0, //!< OpenGL ES PROFILE_CORE, //!< OpenGL Core Profile PROFILE_COMPATIBILITY, //!< OpenGL Compatibility Profile PROFILE_LAST }; enum ContextFlags { CONTEXT_ROBUST = (1<<0), //!< Robust context CONTEXT_DEBUG = (1<<1), //!< Debug context CONTEXT_FORWARD_COMPATIBLE = (1<<2), //!< Forward-compatible context CONTEXT_NO_ERROR = (1<<3) //!< No error context }; inline ContextFlags operator| (ContextFlags a, ContextFlags b) { return ContextFlags((deUint32)a|(deUint32)b); } inline ContextFlags operator& (ContextFlags a, ContextFlags b) { return ContextFlags((deUint32)a&(deUint32)b); } inline ContextFlags operator~ (ContextFlags a) { return ContextFlags(~(deUint32)a); } /*--------------------------------------------------------------------*//*! * \brief Rendering API version and profile. *//*--------------------------------------------------------------------*/ class ApiType { public: ApiType (void) : m_bits(pack(0, 0, PROFILE_LAST)) {} ApiType (int major, int minor, Profile profile) : m_bits(pack(major, minor, profile)) {} int getMajorVersion (void) const { return int((m_bits>>MAJOR_SHIFT) & ((1u<>MINOR_SHIFT) & ((1u<>PROFILE_SHIFT) & ((1u<>FLAGS_SHIFT) & ((1u<