Struct xray::OpenGlScreenshotCaptor[][src]

pub struct OpenGlScreenshotCaptor {}

Captures a screenshot using gl::ReadPixels

To use this screenshot captor, OpenGL must be able to load function pointers. If you use Piston or Glutin, this is likely already the case.

If you use a lower level library like gl directly, you may need to call gl::load_with(|symbol| glfw.get_proc_address(s))) or similar, depending on your choice of gl library and context library.

Trait Implementations

impl ScreenshotCaptor for OpenGlScreenshotCaptor
[src]

Takes a screenshot of the area (x, y, x + width, y + height) Returns a ScreenshotError::ErrorCapturingImage if the image could not be captured. Read more

Auto Trait Implementations