Files
workinf_Blender_Wasm/blender-5.2.0/intern/ghost/intern/GHOST_ContextWeb.hh
mes123456 f3e21c6b98
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
chore: checkpoint web Blender migration source, tools and docs
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>
2026-11-10 11:18:01 +08:00

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 &params, 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;
};