diff --git a/Makefile.in b/Makefile.in index 971fb92..a8349e6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,6 +7,12 @@ AR ?= ar RUSTC ?= rustc RUSTFLAGS ?= +ifeq ($(shell uname -s),Darwin) +ifeq ($(shell sw_vers | grep -c 10.6),1) +RUSTFLAGS += --cfg mac_10_6 +endif +endif + RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') .PHONY: all diff --git a/gl2.rs b/gl2.rs index 12e72cf..ed21bc3 100644 --- a/gl2.rs +++ b/gl2.rs @@ -401,6 +401,7 @@ pub fn bind_texture(target: GLenum, texture: GLuint) { } } +#[cfg(not(target_os="macos", mac_10_6))] pub fn bind_vertex_array(array: GLuint) { unsafe { ll::glBindVertexArray(array); @@ -652,6 +653,7 @@ pub fn gen_textures(n: GLsizei) -> ~[GLuint] { } } +#[cfg(not(target_os="macos", mac_10_6))] pub fn gen_vertex_arrays(n: GLsizei) -> ~[GLuint] { unsafe { let result = from_elem(n as uint, 0 as GLuint); @@ -983,6 +985,7 @@ pub fn glBindRenderbuffer(++target: GLenum, ++renderbuffer: GLuint); pub fn glBindTexture(++target: GLenum, ++texture: GLuint); +#[cfg(not(target_os="macos", mac_10_6))] pub fn glBindVertexArray(++array: GLuint); pub fn glBlendColor(++red: GLclampf, ++green: GLclampf, ++blue: GLclampf, ++alpha: GLclampf); @@ -1081,6 +1084,7 @@ pub fn glGenRenderbuffers(++n: GLsizei, ++renderbuffers: *GLuint); pub fn glGenTextures(++n: GLsizei, ++textures: *GLuint); +#[cfg(not(target_os="macos", mac_10_6))] pub fn glGenVertexArrays(++n: GLsizei, arrays: *GLuint); pub fn glGetActiveAttrib(++program: GLuint, ++index: GLuint, ++bufsize: GLsizei, ++length: *GLsizei, ++size: *GLint, ++_type: *GLenum, ++name: *GLchar);