1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_preloaded_image_data()

This commit is contained in:
kgv
2021-06-27 17:32:27 +03:00
parent 73dee81133
commit 16222b8cd2
5 changed files with 45 additions and 129 deletions

View File

@@ -21,12 +21,11 @@
#include "WasmOcctView.h"
#include "WasmOcctPixMap.h"
#include <AIS_Shape.hxx>
#include <AIS_ViewCube.hxx>
#include <Aspect_Handle.hxx>
#include <Aspect_DisplayConnection.hxx>
#include <Image_AlienPixMap.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Graphic3d_CubeMapPacked.hxx>
@@ -82,8 +81,8 @@ namespace
static void onImageRead (const char* theFilePath)
{
Handle(Graphic3d_CubeMapPacked) aCubemap;
Handle(WasmOcctPixMap) anImage = new WasmOcctPixMap();
if (anImage->Init (theFilePath))
Handle(Image_AlienPixMap) anImage = new Image_AlienPixMap();
if (anImage->Load (theFilePath))
{
aCubemap = new Graphic3d_CubeMapPacked (anImage);
}