OpenGL: Create ContextExternal for use without EGL

Allows passing in appropriate callbacks for managing
the OpenGL context, as opposed to relying on Dawn+EGL
for OpenGL context management.
This commit is contained in:
2022-08-29 17:00:37 -04:00
parent 3ebcf4b88a
commit ed15d7c193
8 changed files with 125 additions and 7 deletions

View File

@@ -26,6 +26,10 @@ struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptio
explicit AdapterDiscoveryOptions(WGPUBackendType type);
void* (*getProc)(const char*);
// Context
void (*makeCurrent)(void*);
void (*destroy)(void*);
void* userData;
};
// TODO(crbug.com/dawn/810): This struct can be removed once Chrome is no longer using it.