Skip to content

Instantly share code, notes, and snippets.

@ScatteredRay
Created April 22, 2013 05:51
Show Gist options
  • Save ScatteredRay/5432657 to your computer and use it in GitHub Desktop.
Save ScatteredRay/5432657 to your computer and use it in GitHub Desktop.
sdl rust
let window;
do str::as_c_str("Project Guava") |cstr| {
window = SDL::SDL_CreateWindow(cstr,
SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED,
512, 512,
(SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN));
}
let context = SDL::SDL_GL_CreateContext(window);
@ScatteredRay
Copy link
Author

src/platform/sdl.rs:62:6: 62:12 error: capture of possibly uninitialized variable: `window`
src/platform/sdl.rs:62       window = SDL::SDL_CreateWindow(cstr,
                             ^~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment