Drawable Renderer (#1570), PremultipliedImage is RGBA only

This commit is contained in:
mwilsnd
2023-05-31 10:05:12 -05:00
committed by Bart Louwers
parent 8f3b5ec093
commit f45437b9ab
2 changed files with 1 additions and 8 deletions

View File

@@ -213,7 +213,7 @@ gfx::AttributeBindingArray UploadPass::buildAttributeBindings(
std::shared_ptr<gfx::Texture2D> UploadPass::createTexture2D(const PremultipliedImage& image) {
auto tex = std::make_shared<gl::Texture2D>(commandEncoder.context);
tex->setSize(image.size)
.setFormat(image.channels == 4 ? gfx::TexturePixelType::RGBA : gfx::TexturePixelType::Alpha,
.setFormat(gfx::TexturePixelType::RGBA,
gfx::TextureChannelDataType::UnsignedByte)
.create();
tex->upload(image, *this);