diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-04-27 10:17:06 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-04-27 10:17:06 +0200 |
commit | 2ca9adffa0699252744fc0da3e25891f9c2809da (patch) | |
tree | f92d8dbaece9b117686c65e810482f272dde6507 /src/api/osmesa | |
parent | aca06d16e2d293a74d0a87d94a6e1f9aa73154d0 (diff) | |
parent | d3cc9064f4c578b90820a60724ea2b6c75727a74 (diff) | |
download | glutin-2ca9adffa0699252744fc0da3e25891f9c2809da.tar.gz glutin-2ca9adffa0699252744fc0da3e25891f9c2809da.zip |
Merge pull request #402 from tomaka/caca
Add libcaca backend
Diffstat (limited to 'src/api/osmesa')
-rw-r--r-- | src/api/osmesa/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api/osmesa/mod.rs b/src/api/osmesa/mod.rs index 585ce72..ea90583 100644 --- a/src/api/osmesa/mod.rs +++ b/src/api/osmesa/mod.rs @@ -35,6 +35,14 @@ impl OsMesaContext { }) } + pub fn get_framebuffer(&self) -> &[u32] { + &self.buffer + } + + pub fn get_dimensions(&self) -> (u32, u32) { + (self.width, self.height) + } + pub unsafe fn make_current(&self) { let ret = osmesa_sys::OSMesaMakeCurrent(self.context, self.buffer.as_ptr() as *mut libc::c_void, |