From cb3ddae385c03a8830d39dc37fcd5bf273524d5e Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 10 Oct 2022 16:23:26 +0200 Subject: Try to add second VBO --- src/Image/PPMParser.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/Image/PPMParser.cpp') diff --git a/src/Image/PPMParser.cpp b/src/Image/PPMParser.cpp index 0a9da54..d7d8c6a 100644 --- a/src/Image/PPMParser.cpp +++ b/src/Image/PPMParser.cpp @@ -8,8 +8,6 @@ namespace MC::Image { RawImage PPMParser::parse() { auto header = parse_header(); - std::cout << header.type << " " << header.width << " " << header.height << " " << (uint64_t)header.max_color << std::endl; - if (header.max_color != 255) { throw std::logic_error("PPM max color values other than 255 are not implemented."); } @@ -20,7 +18,7 @@ RawImage PPMParser::parse() { auto pixel_count = header.width * header.height; - RawImage image(pixel_count); + RawImage image(pixel_count, header.width, header.height, 3); for (uint64_t pixel_index = 0; pixel_index < pixel_count; pixel_index++) { RawImage::Pixel pixel = parse_pixel(header.max_color); image.add(pixel); @@ -97,16 +95,10 @@ uint64_t PPMParser::chomp_number() { uint8_t digit = digit_ascii - '0'; - std::cout << "digit_ascii: " << digit_ascii << std::endl; - std::cout << "digit: " << (uint64_t)digit << std::endl; - number *= 10; number += digit; - - std::cout << "number: " << (uint64_t)number << std::endl; } - std::cout << "chomp number: " << number << std::endl; return number; } @@ -125,7 +117,6 @@ std::string_view PPMParser::chomp_part() { auto part = m_source.substr(m_cursor, length); m_cursor += length; - std::cout << "chomped: " << part << std::endl; return part; } -- cgit 1.4.1