Skip to content

raisin::example ​

namespace

Classes ​

  • class Capture — Captures what an example renders, as the environment asks, for documentation and tests.

Functions ​

writeGlImagePng ​

#include <rayrai/example_common.hpp>

cpp
bool writeGlImagePng(
    std::vector<unsigned char> &rgba,
    int width,
    int height,
    const std::filesystem::path &path)

Save RGBA8 rows read from OpenGL (bottom row first) as a PNG file, creating its folder.

saveTexturePng ​

#include <rayrai/example_common.hpp>

cpp
bool saveTexturePng(
    unsigned int texture,
    int width,
    int height,
    const std::filesystem::path &path)

Save an RGBA8 texture as a PNG file, top row first, creating its folder.

Returns False when the file cannot be written.

saveWindowPng ​

#include <rayrai/example_common.hpp>

cpp
bool saveWindowPng(SDL_Window *window, const std::filesystem::path &path)

Save the window's back buffer, panels included, as a PNG file. Call it before the swap.

saveCameraPng ​

#include <rayrai/example_common.hpp>

cpp
bool saveCameraPng(
    raisin::Camera &camera,
    const std::filesystem::path &path)

Save a camera's final image, after post-processing, as a PNG file.

RaiSim — physics for robotics and AI.