Files
jpolo1224 e9b22ece5c Android: Vulkan surface + GS device bring-up on the unified core
- VKLoader.h define VK_USE_PLATFORM_ANDROID_KHR; VKEntryPoints.inl load
  vkCreateAndroidSurfaceKHR (VK_NO_PROTOTYPES); VKSwapChain create the
  ANativeWindow surface; GSDeviceVK Android surface-ext select + surface-lost
  re-acquire + non-fatal CAS on turnip.
- VKShaderCache: unversioned shaderc_shared name on Android (no .so.1).
- LnxHostSys: idempotent PageFaultHandler::Install (process reused per launch).
- imgui: enable FreeType PLUTOSVG + bundle plutosvg/plutovg for color emoji.
2026-07-09 10:23:58 -04:00

35 lines
933 B
C

#include <plutosvg.h>
#include <stdio.h>
int main(void)
{
plutosvg_document_t* document = NULL;
plutovg_surface_t* surface = NULL;
fprintf(stdout, "Loading 'camera.svg'\n");
document = plutosvg_document_load_from_file("camera.svg", -1, -1);
if(document == NULL) {
fprintf(stderr, "Unable to load 'camera.svg'\n");
goto cleanup;
}
fprintf(stdout, "Rendering 'camera.svg'\n");
surface = plutosvg_document_render_to_surface(document, NULL, -1, -1, NULL, NULL, NULL);
if(surface == NULL) {
fprintf(stderr, "Unable to render 'camera.svg'\n");
goto cleanup;
}
fprintf(stdout, "Writing 'camera.png'\n");
if(!plutovg_surface_write_to_png(surface, "camera.png")) {
fprintf(stderr, "Unable to write 'camera.png'\n");
goto cleanup;
}
cleanup:
plutovg_surface_destroy(surface);
plutosvg_document_destroy(document);
return 0;
}