view Platforms/Wasm/WasmViewport.cpp @ 1112:d33ae2b0db9d

less logs + allow changing the size of the RadiographyLayer (to replace a low res image by a high res image)
author Alain Mazy <alain@mazy.be>
date Mon, 04 Nov 2019 12:46:53 +0100
parents 4f2416d519b4
children
line wrap: on
line source

#include "WasmViewport.h"

#include <vector>
#include <memory>

std::vector<std::shared_ptr<Deprecated::WidgetViewport>> wasmViewports;

void AttachWidgetToWasmViewport(const char* htmlCanvasId, Deprecated::IWidget* centralWidget) {
    std::shared_ptr<Deprecated::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId));
    viewport->SetCentralWidget(centralWidget);

    wasmViewports.push_back(viewport);
}