NyxRenderer#
- class gs_nyx.nyx_py_renderer.NyxRenderer#
Bases:
objectGPU rendering bridge. Owns a rendering server and exports its interop buffers to Python.
Constructors
Construct an uninitialized renderer; call ‘startup’ before use.
Methods
Allocate the interop buffers needed to drive the scene from Python according to the given BridgeUpdateDesc.
Number of bytes the renderer reads or writes in the given interop buffer.
(width, height) in pixels of the given camera.
Size in bytes of the packed CameraColor buffer filled by 'render_batch'.
(offset, stride) in bytes of the given camera inside the packed color buffer: env 0 starts at 'offset', consecutive envs are 'stride' apart.
Identity of the GPU the renderer runs on (DeviceIdentity), to pick the compute device sitting on the same GPU.
Export an interop buffer as an ExportedGraphicsBuffer, or None when the buffer was not allocated (empty category).
Kind of OS handle 'export_buffer' returns on this graphics API and platform (EExternalMemoryHandleType).
Load a scene file from disk into the renderer.
Pick the scene object visible under 'pixel' from the given camera.
Reload the currently loaded scene from its file, re-importing only the assets that changed on disk since the last load or reload.
Render every (env, camera) pair of the scene into the packed CameraColor buffer and wait for the GPU.
Render env 0 from the given camera into the start of the CameraColor buffer, as tightly packed (H, W, 3) uint8 rows with '(width, height) = camera_resolution(camera_index)', and wait for the GPU.
Select the view visualized when the render mode is ERenderMode.Debug.
Select the active environment map by index in the scene's environment map array.
Select the render mode used by the next rendered frames.
Release all renderer and SDK global resources.
Initialize the renderer with the given BridgeStartupParams and load shipped shader/asset resources.
Trace a ray against the scene.
Unload the currently loaded scene and free its GPU resources.
Advance per-frame renderer bookkeeping.
Signal that the interop buffers hold new data (wait for the compute writes first).