brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

Expose SDL GL support functions #55

Closed robn closed 11 years ago

robn commented 11 years ago

Exposes SDL_GL_SetAttribute, SDL_GL_GetAttribute and SDL_GL_SwapBuffers.

get_attribute segfaults on my system. I haven't been able to figure out why, after a lot of debugging and experimenting. As far as I can tell it looks like similar code. I figure one of you fine folks will understand the problem, but if not we could just not include it - the function itself is almost useless because it only queries SDL's internal state, not the underlying GL state. Even SDL's own documentation says not to bother with it.

pcwalton commented 11 years ago

I'd prefer to at least mark functions that are known to segfault as unsafe. You shouldn't be able to segfault Rust code without using an unsafe block.

robn commented 11 years ago

I'd prefer to just not include it if it doesn't work. Lets do that.

AngryLawyer commented 11 years ago

In it goes!