pub trait Image {
fn tex_image_2d(
&self,
context: &WebGL2RenderingContext,
target: TextureBindPoint,
level: u32,
internalformat: PixelCopyFormat,
width: u32,
height: u32,
format: PixelCopyFormat,
pixel_type: PixelType
) -> Result<(), JsValue>;
fn tex_sub_image_2d(
&self,
context: &WebGL2RenderingContext,
target: TextureBindPoint,
level: u32,
xoffset: u32,
yoffset: u32,
width: u32,
height: u32,
format: PixelCopyFormat,
pixel_type: PixelType
) -> Result<(), JsValue>;
fn read_pixels(
&mut self,
context: &WebGL2RenderingContext,
x: u32,
y: u32,
width: u32,
height: u32,
format: PixelReadFormat,
pixel_type: PixelType
) -> Result<(), JsValue>;
}