Skip to content
anthony.samms edited this page May 28, 2026 · 1 revision

This document will outline the webcam library used by the simulator. This is particularly used in the title.

bool open(int device_index = 0);

Opens the SDL camera based on the given device index.

void close();

Close the camera.

void update();

Advance capture of the camera.

bool is_open()

Check if the camera is functioning.

bool is_ready()

Check if the camera can display a texture.

const ray::Texture2D& get_texture()

Returns a raylib texture of the current camera frame.

int width()
int height()

Width and Height of the camera.

Clone this wiki locally