[gl] check if glGetTexImage is allowed
@@ -688,12 +688,14 @@ impl CommandQueue {
pixel_type,
dst_buffer,
ref data,
- } => unsafe {
+ } => {
+ if self.share.private_caps.get_tex_image {
// TODO: Fix active texture
// TODO: handle partial copies gracefully
assert_eq!(data.image_offset, hal::image::Offset { x: 0, y: 0, z: 0 });
assert_eq!(texture_target, glow::TEXTURE_2D);
let gl = &self.share.context;
+ unsafe {
gl.active_texture(glow::TEXTURE0);
gl.bind_buffer(glow::PIXEL_PACK_BUFFER, Some(dst_buffer));
gl.bind_texture(glow::TEXTURE_2D, Some(src_texture));
@@ -709,6 +711,11 @@ impl CommandQueue {
glow::PixelPackData::BufferOffset(data.buffer_offset as u32),
);
gl.bind_buffer(glow::PIXEL_PACK_BUFFER, None);
+ }
+ } else {
+ //TODO: use FBO
+ error!("CopyTextureToBuffer is not implemented on GLES");
+ }
},
com::Command::CopyRenderbufferToBuffer(..) => {
//TODO: use FBO
