Files
workinf_Blender_Wasm/web/engine/web_engine_native_smoke.cpp
2026-08-12 04:47:48 -04:00

25 lines
852 B
C++

#include <cstdio>
#include "web_engine_api.h"
int main()
{
const int handle = web_engine_create();
const int open_result = web_engine_open_blend(handle, nullptr, 0);
const int command_result = web_engine_apply_command(handle, nullptr, 0);
const uint32_t live_before_destroy = web_engine_get_live_handles();
web_engine_destroy(handle);
const uint32_t live_after_destroy = web_engine_get_live_handles();
std::printf("{\"handle\":%d,\"open\":%d,\"command\":%d,\"liveBeforeDestroy\":%u,\"liveAfterDestroy\":%u}\n",
handle,
open_result,
command_result,
live_before_destroy,
live_after_destroy);
return handle == 1 && open_result == -2 && command_result == -2 && live_before_destroy == 1 &&
live_after_destroy == 0 ?
0 :
1;
}