Commits

Joseph Marshall committed dad5c43 Draft

Don't include SDL_GL_SwapBuffers; it can be added manually if needed.

  • Participants
  • Parent commits 4674b34

Comments (0)

Files changed (3)

examples/gles1.rs

 
 import gl::*;
 
+#[nolink]
+native mod SDL_ {
+    fn SDL_GL_SwapBuffers();
+}
+
 fn main() {
     sdl::init([sdl::init_video, sdl::init_timer]);
 
         glColor3f(1.0, 1.0, 1.0); glVertex3f(0.0, 100.0, 0.0);
     glEnd();
  
-    GL::SDL_GL_SwapBuffers();
+    SDL_::SDL_GL_SwapBuffers();
 }
 
 fn setup() {
     output_funcs.append((name, parse_params(params), types[ret]))
 
 output("native mod GL {");
-output("    fn SDL_GL_SwapBuffers();");
 for f in output_funcs:
     name,params,ret = f
     output("    fn "+name+"("+params+") -> "+ret+";")
 const GL_VERSION_4_1:uint = 1u;
 const GL_VERSION_4_2:uint = 1u;
 native mod GL {
-    fn SDL_GL_SwapBuffers();
     fn glClearColor(red: f32, green: f32, blue: f32, alpha: f32) -> ();
     fn glClear(mask: u32) -> ();
     fn glIndexMask(mask: u32) -> ();
 }
 fn glTexStorage3D(target: uint, levels: int, internalformat: uint, width: int, height: int, depth: int) -> () unsafe {
     ret GL::glTexStorage3D(target as u32, levels as i32, internalformat as u32, width as i32, height as i32, depth as i32);
-}
+}