mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
Wrapping up
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <fstream>
|
||||
|
||||
|
||||
void saveImage(const char* filename, unsigned char* framebuffer, int width, int height) { // TODO: Figure out a better way to do this
|
||||
void saveImage(const char* filename, unsigned char* framebuffer, int width, int height) {
|
||||
std::ofstream imageFile(filename, std::ios::out | std::ios::binary);
|
||||
imageFile << "P6\n" << width << " " << height << "\n255\n";
|
||||
for (int i = 0; i < width * height * 3; i++) {
|
||||
|
||||
Reference in New Issue
Block a user