6 return out <<
"rgba(" << pixel.
r <<
", " << pixel.
g <<
", " << pixel.
b <<
", "
11 : target_(LoadRenderTexture(width, height)) {}
16 BeginTextureMode(target_);
22 const Camera3D& camera) {
23 BeginTextureMode(target_);
29 Image image = LoadImageFromTexture(target_.texture);
31 ImageFlipVertical(&image);
32 const Color color = GetImageColor(image, x, y);
34 return {color.r, color.g, color.b, color.a};
void RenderPreview(const Renderer &renderer, const Figure &figure, const Camera3D &camera)
Offscreen(int width, int height)
Pixel ReadPixel(int x, int y) const
void Render(const Renderer &renderer)
void DrawPreview(const Figure &figure, const Camera3D &camera) const
Draws one figure on a plain background, for previews in the UI.
std::ostream & operator<<(std::ostream &out, const Pixel &pixel)