24 lines
522 B
C++
24 lines
522 B
C++
#pragma once
|
|
|
|
#include "./vec.hpp"
|
|
#include "./raytrace.hpp"
|
|
|
|
struct Frame {
|
|
v3* data;
|
|
};
|
|
|
|
void bg_fg(v3* cols, v3& bg, v3& fg, const char*& c);
|
|
|
|
inline int colcvt(choice_t x) {
|
|
if (x < 0.0) return 0;
|
|
if (x > 1.0) return 255;
|
|
return int(x * 255.0);
|
|
}
|
|
|
|
void display_frame(const Screen& screen, const Frame& frame);
|
|
|
|
void render_frame(const Screen& screen, Camera& camera, Frame& frame,
|
|
const std::vector<Renderable*>& scene,
|
|
const std::vector<Renderable*>& objects,
|
|
const std::vector<Renderable*>& lights);
|