Renderer
classin packageklyn.graphics3d
public class Renderer implements AutoClosable
Renderer
All Implemented Interfaces: AutoClosable

OpenGL renderer with persistent mesh uploads and one native submission per frame. CPU work is O(visible scene nodes), not O(vertices). Owns GPU resources; use and close on the creating thread. Offscreen rendering uses a hidden native surface and currently requires Windows or an X11 display with OpenGL 3.3. Example: try renderer = Renderer(): renderer.render(scene, camera, 640, 480)

Properties
Modifier and Type Member Description
public readonly property deviceDescription
deviceDescription as String
Driver description after first render; includes actual device name.
public readonly property statistics
statistics as RenderStatistics
Counter snapshot, O(1), without GPU synchronization.
Methods
Modifier and Type Member Description
public bindSurface
bindSurface(owner as Object, window as Object, x as Int, y as Int) as Void
Internal GUI binding, performed before the first render; does not create a GUI dependency in the scene API.
public capture
capture(path as String) as Void
Explicit synchronous framebuffer capture, BMP format.
public clearMeshCache
clearMeshCache() as Void
Releases cached meshes, retaining the context.
public close
close() as Void
Releases GPU resources, idempotently.
public recordSurface
recordSurface(painter as Object) as Void
Records a GUI viewport for clipping, overlays and explicit capture.
public render
render(scene as Scene, camera as PerspectiveCamera, width as Int, height as Int) as Void
Draws scene using the camera.
Inherited Methods
methodInherited Methods from AutoClosable: close