aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/osmesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/osmesa')
-rw-r--r--src/api/osmesa/mod.rs8
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,