Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer, web workflow engine and protocol, tooling, docs and task records. Large generated evidence, user-testing archives, build snapshots and imported test assets remain untracked. Co-Authored-By: Claude Code <noreply@anthropic.com>
28 lines
935 B
C++
28 lines
935 B
C++
/* SPDX-FileCopyrightText: 2026 Blender Authors
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#pragma once
|
|
|
|
#include "GHOST_Context.hh"
|
|
#include <emscripten/html5.h>
|
|
#include <string>
|
|
|
|
class GHOST_ContextWeb : public GHOST_Context {
|
|
public:
|
|
GHOST_ContextWeb(const GHOST_ContextParams ¶ms, const char *selector);
|
|
~GHOST_ContextWeb() override;
|
|
GHOST_TSuccess initializeDrawingContext() override;
|
|
GHOST_TSuccess activateDrawingContext() override;
|
|
GHOST_TSuccess releaseDrawingContext() override;
|
|
GHOST_TSuccess updateDrawingContext() override;
|
|
GHOST_TSuccess releaseNativeHandles() override;
|
|
GHOST_TSuccess swapBufferAcquire() override;
|
|
GHOST_TSuccess swapBufferRelease() override;
|
|
GHOST_TSuccess setSwapInterval(int interval) override;
|
|
GHOST_TSuccess getSwapInterval(int &interval) override;
|
|
bool isContextLost() const;
|
|
|
|
private:
|
|
std::string selector_;
|
|
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE handle_ = 0;
|
|
};
|