diff options
| author | Mel <einebeere@gmail.com> | 2022-10-10 16:23:26 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-10-10 16:23:26 +0200 |
| commit | cb3ddae385c03a8830d39dc37fcd5bf273524d5e (patch) | |
| tree | 0ccddcd6b32838b8fc2b65805a4fba96c4c0ff39 /src/Image/PPMParser.cpp | |
| parent | 799c06e0387e01bdb8a10019be6192f9db00a824 (diff) | |
| download | meowcraft-cb3ddae385c03a8830d39dc37fcd5bf273524d5e.tar.zst meowcraft-cb3ddae385c03a8830d39dc37fcd5bf273524d5e.zip | |
Try to add second VBO
Diffstat (limited to 'src/Image/PPMParser.cpp')
| -rw-r--r-- | src/Image/PPMParser.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
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; } |
