1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program Tester Core
3 * ----------------------------------------
5 * Copyright (c) 2016 The Khronos Group Inc.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 * \brief Linux EGL Platform.
22 *//*--------------------------------------------------------------------*/
24 #include "tcuLnxEglPlatform.hpp"
26 #if defined (DEQP_SUPPORT_X11)
27 # include "tcuLnxX11EglDisplayFactory.hpp"
28 #endif // DEQP_SUPPORT_X11
30 #if defined (DEQP_SUPPORT_WAYLAND)
31 # include "tcuLnxWaylandEglDisplayFactory.hpp"
32 #endif // DEQP_SUPPORT_WAYLAND
34 #include "egluGLContextFactory.hpp"
43 Platform::Platform (EventState& eventState)
45 #if defined (DEQP_SUPPORT_X11)
46 m_nativeDisplayFactoryRegistry.registerFactory(x11::egl::createDisplayFactory(eventState));
47 #endif // DEQP_SUPPORT_X11
49 #if defined (DEQP_SUPPORT_WAYLAND)
50 m_nativeDisplayFactoryRegistry.registerFactory(wayland::egl::createDisplayFactory(eventState));
51 #endif // DEQP_SUPPORT_WAYLAND
55 de::MovePtr<glu::ContextFactory> Platform::createContextFactory (void)
57 return de::MovePtr<glu::ContextFactory>(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));