tinyrenderer
tinyrenderer copied to clipboard
very strange phenomenon
int main(int argc, char** argv) { TGAImage image(image_width, image_height, TGAImage::RGB);
for (int i = 0; i < image_width; ++i)
image.set(i, 10, red);
//image.flip_vertically(); // i want to have the origin at the left bottom corner of the image
image.write_tga_file("output.tga");
return 0;
}
//when image_width = image_height = 800,the line is out of bound. But when width and height less than 700, the line is visible
the tgaimage.h and tgaimage.cpp are all the same as this repository.
indeed very strange, can you give me the complete sources as well as the resulting tga files, please?