Add libcaca backend

This commit is contained in:
Pierre Krieger 2015-04-26 16:23:22 +02:00
parent aca06d16e2
commit d3cc9064f4
4 changed files with 437 additions and 0 deletions

View file

@ -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,