| Flutter Impeller |

Classes | Public Member Functions | List of all members
impeller::PlaygroundImplGLES Class Referencefinal

`#include <playground_impl_gles.h>`

Inheritance diagram for impeller::PlaygroundImplGLES:

## Classes
class | ReactorWorker

## Public Member Functions
| PlaygroundImplGLES (PlaygroundSwitches switches)
| ~PlaygroundImplGLES ()
fml::Status | SetCapabilities (const std::shared_ptr< Capabilities > &capabilities) override
Public Member Functions inherited from impeller::PlaygroundImpl
virtual | ~PlaygroundImpl ()
Vector2 | GetContentScale () const
virtual Playground::VKProcAddressResolver | CreateVKProcAddressResolver () const

## Additional Inherited Members
Public Types inherited from impeller::PlaygroundImpl
using | WindowHandle = void *
Static Public Member Functions inherited from impeller::PlaygroundImpl
static std::unique_ptr< PlaygroundImpl > | Create (PlaygroundBackend backend, PlaygroundSwitches switches)
Protected Member Functions inherited from impeller::PlaygroundImpl
| PlaygroundImpl (PlaygroundSwitches switches)
Protected Attributes inherited from impeller::PlaygroundImpl
const PlaygroundSwitches | switches_

## Detailed Description

Definition at line 12 of file playground_impl_gles.h.

## Constructor & Destructor Documentation

## ◆ PlaygroundImplGLES()

impeller::PlaygroundImplGLES::PlaygroundImplGLES | ( | PlaygroundSwitches | switches | ) |
| explicit

Definition at line 64 of file playground_impl_gles.cc.

65 : PlaygroundImpl(switches),
66 handle_(nullptr, &DestroyWindowHandle),
67 worker_(std::shared_ptr<ReactorWorker>(new ReactorWorker())),
68 use_angle_(switches.use_angle) {
69 if (use_angle_) {
70 #if IMPELLER_PLAYGROUND_SUPPORTS_ANGLE
71 angle_glesv2_ = dlopen("libGLESv2.dylib", RTLD_LAZY);
72 #endif
73 FML_CHECK(angle_glesv2_ != nullptr);
74 }
75
76 ::glfwDefaultWindowHints();
77
78 #if FML_OS_MACOSX
79 FML_CHECK(use_angle_) << "Must use Angle on macOS for OpenGL ES.";
80 ::glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
81 #endif // FML_OS_MACOSX
82 ::glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
83 ::glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
84 ::glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
85 ::glfwWindowHint(GLFW_RED_BITS, 8);
86 ::glfwWindowHint(GLFW_GREEN_BITS, 8);
87 ::glfwWindowHint(GLFW_BLUE_BITS, 8);
88 ::glfwWindowHint(GLFW_ALPHA_BITS, 8);
89 ::glfwWindowHint(GLFW_DEPTH_BITS, 32); // 32 bit depth buffer
90 ::glfwWindowHint(GLFW_STENCIL_BITS, 8); // 8 bit stencil buffer
91 ::glfwWindowHint(GLFW_SAMPLES, 4); // 4xMSAA
92
93 ::glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
94
95 auto window = ::glfwCreateWindow(1, 1, "Test", nullptr, nullptr);
96
97 ::glfwMakeContextCurrent(window);
98 worker_->SetReactionsAllowedOnCurrentThread(true);
99
100 handle_.reset(window);
101 }
impeller::PlaygroundImpl::PlaygroundImpl
PlaygroundImpl(PlaygroundSwitches switches)
Definition: playground_impl.cc:55

## ◆ ~PlaygroundImplGLES()

impeller::PlaygroundImplGLES::~PlaygroundImplGLES | ( |  | ) |
| default

## Member Function Documentation

## ◆ SetCapabilities()

fml::Status impeller::PlaygroundImplGLES::SetCapabilities | ( | const std::shared_ptr< Capabilities > & | capabilities | ) |
| override virtual

Implements impeller::PlaygroundImpl.

Definition at line 196 of file playground_impl_gles.cc.

197 {
198 return fml::Status(
199 fml::StatusCode::kUnimplemented,
200 "PlaygroundImplGLES doesn't support setting the capabilities.");
201 }

The documentation for this class was generated from the following files:

- impeller/playground/backend/gles/playground_impl_gles.h
- impeller/playground/backend/gles/playground_impl_gles.cc