Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to rust changes #3

Merged
merged 1 commit into from Aug 5, 2012
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -55,7 +55,7 @@ fn init() unsafe {

fn create_window(name: ~str) -> Window unsafe {
let bytes = str::bytes(name);
ret Window(glutCreateWindow(to_ptr(bytes) as *c_char));
return Window(glutCreateWindow(to_ptr(bytes) as *c_char));
}

fn destroy_window(window: Window) unsafe {
@@ -59,7 +59,7 @@ fn load_shader(source_str: ~str, shader_type: GLenum) -> GLuint {
println(get_shader_info_log(shader_id));
fail ~"failed to compile shader";
}
ret shader_id;
return shader_id;
}

class shader_program {
@@ -94,7 +94,7 @@ fn init_shaders() -> shader_program {

use_program(program);

ret shader_program(program);
return shader_program(program);
}

fn init_buffers() -> GLuint {
@@ -106,7 +106,7 @@ fn init_buffers() -> GLuint {
0.0f32, 0.0f32, 0.0f32
];
buffer_data(ARRAY_BUFFER, vertices, STATIC_DRAW);
ret triangle_vertex_buffer;
return triangle_vertex_buffer;
}

fn draw_scene(shader_program: shader_program, vertex_buffer: GLuint) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.