aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2019-02-19 09:54:55 -0500
committerGitHub <noreply@github.com>2019-02-19 09:54:55 -0500
commit735243802dc66120ca9a536c8059f42db2ac9b72 (patch)
treebe721b4581e43d1edc18734b162a64c19d9cd17e /samples
parentb3a778d1a66f34025878576b0be5e6a5c18c8b94 (diff)
downloadamber-735243802dc66120ca9a536c8059f42db2ac9b72.tar.gz
Fixup image buffer dump (#299)
This CL updates the image dumping code to the new default framebuffer format of B8G8R8A8_UNORM.
Diffstat (limited to 'samples')
-rw-r--r--samples/ppm.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/samples/ppm.cc b/samples/ppm.cc
index 5602118..cf7ec47 100644
--- a/samples/ppm.cc
+++ b/samples/ppm.cc
@@ -52,10 +52,10 @@ std::pair<amber::Result, std::string> ConvertToPPM(
// Write PPM data
for (amber::Value value : values) {
const uint32_t pixel = value.AsUint32();
- // We assume R8G8B8A8_UINT here:
- image.push_back(byte0(pixel)); // R
+ // We assume B8G8R8A8_UNORM here:
+ image.push_back(byte2(pixel)); // R
image.push_back(byte1(pixel)); // G
- image.push_back(byte2(pixel)); // B
+ image.push_back(byte0(pixel)); // B
// PPM does not support alpha channel
}