C: Status Queries Example#

This example is based on the minimal C example and adds operation status queries for USD loading and rendering.

It demonstrates:

  1. Loading a USD layer with ovrtx_open_usd_from_file()

  2. Polling ovrtx_query_op_status() while waiting

  3. Running one shader-cache warm-up step with shader compilation progress

  4. Stepping the renderer with ovrtx_step()

  5. Fetching, mapping, and writing the rendered output to out.png

Renderer logs are written to _output/status-queries-ovrtx.log.

“Create a C/C++ rendering example that demonstrates operation status queries, including logging, asynchronous scene loading, progress and counter polling while waiting, shader warmup feedback, final image output, and both API and asynchronous operation error checks.”

Status queries example output

Build and Run#

Prerequisites

sudo apt install build-essential cmake

The ovrtx library is downloaded automatically at configure time. If ovrtx is already installed and available via CMAKE_PREFIX_PATH, the local installation is used instead.

Building

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Running

./build/status-queries

Prerequisites

The ovrtx library is downloaded automatically at configure time. If ovrtx is already installed and available via CMAKE_PREFIX_PATH, the local installation is used instead.

Building

cmake -B build
cmake --build build --config Release

Running

.\build\Release\status-queries

Licensing#

This example uses stb_image_write.h from the minimal example, (c) Sean Barrett, released under Public Domain.