1#ifndef _GLUES3PLUSWRAPPERCONTEXT_HPP
2#define _GLUES3PLUSWRAPPERCONTEXT_HPP
3/*-------------------------------------------------------------------------
4 * drawElements Quality Program OpenGL ES Utilities
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 OpenGL ES 3plus wrapper context.
24 *//*--------------------------------------------------------------------*/
25
26#include "tcuDefs.hpp"
27#include "gluRenderContext.hpp"
28#include "glwFunctions.hpp"
29
30namespace tcu
31{
32class CommandLine;
33}
34
35namespace glu
36{
37
38class ContextFactory;
39struct RenderConfig;
40
41namespace es3plus
42{
43
44class Context;
45
46} // es3plus
47
48/*--------------------------------------------------------------------*//*!
49 * \brief OpenGL ES 3plus wrapper.
50 *//*--------------------------------------------------------------------*/
51class ES3PlusWrapperContext : public RenderContext
52{
53public:
54										ES3PlusWrapperContext	(const ContextFactory& factory, const RenderConfig& config, const tcu::CommandLine& cmdLine);
55	virtual								~ES3PlusWrapperContext	(void);
56
57	virtual ContextType					getType					(void) const;
58	virtual const glw::Functions&		getFunctions			(void) const	{ return m_functions;							}
59
60	virtual const tcu::RenderTarget&	getRenderTarget			(void) const	{ return m_context->getRenderTarget();			}
61	virtual deUint32					getDefaultFramebuffer	(void) const	{ return m_context->getDefaultFramebuffer();	}
62	virtual void						postIterate				(void)			{ m_context->postIterate();						}
63
64private:
65	RenderContext*						m_context;				//!< Actual GL 4.3 core context.
66	glw::Functions						m_functions;
67
68	es3plus::Context*					m_wrapperCtx;			//!< Wrapper context
69};
70
71} // glu
72
73#endif // _GLUES3PLUSWRAPPERCONTEXT_HPP
74