I'm using glium in Rust. I want to get the width and the height.
I can't write and understand English well, because I'm Japanese. Maybe my English has some problems so I'm sorry.
As I mentioned in the comments section, there's a Display::get_framebuffer_dimensions
, so if you have the glium::Display
object around, you can extract the dimensions of the OpenGL context using it.
pub fn get_framebuffer_dimensions(&self) -> (u32, u32)
Calls
get_framebuffer_dimensions
on the backend object stored by this context.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.