2
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
3
// Use of this source code is governed by a BSD-style license that can be
4
// found in the LICENSE file.
7
// DeviceEAGL.cpp: EAGL implementation of egl::Device
9
#import "common/platform.h"
11
#if defined(ANGLE_PLATFORM_IOS)
13
# include "libANGLE/renderer/gl/eagl/DeviceEAGL.h"
15
# include "libANGLE/renderer/gl/eagl/DisplayEAGL.h"
17
# include <EGL/eglext.h>
22
DeviceEAGL::DeviceEAGL() {}
24
DeviceEAGL::~DeviceEAGL() {}
26
egl::Error DeviceEAGL::initialize()
28
return egl::NoError();
31
egl::Error DeviceEAGL::getAttribute(const egl::Display *display, EGLint attribute, void **outValue)
33
DisplayEAGL *displayImpl = GetImplAs<DisplayEAGL>(display);
37
case EGL_EAGL_CONTEXT_ANGLE:
38
*outValue = displayImpl->getEAGLContext();
41
return egl::EglBadAttribute();
44
return egl::NoError();
47
EGLint DeviceEAGL::getType()
52
void DeviceEAGL::generateExtensions(egl::DeviceExtensions *outExtensions) const
54
outExtensions->deviceEAGL = true;
59
#endif // defined(ANGLE_PLATFORM_IOS)