mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
webgl: Check internal format of textures when determining attachment completeness.
This commit is contained in:
parent
15e2af0fea
commit
944d1d1f29
2 changed files with 16 additions and 64 deletions
|
@ -128,7 +128,7 @@ impl WebGLFramebuffer {
|
|||
let has_zs = zs.is_some();
|
||||
let attachments = [&*c, &*z, &*s, &*zs];
|
||||
let attachment_constraints = [
|
||||
&[constants::RGBA4, constants::RGB5_A1, constants::RGB565][..],
|
||||
&[constants::RGBA4, constants::RGB5_A1, constants::RGB565, constants::RGBA][..],
|
||||
&[constants::DEPTH_COMPONENT16][..],
|
||||
&[constants::STENCIL_INDEX8][..],
|
||||
&[constants::DEPTH_STENCIL][..],
|
||||
|
@ -162,7 +162,7 @@ impl WebGLFramebuffer {
|
|||
}
|
||||
Some(WebGLFramebufferAttachment::Texture { texture: ref att_tex, level } ) => {
|
||||
let info = att_tex.image_info_at_face(0, level as u32);
|
||||
(info.data_type().map(|t| t.as_gl_constant()),
|
||||
(info.internal_format().map(|t| t.as_gl_constant()),
|
||||
Some((info.width() as i32, info.height() as i32)))
|
||||
}
|
||||
None => (None, None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue