Commits

Joseph Marshall  committed 8aafa2f Draft

Nice version of glShaderSource.
Fixed ** types.

  • Participants
  • Parent commits da84104

Comments (0)

Files changed (2)

     ret str::from_bytes(infoLog);
 }}""".format(name=name))
 
+def glShaderSource():
+    output(
+"""
+fn glShaderSource(shader: uint, string: str) -> () unsafe {
+    let string_c_str = str::as_c_str(string) { |string_| string_ };
+    ret GL::glShaderSource(shader as u32, 1i32, ptr::addr_of(string_c_str as *u8), ptr::addr_of(string.len() as i32));
+}
+""");
+
 
 
 HEADER_FILES = ("/usr/include/GL/gl.h", "/usr/include/GL/glext.h")
     r = []
     for p in ps.split(','):
         p = p.strip()
-        ptr = '*' if '*' in p else ''
+        ptr = '*'*p.count('*')
         if ptr:
             p = p.replace('*', '')
 
     if name in ('glGetShaderInfoLog', 'glGetProgramInfoLog'):
         InfoLogTPL(name);
         continue
+    if name == 'glShaderSource':
+        glShaderSource()
+        continue
     if ret in nice:
         ret = nice[ret]
         ret_rep = ' as '+ret
 const GL_DOT3_RGB:uint = 0x86AEu;
 const GL_DOT3_RGBA:uint = 0x86AFu;
 const GL_CLAMP_TO_BORDER:uint = 0x812Du;
-const GL_GLEXT_VERSION:uint = 71u;
+const GL_GLEXT_VERSION:uint = 72u;
 const GL_BLEND_DST_RGB:uint = 0x80C8u;
 const GL_BLEND_SRC_RGB:uint = 0x80C9u;
 const GL_BLEND_DST_ALPHA:uint = 0x80CAu;
 const GL_LAYER_PROVOKING_VERTEX:uint = 0x825Eu;
 const GL_VIEWPORT_INDEX_PROVOKING_VERTEX:uint = 0x825Fu;
 const GL_UNDEFINED_VERTEX:uint = 0x8260u;
+const GL_UNPACK_COMPRESSED_BLOCK_WIDTH:uint = 0x9127u;
+const GL_UNPACK_COMPRESSED_BLOCK_HEIGHT:uint = 0x9128u;
+const GL_UNPACK_COMPRESSED_BLOCK_DEPTH:uint = 0x9129u;
+const GL_UNPACK_COMPRESSED_BLOCK_SIZE:uint = 0x912Au;
+const GL_PACK_COMPRESSED_BLOCK_WIDTH:uint = 0x912Bu;
+const GL_PACK_COMPRESSED_BLOCK_HEIGHT:uint = 0x912Cu;
+const GL_PACK_COMPRESSED_BLOCK_DEPTH:uint = 0x912Du;
+const GL_PACK_COMPRESSED_BLOCK_SIZE:uint = 0x912Eu;
+const GL_NUM_SAMPLE_COUNTS:uint = 0x9380u;
+const GL_MIN_MAP_BUFFER_ALIGNMENT:uint = 0x90BCu;
+const GL_ATOMIC_COUNTER_BUFFER:uint = 0x92C0u;
+const GL_ATOMIC_COUNTER_BUFFER_BINDING:uint = 0x92C1u;
+const GL_ATOMIC_COUNTER_BUFFER_START:uint = 0x92C2u;
+const GL_ATOMIC_COUNTER_BUFFER_SIZE:uint = 0x92C3u;
+const GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE:uint = 0x92C4u;
+const GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS:uint = 0x92C5u;
+const GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES:uint = 0x92C6u;
+const GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER:uint = 0x92C7u;
+const GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER:uint = 0x92C8u;
+const GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER:uint = 0x92CAu;
+const GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER:uint = 0x92CBu;
+const GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS:uint = 0x92CCu;
+const GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS:uint = 0x92CDu;
+const GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS:uint = 0x92CFu;
+const GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS:uint = 0x92D0u;
+const GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS:uint = 0x92D1u;
+const GL_MAX_VERTEX_ATOMIC_COUNTERS:uint = 0x92D2u;
+const GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS:uint = 0x92D3u;
+const GL_MAX_GEOMETRY_ATOMIC_COUNTERS:uint = 0x92D5u;
+const GL_MAX_FRAGMENT_ATOMIC_COUNTERS:uint = 0x92D6u;
+const GL_MAX_COMBINED_ATOMIC_COUNTERS:uint = 0x92D7u;
+const GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE:uint = 0x92D8u;
+const GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS:uint = 0x92DCu;
+const GL_ACTIVE_ATOMIC_COUNTER_BUFFERS:uint = 0x92D9u;
+const GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX:uint = 0x92DAu;
+const GL_UNSIGNED_INT_ATOMIC_COUNTER:uint = 0x92DBu;
+const GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT:uint = 0x00000001u;
+const GL_ELEMENT_ARRAY_BARRIER_BIT:uint = 0x00000002u;
+const GL_UNIFORM_BARRIER_BIT:uint = 0x00000004u;
+const GL_TEXTURE_FETCH_BARRIER_BIT:uint = 0x00000008u;
+const GL_SHADER_IMAGE_ACCESS_BARRIER_BIT:uint = 0x00000020u;
+const GL_COMMAND_BARRIER_BIT:uint = 0x00000040u;
+const GL_PIXEL_BUFFER_BARRIER_BIT:uint = 0x00000080u;
+const GL_TEXTURE_UPDATE_BARRIER_BIT:uint = 0x00000100u;
+const GL_BUFFER_UPDATE_BARRIER_BIT:uint = 0x00000200u;
+const GL_FRAMEBUFFER_BARRIER_BIT:uint = 0x00000400u;
+const GL_TRANSFORM_FEEDBACK_BARRIER_BIT:uint = 0x00000800u;
+const GL_ATOMIC_COUNTER_BARRIER_BIT:uint = 0x00001000u;
+const GL_ALL_BARRIER_BITS:uint = 0xFFFFFFFFu;
+const GL_MAX_IMAGE_UNITS:uint = 0x8F38u;
+const GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS:uint = 0x8F39u;
+const GL_IMAGE_BINDING_NAME:uint = 0x8F3Au;
+const GL_IMAGE_BINDING_LEVEL:uint = 0x8F3Bu;
+const GL_IMAGE_BINDING_LAYERED:uint = 0x8F3Cu;
+const GL_IMAGE_BINDING_LAYER:uint = 0x8F3Du;
+const GL_IMAGE_BINDING_ACCESS:uint = 0x8F3Eu;
+const GL_IMAGE_1D:uint = 0x904Cu;
+const GL_IMAGE_2D:uint = 0x904Du;
+const GL_IMAGE_3D:uint = 0x904Eu;
+const GL_IMAGE_2D_RECT:uint = 0x904Fu;
+const GL_IMAGE_CUBE:uint = 0x9050u;
+const GL_IMAGE_BUFFER:uint = 0x9051u;
+const GL_IMAGE_1D_ARRAY:uint = 0x9052u;
+const GL_IMAGE_2D_ARRAY:uint = 0x9053u;
+const GL_IMAGE_CUBE_MAP_ARRAY:uint = 0x9054u;
+const GL_IMAGE_2D_MULTISAMPLE:uint = 0x9055u;
+const GL_IMAGE_2D_MULTISAMPLE_ARRAY:uint = 0x9056u;
+const GL_INT_IMAGE_1D:uint = 0x9057u;
+const GL_INT_IMAGE_2D:uint = 0x9058u;
+const GL_INT_IMAGE_3D:uint = 0x9059u;
+const GL_INT_IMAGE_2D_RECT:uint = 0x905Au;
+const GL_INT_IMAGE_CUBE:uint = 0x905Bu;
+const GL_INT_IMAGE_BUFFER:uint = 0x905Cu;
+const GL_INT_IMAGE_1D_ARRAY:uint = 0x905Du;
+const GL_INT_IMAGE_2D_ARRAY:uint = 0x905Eu;
+const GL_INT_IMAGE_CUBE_MAP_ARRAY:uint = 0x905Fu;
+const GL_INT_IMAGE_2D_MULTISAMPLE:uint = 0x9060u;
+const GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY:uint = 0x9061u;
+const GL_UNSIGNED_INT_IMAGE_1D:uint = 0x9062u;
+const GL_UNSIGNED_INT_IMAGE_2D:uint = 0x9063u;
+const GL_UNSIGNED_INT_IMAGE_3D:uint = 0x9064u;
+const GL_UNSIGNED_INT_IMAGE_2D_RECT:uint = 0x9065u;
+const GL_UNSIGNED_INT_IMAGE_CUBE:uint = 0x9066u;
+const GL_UNSIGNED_INT_IMAGE_BUFFER:uint = 0x9067u;
+const GL_UNSIGNED_INT_IMAGE_1D_ARRAY:uint = 0x9068u;
+const GL_UNSIGNED_INT_IMAGE_2D_ARRAY:uint = 0x9069u;
+const GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY:uint = 0x906Au;
+const GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE:uint = 0x906Bu;
+const GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY:uint = 0x906Cu;
+const GL_MAX_IMAGE_SAMPLES:uint = 0x906Du;
+const GL_IMAGE_BINDING_FORMAT:uint = 0x906Eu;
+const GL_MAX_VERTEX_IMAGE_UNIFORMS:uint = 0x90CAu;
+const GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS:uint = 0x90CBu;
+const GL_MAX_GEOMETRY_IMAGE_UNIFORMS:uint = 0x90CDu;
+const GL_MAX_FRAGMENT_IMAGE_UNIFORMS:uint = 0x90CEu;
+const GL_MAX_COMBINED_IMAGE_UNIFORMS:uint = 0x90CFu;
+const GL_TEXTURE_IMMUTABLE_FORMAT:uint = 0x912Fu;
 const GL_PHONG_WIN:uint = 0x80EAu;
 const GL_PHONG_HINT_WIN:uint = 0x80EBu;
 const GL_FOG_SPECULAR_TEXTURE_WIN:uint = 0x80ECu;
 const GL_VERSION_3_3:uint = 1u;
 const GL_VERSION_4_0:uint = 1u;
 const GL_VERSION_4_1:uint = 1u;
+const GL_VERSION_4_2:uint = 1u;
 const GL_WIN_phong_shading:uint = 1u;
 const GL_WIN_specular_fog:uint = 1u;
 const GL_REND_screen_coordinates:uint = 1u;
     fn glIndexPointer(type_: u32, stride: i32, ptr: *()) -> ();
     fn glTexCoordPointer(size: i32, type_: u32, stride: i32, ptr: *()) -> ();
     fn glEdgeFlagPointer(stride: i32, ptr: *()) -> ();
-    fn glGetPointerv(pname: u32, params: *()) -> ();
+    fn glGetPointerv(pname: u32, params: **()) -> ();
     fn glArrayElement(i: i32) -> ();
     fn glDrawArrays(mode: u32, first: i32, count: i32) -> ();
     fn glDrawElements(mode: u32, count: i32, type_: u32, indices: *()) -> ();
     fn glSampleCoverage(value: f32, invert: u8) -> ();
     fn glBlendFuncSeparate(sfactorRGB: u32, dfactorRGB: u32, sfactorAlpha: u32, dfactorAlpha: u32) -> ();
     fn glMultiDrawArrays(mode: u32, first: *i32, count: *i32, primcount: i32) -> ();
-    fn glMultiDrawElements(mode: u32, count: *i32, type_: u32, indices: *(), primcount: i32) -> ();
+    fn glMultiDrawElements(mode: u32, count: *i32, type_: u32, indices: **(), primcount: i32) -> ();
     fn glPointParameterf(pname: u32, param: f32) -> ();
     fn glPointParameterfv(pname: u32, params: *f32) -> ();
     fn glPointParameteri(pname: u32, param: i32) -> ();
     fn glMapBuffer(target: u32, access: u32) -> *();
     fn glUnmapBuffer(target: u32) -> u8;
     fn glGetBufferParameteriv(target: u32, pname: u32, params: *i32) -> ();
-    fn glGetBufferPointerv(target: u32, pname: u32, params: *()) -> ();
+    fn glGetBufferPointerv(target: u32, pname: u32, params: **()) -> ();
     fn glBlendEquationSeparate(modeRGB: u32, modeAlpha: u32) -> ();
     fn glDrawBuffers(n: i32, bufs: *u32) -> ();
     fn glStencilOpSeparate(face: u32, sfail: u32, dpfail: u32, dppass: u32) -> ();
     fn glGetVertexAttribdv(index: u32, pname: u32, params: *f64) -> ();
     fn glGetVertexAttribfv(index: u32, pname: u32, params: *f32) -> ();
     fn glGetVertexAttribiv(index: u32, pname: u32, params: *i32) -> ();
-    fn glGetVertexAttribPointerv(index: u32, pname: u32, pointer: *()) -> ();
+    fn glGetVertexAttribPointerv(index: u32, pname: u32, pointer: **()) -> ();
     fn glIsProgram(program: u32) -> u8;
     fn glIsShader(shader: u32) -> u8;
     fn glLinkProgram(program: u32) -> ();
-    fn glShaderSource(shader: u32, count: i32, string: *u8, length: *i32) -> ();
+    fn glShaderSource(shader: u32, count: i32, string: **u8, length: *i32) -> ();
     fn glUseProgram(program: u32) -> ();
     fn glUniform1f(location: i32, v0: f32) -> ();
     fn glUniform2f(location: i32, v0: f32, v1: f32) -> ();
     fn glDeleteVertexArrays(n: i32, arrays: *u32) -> ();
     fn glGenVertexArrays(n: i32, arrays: *u32) -> ();
     fn glIsVertexArray(array: u32) -> u8;
-    fn glGetUniformIndices(program: u32, uniformCount: i32, uniformNames: *u8, uniformIndices: *u32) -> ();
+    fn glGetUniformIndices(program: u32, uniformCount: i32, uniformNames: **u8, uniformIndices: *u32) -> ();
     fn glGetActiveUniformsiv(program: u32, uniformCount: i32, uniformIndices: *u32, pname: u32, params: *i32) -> ();
     fn glGetActiveUniformName(program: u32, uniformIndex: u32, bufSize: i32, length: *i32, uniformName: *u8) -> ();
     fn glGetUniformBlockIndex(program: u32, uniformBlockName: *u8) -> u32;
     fn glDrawElementsBaseVertex(mode: u32, count: i32, type_: u32, indices: *(), basevertex: i32) -> ();
     fn glDrawRangeElementsBaseVertex(mode: u32, start: u32, end: u32, count: i32, type_: u32, indices: *(), basevertex: i32) -> ();
     fn glDrawElementsInstancedBaseVertex(mode: u32, count: i32, type_: u32, indices: *(), primcount: i32, basevertex: i32) -> ();
-    fn glMultiDrawElementsBaseVertex(mode: u32, count: *i32, type_: u32, indices: *(), primcount: i32, basevertex: *i32) -> ();
+    fn glMultiDrawElementsBaseVertex(mode: u32, count: *i32, type_: u32, indices: **(), primcount: i32, basevertex: *i32) -> ();
     fn glProvokingVertex(mode: u32) -> ();
     fn glIsSync() -> u8;
     fn glDeleteSync() -> ();
     fn glProgramParameteri(program: u32, pname: u32, value: i32) -> ();
     fn glUseProgramStages(pipeline: u32, stages: u32, program: u32) -> ();
     fn glActiveShaderProgram(pipeline: u32, program: u32) -> ();
-    fn glCreateShaderProgramv(type_: u32, count: i32, strings: *u8) -> u32;
+    fn glCreateShaderProgramv(type_: u32, count: i32, strings: **u8) -> u32;
     fn glBindProgramPipeline(pipeline: u32) -> ();
     fn glDeleteProgramPipelines(n: i32, pipelines: *u32) -> ();
     fn glGenProgramPipelines(n: i32, pipelines: *u32) -> ();
     fn glDepthRangeIndexed(index: u32, n: f64, f: f64) -> ();
     fn glGetFloati_v(target: u32, index: u32, data: *f32) -> ();
     fn glGetDoublei_v(target: u32, index: u32, data: *f64) -> ();
+    fn glDrawArraysInstancedBaseInstance(mode: u32, first: i32, count: i32, primcount: i32, baseinstance: u32) -> ();
+    fn glDrawElementsInstancedBaseInstance(mode: u32, count: i32, type_: u32, indices: *(), primcount: i32, baseinstance: u32) -> ();
+    fn glDrawElementsInstancedBaseVertexBaseInstance(mode: u32, count: i32, type_: u32, indices: *(), primcount: i32, basevertex: i32, baseinstance: u32) -> ();
+    fn glGetInternalformativ(target: u32, internalformat: u32, pname: u32, bufSize: i32, params: *i32) -> ();
+    fn glGetActiveAtomicCounterBufferiv(program: u32, bufferIndex: u32, pname: u32, params: *i32) -> ();
+    fn glBindImageTexture(unit: u32, texture: u32, level: i32, layered: u8, layer: i32, access: u32, format: u32) -> ();
+    fn glMemoryBarrier(barriers: u32) -> ();
+    fn glTexStorage1D(target: u32, levels: i32, internalformat: u32, width: i32) -> ();
+    fn glTexStorage2D(target: u32, levels: i32, internalformat: u32, width: i32, height: i32) -> ();
+    fn glTexStorage3D(target: u32, levels: i32, internalformat: u32, width: i32, height: i32, depth: i32) -> ();
 }
 fn glClearColor(red: float, green: float, blue: float, alpha: float) -> () unsafe {
     ret GL::glClearColor(red as f32, green as f32, blue as f32, alpha as f32);
 fn glEdgeFlagPointer(stride: int, ptr: *()) -> () unsafe {
     ret GL::glEdgeFlagPointer(stride as i32, ptr);
 }
-fn glGetPointerv(pname: uint, params: *()) -> () unsafe {
+fn glGetPointerv(pname: uint, params: **()) -> () unsafe {
     ret GL::glGetPointerv(pname as u32, params);
 }
 fn glArrayElement(i: int) -> () unsafe {
 fn glMultiDrawArrays(mode: uint, first: *i32, count: *i32, primcount: int) -> () unsafe {
     ret GL::glMultiDrawArrays(mode as u32, first, count, primcount as i32);
 }
-fn glMultiDrawElements(mode: uint, count: *i32, type_: uint, indices: *(), primcount: int) -> () unsafe {
+fn glMultiDrawElements(mode: uint, count: *i32, type_: uint, indices: **(), primcount: int) -> () unsafe {
     ret GL::glMultiDrawElements(mode as u32, count, type_ as u32, indices, primcount as i32);
 }
 fn glPointParameterf(pname: uint, param: float) -> () unsafe {
 fn glGetBufferParameteriv(target: uint, pname: uint, params: *i32) -> () unsafe {
     ret GL::glGetBufferParameteriv(target as u32, pname as u32, params);
 }
-fn glGetBufferPointerv(target: uint, pname: uint, params: *()) -> () unsafe {
+fn glGetBufferPointerv(target: uint, pname: uint, params: **()) -> () unsafe {
     ret GL::glGetBufferPointerv(target as u32, pname as u32, params);
 }
 fn glBlendEquationSeparate(modeRGB: uint, modeAlpha: uint) -> () unsafe {
 fn glGetVertexAttribiv(index: uint, pname: uint, params: *i32) -> () unsafe {
     ret GL::glGetVertexAttribiv(index as u32, pname as u32, params);
 }
-fn glGetVertexAttribPointerv(index: uint, pname: uint, pointer: *()) -> () unsafe {
+fn glGetVertexAttribPointerv(index: uint, pname: uint, pointer: **()) -> () unsafe {
     ret GL::glGetVertexAttribPointerv(index as u32, pname as u32, pointer);
 }
 fn glIsProgram(program: uint) -> uint unsafe {
 fn glLinkProgram(program: uint) -> () unsafe {
     ret GL::glLinkProgram(program as u32);
 }
-fn glShaderSource(shader: uint, count: int, string: str, length: *i32) -> () unsafe {
+
+fn glShaderSource(shader: uint, string: str) -> () unsafe {
     let string_c_str = str::as_c_str(string) { |string_| string_ };
-    ret GL::glShaderSource(shader as u32, count as i32, string_c_str as *u8, length);
-}
+    ret GL::glShaderSource(shader as u32, 1i32, ptr::addr_of(string_c_str as *u8), ptr::addr_of(string.len() as i32));
+}
+
 fn glUseProgram(program: uint) -> () unsafe {
     ret GL::glUseProgram(program as u32);
 }
 fn glIsVertexArray(array: uint) -> uint unsafe {
     ret GL::glIsVertexArray(array as u32) as uint;
 }
-fn glGetUniformIndices(program: uint, uniformCount: int, uniformNames: str, uniformIndices: *u32) -> () unsafe {
-    let uniformNames_c_str = str::as_c_str(uniformNames) { |uniformNames_| uniformNames_ };
-    ret GL::glGetUniformIndices(program as u32, uniformCount as i32, uniformNames_c_str as *u8, uniformIndices);
+fn glGetUniformIndices(program: uint, uniformCount: int, uniformNames: **u8, uniformIndices: *u32) -> () unsafe {
+    ret GL::glGetUniformIndices(program as u32, uniformCount as i32, uniformNames, uniformIndices);
 }
 fn glGetActiveUniformsiv(program: uint, uniformCount: int, uniformIndices: *u32, pname: uint, params: *i32) -> () unsafe {
     ret GL::glGetActiveUniformsiv(program as u32, uniformCount as i32, uniformIndices, pname as u32, params);
 fn glDrawElementsInstancedBaseVertex(mode: uint, count: int, type_: uint, indices: *(), primcount: int, basevertex: int) -> () unsafe {
     ret GL::glDrawElementsInstancedBaseVertex(mode as u32, count as i32, type_ as u32, indices, primcount as i32, basevertex as i32);
 }
-fn glMultiDrawElementsBaseVertex(mode: uint, count: *i32, type_: uint, indices: *(), primcount: int, basevertex: *i32) -> () unsafe {
+fn glMultiDrawElementsBaseVertex(mode: uint, count: *i32, type_: uint, indices: **(), primcount: int, basevertex: *i32) -> () unsafe {
     ret GL::glMultiDrawElementsBaseVertex(mode as u32, count, type_ as u32, indices, primcount as i32, basevertex);
 }
 fn glProvokingVertex(mode: uint) -> () unsafe {
 fn glActiveShaderProgram(pipeline: uint, program: uint) -> () unsafe {
     ret GL::glActiveShaderProgram(pipeline as u32, program as u32);
 }
-fn glCreateShaderProgramv(type_: uint, count: int, strings: str) -> uint unsafe {
-    let strings_c_str = str::as_c_str(strings) { |strings_| strings_ };
-    ret GL::glCreateShaderProgramv(type_ as u32, count as i32, strings_c_str as *u8) as uint;
+fn glCreateShaderProgramv(type_: uint, count: int, strings: **u8) -> uint unsafe {
+    ret GL::glCreateShaderProgramv(type_ as u32, count as i32, strings) as uint;
 }
 fn glBindProgramPipeline(pipeline: uint) -> () unsafe {
     ret GL::glBindProgramPipeline(pipeline as u32);
 fn glGetFloati_v(target: uint, index: uint, data: *f32) -> () unsafe {
     ret GL::glGetFloati_v(target as u32, index as u32, data);
 }
-fn glGetDoublei_v(target: uint, index: uint, data: *f64) -> () unsafe {
+fn glDrawArraysInstancedBaseInstance(mode: uint, first: int, count: int, primcount: int, baseinstance: uint) -> () unsafe {
+    ret GL::glDrawArraysInstancedBaseInstance(mode as u32, first as i32, count as i32, primcount as i32, baseinstance as u32);
+}
+fn glDrawElementsInstancedBaseInstance(mode: uint, count: int, type_: uint, indices: *(), primcount: int, baseinstance: uint) -> () unsafe {
+    ret GL::glDrawElementsInstancedBaseInstance(mode as u32, count as i32, type_ as u32, indices, primcount as i32, baseinstance as u32);
+}
+fn glDrawElementsInstancedBaseVertexBaseInstance(mode: uint, count: int, type_: uint, indices: *(), primcount: int, basevertex: int, baseinstance: uint) -> () unsafe {
+    ret GL::glDrawElementsInstancedBaseVertexBaseInstance(mode as u32, count as i32, type_ as u32, indices, primcount as i32, basevertex as i32, baseinstance as u32);
+}
+fn glGetInternalformativ(target: uint, internalformat: uint, pname: uint, bufSize: int, params: *i32) -> () unsafe {
+    ret GL::glGetInternalformativ(target as u32, internalformat as u32, pname as u32, bufSize as i32, params);
+}
+fn glGetActiveAtomicCounterBufferiv(program: uint, bufferIndex: uint, pname: uint, params: *i32) -> () unsafe {
+    ret GL::glGetActiveAtomicCounterBufferiv(program as u32, bufferIndex as u32, pname as u32, params);
+}
+fn glBindImageTexture(unit: uint, texture: uint, level: int, layered: uint, layer: int, access: uint, format: uint) -> () unsafe {
+    ret GL::glBindImageTexture(unit as u32, texture as u32, level as i32, layered as u8, layer as i32, access as u32, format as u32);
+}
+fn glMemoryBarrier(barriers: uint) -> () unsafe {
+    ret GL::glMemoryBarrier(barriers as u32);
+}
+fn glTexStorage1D(target: uint, levels: int, internalformat: uint, width: int) -> () unsafe {
+    ret GL::glTexStorage1D(target as u32, levels as i32, internalformat as u32, width as i32);
+}
+fn glTexStorage2D(target: uint, levels: int, internalformat: uint, width: int, height: int) -> () unsafe {
+    ret GL::glTexStorage2D(target as u32, levels as i32, internalformat as u32, width as i32, height as i32);
+}
+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);
+}fn glGetDoublei_v(target: uint, index: uint, data: *f64) -> () unsafe {
     ret GL::glGetDoublei_v(target as u32, index as u32, data);
 }