pub struct GlFns { /* private fields */ }Implementations§
Source§impl GlFns
impl GlFns
Sourcepub fn ActiveTexture(&self, texture: GLenum)
pub fn ActiveTexture(&self, texture: GLenum)
Sourcepub fn AttachShader(&self, program: GLuint, shader: GLuint)
pub fn AttachShader(&self, program: GLuint, shader: GLuint)
Sourcepub fn BindBuffer(&self, target: GLenum, buffer: GLuint)
pub fn BindBuffer(&self, target: GLenum, buffer: GLuint)
Sourcepub unsafe fn BindBufferBase(
&self,
target: GLenum,
index: GLuint,
buffer: GLuint,
)
pub unsafe fn BindBufferBase( &self, target: GLenum, index: GLuint, buffer: GLuint, )
Sourcepub unsafe fn BindBufferRange(
&self,
target: GLenum,
index: GLuint,
buffer: GLuint,
offset: GLintptr,
size: GLsizeiptr,
)
pub unsafe fn BindBufferRange( &self, target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr, )
Sourcepub unsafe fn BindFramebuffer(&self, target: GLenum, framebuffer: GLuint)
pub unsafe fn BindFramebuffer(&self, target: GLenum, framebuffer: GLuint)
Sourcepub fn BindRenderbuffer(&self, target: GLenum, renderbuffer: GLuint)
pub fn BindRenderbuffer(&self, target: GLenum, renderbuffer: GLuint)
Sourcepub fn BindTexture(&self, target: GLenum, texture: GLuint)
pub fn BindTexture(&self, target: GLenum, texture: GLuint)
Sourcepub fn BindVertexArray(&self, array: GLuint)
pub fn BindVertexArray(&self, array: GLuint)
Sourcepub fn BlendEquation(&self, mode: GLenum)
pub fn BlendEquation(&self, mode: GLenum)
Sourcepub fn BlendFunci(&self, buf: GLuint, sfactor: GLenum, dfactor: GLenum)
pub fn BlendFunci(&self, buf: GLuint, sfactor: GLenum, dfactor: GLenum)
Sourcepub unsafe fn BlitFramebuffer(
&self,
srcX0: GLint,
srcY0: GLint,
srcX1: GLint,
srcY1: GLint,
dstX0: GLint,
dstY0: GLint,
dstX1: GLint,
dstY1: GLint,
mask: GLbitfield,
filter: GLenum,
)
pub unsafe fn BlitFramebuffer( &self, srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum, )
Sourcepub unsafe fn BufferData(
&self,
target: GLenum,
size: GLsizeiptr,
data: *const void,
usage: GLenum,
)
pub unsafe fn BufferData( &self, target: GLenum, size: GLsizeiptr, data: *const void, usage: GLenum, )
Sourcepub unsafe fn BufferSubData(
&self,
target: GLenum,
offset: GLintptr,
size: GLsizeiptr,
data: *const void,
)
pub unsafe fn BufferSubData( &self, target: GLenum, offset: GLintptr, size: GLsizeiptr, data: *const void, )
Sourcepub fn CheckFramebufferStatus(&self, target: GLenum) -> GLenum
pub fn CheckFramebufferStatus(&self, target: GLenum) -> GLenum
Sourcepub fn Clear(&self, mask: GLbitfield)
pub fn Clear(&self, mask: GLbitfield)
glClear (GL 1.0, GLES 2.0)
This sets the bitplane area of the window to values previously selected by ClearColor, ClearDepth, and ClearStencil.
maskcan contain any of the following bits:GL_COLOR_BUFFER_BITGL_DEPTH_BUFFER_BITGL_STENCIL_BUFFER_BIT
Multiple color buffers can be cleared simultaneously by selecting more than one buffer at a time using DrawBuffer.
The pixel ownership test, the scissor test, dithering, and the buffer
writemasks affect the operation of Clear. The scissor box bounds the
cleared region. Alpha function, blend function, logical operation,
stenciling, texture mapping, and depth-buffering are ignored by Clear.
§Errors
GL_INVALID_VALUEis generated if any bit other than the three defined bits is set inmask.
Sourcepub unsafe fn ClearBufferfv(
&self,
buffer: GLenum,
drawbuffer: GLint,
value: *const GLfloat,
)
pub unsafe fn ClearBufferfv( &self, buffer: GLenum, drawbuffer: GLint, value: *const GLfloat, )
Sourcepub fn ClearColor(
&self,
red: GLfloat,
green: GLfloat,
blue: GLfloat,
alpha: GLfloat,
)
pub fn ClearColor( &self, red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat, )
glClearColor (GL 1.0, GLES 2.0)
Specifies the red, green, blue, and alpha values used by
Clear when clearing the color buffers.
All inputs are silently clamped to 0.0 ..= 1.0
§Associated Gets
GL_COLOR_CLEAR_VALUE
Sourcepub fn ClearDepth(&self, depth: GLdouble)
pub fn ClearDepth(&self, depth: GLdouble)
glClearDepth (GL 1.0, GLES -)
Specifies the depth value used when the depth buffer is cleared. The initial value is 1.0
§Associated Gets
GL_DEPTH_CLEAR_VALUE
Sourcepub fn ClearStencil(&self, s: GLint)
pub fn ClearStencil(&self, s: GLint)
glClearStencil (GL 1.0, GLES 2.0)
Specifies the index used when the stencil buffer is cleared. The initial value is 0.
The input is masked with 2**m - 1, where m is the number of bits in the
stencil buffer.
§Associated Gets
GL_STENCIL_CLEAR_VALUEGL_STENCIL_BITS
Sourcepub fn CompileShader(&self, shader: GLuint)
pub fn CompileShader(&self, shader: GLuint)
Sourcepub fn CreateProgram(&self) -> GLuint
pub fn CreateProgram(&self) -> GLuint
Sourcepub fn CreateShader(&self, shaderType: GLenum) -> GLuint
pub fn CreateShader(&self, shaderType: GLenum) -> GLuint
Sourcepub unsafe fn DebugMessageCallback(
&self,
callback: Option<GLDEBUGPROC>,
userParam: *const void,
)
pub unsafe fn DebugMessageCallback( &self, callback: Option<GLDEBUGPROC>, userParam: *const void, )
glDebugMessageCallback (GL_KHR_debug, GL 4.3, GLES 3.2)
Called by the GL driver to notify the program of various events.
Sourcepub unsafe fn DebugMessageControl(
&self,
source: GLenum,
type_: GLenum,
severity: GLenum,
count: GLsizei,
ids: *const GLuint,
enabled: GLboolean,
)
pub unsafe fn DebugMessageControl( &self, source: GLenum, type_: GLenum, severity: GLenum, count: GLsizei, ids: *const GLuint, enabled: GLboolean, )
glDebugMessageControl (GL_KHR_debug, GL 4.3, GLES 3.2)
Allows the program to set filters on what events will trigger the debug callback.
Sourcepub unsafe fn DebugMessageInsert(
&self,
source: GLenum,
type_: GLenum,
id: GLuint,
severity: GLenum,
length: GLint,
buf: *const u8,
)
pub unsafe fn DebugMessageInsert( &self, source: GLenum, type_: GLenum, id: GLuint, severity: GLenum, length: GLint, buf: *const u8, )
glDebugMessageInsert (GL_KHR_debug, GL 4.3, GLES 3.2)
Allows the program to send a debug event to the driver, which will then call the callback (if the event isn’t filtered).
Sourcepub unsafe fn DeleteBuffers(&self, n: GLsizei, buffers: *const GLuint)
pub unsafe fn DeleteBuffers(&self, n: GLsizei, buffers: *const GLuint)
Sourcepub unsafe fn DeleteFramebuffers(&self, n: GLsizei, framebuffers: *mut GLuint)
pub unsafe fn DeleteFramebuffers(&self, n: GLsizei, framebuffers: *mut GLuint)
Sourcepub fn DeleteProgram(&self, program: GLuint)
pub fn DeleteProgram(&self, program: GLuint)
Sourcepub fn DeleteShader(&self, shader: GLuint)
pub fn DeleteShader(&self, shader: GLuint)
Sourcepub unsafe fn DeleteTextures(&self, n: GLsizei, textures: *const GLuint)
pub unsafe fn DeleteTextures(&self, n: GLsizei, textures: *const GLuint)
Sourcepub unsafe fn DeleteVertexArrays(&self, n: GLsizei, arrays: *const GLuint)
pub unsafe fn DeleteVertexArrays(&self, n: GLsizei, arrays: *const GLuint)
Sourcepub fn DisableVertexAttribArray(&self, index: GLuint)
pub fn DisableVertexAttribArray(&self, index: GLuint)
Sourcepub unsafe fn DrawArrays(&self, mode: GLenum, first: GLint, count: GLsizei)
pub unsafe fn DrawArrays(&self, mode: GLenum, first: GLint, count: GLsizei)
Sourcepub unsafe fn DrawArraysInstanced(
&self,
mode: GLenum,
first: GLint,
count: GLsizei,
instancecount: GLsizei,
)
pub unsafe fn DrawArraysInstanced( &self, mode: GLenum, first: GLint, count: GLsizei, instancecount: GLsizei, )
Sourcepub fn DrawBuffer(&self, buf: GLenum)
pub fn DrawBuffer(&self, buf: GLenum)
Sourcepub unsafe fn DrawBuffers(&self, n: GLsizei, bufs: *const GLenum)
pub unsafe fn DrawBuffers(&self, n: GLsizei, bufs: *const GLenum)
Sourcepub unsafe fn DrawElements(
&self,
mode: GLenum,
count: GLsizei,
type_: GLenum,
indices: *const void,
)
pub unsafe fn DrawElements( &self, mode: GLenum, count: GLsizei, type_: GLenum, indices: *const void, )
Sourcepub unsafe fn DrawElementsInstanced(
&self,
mode: GLenum,
count: GLsizei,
type_: GLenum,
indices: *const void,
instancecount: GLsizei,
)
pub unsafe fn DrawElementsInstanced( &self, mode: GLenum, count: GLsizei, type_: GLenum, indices: *const void, instancecount: GLsizei, )
Sourcepub fn EnableVertexAttribArray(&self, index: GLuint)
pub fn EnableVertexAttribArray(&self, index: GLuint)
Sourcepub fn FramebufferRenderbuffer(
&self,
target: GLenum,
attachment: GLenum,
renderbuffertarget: GLenum,
renderbuffer: GLuint,
)
pub fn FramebufferRenderbuffer( &self, target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint, )
Sourcepub fn FramebufferTexture(
&self,
target: GLenum,
attachment: GLenum,
texture: GLuint,
level: GLint,
)
pub fn FramebufferTexture( &self, target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, )
Sourcepub fn FramebufferTexture2D(
&self,
target: GLenum,
attachment: GLenum,
textarget: GLenum,
texture: GLuint,
level: GLint,
)
pub fn FramebufferTexture2D( &self, target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, )
Sourcepub unsafe fn GenBuffers(&self, n: GLsizei, buffers: *mut GLuint)
pub unsafe fn GenBuffers(&self, n: GLsizei, buffers: *mut GLuint)
Sourcepub unsafe fn GenFramebuffers(&self, n: GLsizei, ids: *mut GLuint)
pub unsafe fn GenFramebuffers(&self, n: GLsizei, ids: *mut GLuint)
Sourcepub unsafe fn GenRenderbuffers(&self, n: GLsizei, renderbuffers: *mut GLuint)
pub unsafe fn GenRenderbuffers(&self, n: GLsizei, renderbuffers: *mut GLuint)
Sourcepub unsafe fn GenTextures(&self, n: GLsizei, textures: *mut GLuint)
pub unsafe fn GenTextures(&self, n: GLsizei, textures: *mut GLuint)
Sourcepub unsafe fn GenVertexArrays(&self, n: GLsizei, arrays: *mut GLuint)
pub unsafe fn GenVertexArrays(&self, n: GLsizei, arrays: *mut GLuint)
Sourcepub fn GenerateMipmap(&self, target: GLenum)
pub fn GenerateMipmap(&self, target: GLenum)
Sourcepub unsafe fn GetIntegerv(&self, pname: GLenum, data: *mut GLint)
pub unsafe fn GetIntegerv(&self, pname: GLenum, data: *mut GLint)
Sourcepub unsafe fn GetProgramInfoLog(
&self,
program: GLuint,
maxLength: GLsizei,
length: *mut GLsizei,
infoLog: *mut GLchar,
)
pub unsafe fn GetProgramInfoLog( &self, program: GLuint, maxLength: GLsizei, length: *mut GLsizei, infoLog: *mut GLchar, )
Sourcepub unsafe fn GetShaderInfoLog(
&self,
shader: GLuint,
maxLength: GLsizei,
length: *mut GLsizei,
infoLog: *mut GLchar,
)
pub unsafe fn GetShaderInfoLog( &self, shader: GLuint, maxLength: GLsizei, length: *mut GLsizei, infoLog: *mut GLchar, )
Sourcepub unsafe fn GetUniformBlockIndex(
&self,
program: GLuint,
uniformBlockName: *const GLchar,
) -> GLuint
pub unsafe fn GetUniformBlockIndex( &self, program: GLuint, uniformBlockName: *const GLchar, ) -> GLuint
Sourcepub fn LinkProgram(&self, program: GLuint)
pub fn LinkProgram(&self, program: GLuint)
Sourcepub fn PixelStorei(&self, pname: GLenum, param: GLint)
pub fn PixelStorei(&self, pname: GLenum, param: GLint)
Sourcepub fn PolygonMode(&self, face: GLenum, mode: GLenum)
pub fn PolygonMode(&self, face: GLenum, mode: GLenum)
Sourcepub fn ReadBuffer(&self, mode: GLenum)
pub fn ReadBuffer(&self, mode: GLenum)
Sourcepub fn RenderbufferStorage(
&self,
target: GLenum,
internalformat: GLenum,
width: GLsizei,
height: GLsizei,
)
pub fn RenderbufferStorage( &self, target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, )
Sourcepub fn RenderbufferStorageMultisample(
&self,
target: GLenum,
samples: GLsizei,
internalformat: GLenum,
width: GLsizei,
height: GLsizei,
)
pub fn RenderbufferStorageMultisample( &self, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, )
Sourcepub unsafe fn ShaderSource(
&self,
shader: GLuint,
count: GLsizei,
string: *const *mut GLchar,
length: *const GLint,
)
pub unsafe fn ShaderSource( &self, shader: GLuint, count: GLsizei, string: *const *mut GLchar, length: *const GLint, )
Sourcepub fn StencilFunc(&self, func: GLenum, ref_: GLint, mask: GLuint)
pub fn StencilFunc(&self, func: GLenum, ref_: GLint, mask: GLuint)
Sourcepub fn StencilMask(&self, mask: GLuint)
pub fn StencilMask(&self, mask: GLuint)
Sourcepub unsafe fn TexImage2D(
&self,
target: GLenum,
level: GLint,
internalformat: GLint,
width: GLsizei,
height: GLsizei,
border: GLint,
format: GLenum,
type_: GLenum,
data: *const void,
)
pub unsafe fn TexImage2D( &self, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type_: GLenum, data: *const void, )
Sourcepub fn TexImage2DMultisample(
&self,
target: GLenum,
samples: GLsizei,
internalformat: GLenum,
width: GLsizei,
height: GLsizei,
fixedsamplelocations: GLboolean,
)
pub fn TexImage2DMultisample( &self, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, fixedsamplelocations: GLboolean, )
Sourcepub unsafe fn TexImage3D(
&self,
target: GLenum,
level: GLint,
internalformat: GLint,
width: GLsizei,
height: GLsizei,
depth: GLsizei,
border: GLint,
format: GLenum,
type_: GLenum,
data: *const void,
)
pub unsafe fn TexImage3D( &self, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type_: GLenum, data: *const void, )
Sourcepub fn TexParameteri(&self, target: GLenum, pname: GLenum, param: GLint)
pub fn TexParameteri(&self, target: GLenum, pname: GLenum, param: GLint)
Sourcepub unsafe fn Uniform1fv(
&self,
location: GLint,
count: GLsizei,
value: *const [GLfloat; 1],
)
pub unsafe fn Uniform1fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 1], )
Sourcepub unsafe fn Uniform2fv(
&self,
location: GLint,
count: GLsizei,
value: *const [GLfloat; 2],
)
pub unsafe fn Uniform2fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 2], )
Sourcepub unsafe fn Uniform3fv(
&self,
location: GLint,
count: GLsizei,
value: *const [GLfloat; 3],
)
pub unsafe fn Uniform3fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 3], )
Sourcepub fn Uniform4f(
&self,
location: GLint,
v0: GLfloat,
v1: GLfloat,
v2: GLfloat,
v3: GLfloat,
)
pub fn Uniform4f( &self, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat, v3: GLfloat, )
Sourcepub unsafe fn Uniform4fv(
&self,
location: GLint,
count: GLsizei,
value: *const [GLfloat; 4],
)
pub unsafe fn Uniform4fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 4], )
Sourcepub unsafe fn UniformBlockBinding(
&self,
program: GLuint,
uniformBlockIndex: GLuint,
uniformBlockBinding: GLuint,
)
pub unsafe fn UniformBlockBinding( &self, program: GLuint, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint, )
Sourcepub unsafe fn UniformMatrix2fv(
&self,
location: GLint,
count: GLsizei,
transpose: GLboolean,
value: *const [GLfloat; 4],
)
pub unsafe fn UniformMatrix2fv( &self, location: GLint, count: GLsizei, transpose: GLboolean, value: *const [GLfloat; 4], )
Sourcepub unsafe fn UniformMatrix3fv(
&self,
location: GLint,
count: GLsizei,
transpose: GLboolean,
value: *const [GLfloat; 9],
)
pub unsafe fn UniformMatrix3fv( &self, location: GLint, count: GLsizei, transpose: GLboolean, value: *const [GLfloat; 9], )
Sourcepub unsafe fn UniformMatrix4fv(
&self,
location: GLint,
count: GLsizei,
transpose: GLboolean,
value: *const [GLfloat; 16],
)
pub unsafe fn UniformMatrix4fv( &self, location: GLint, count: GLsizei, transpose: GLboolean, value: *const [GLfloat; 16], )
Sourcepub fn UseProgram(&self, program: GLuint)
pub fn UseProgram(&self, program: GLuint)
Sourcepub fn VertexAttribDivisor(&self, index: GLuint, divisor: GLuint)
pub fn VertexAttribDivisor(&self, index: GLuint, divisor: GLuint)
glVertexAttribDivisor (GL 3.3)
Sourcepub unsafe fn VertexAttribIPointer(
&self,
index: GLuint,
size: GLint,
type_: GLenum,
stride: GLsizei,
pointer: *const void,
)
pub unsafe fn VertexAttribIPointer( &self, index: GLuint, size: GLint, type_: GLenum, stride: GLsizei, pointer: *const void, )
Sourcepub unsafe fn VertexAttribPointer(
&self,
index: GLuint,
size: GLint,
type_: GLenum,
normalized: GLboolean,
stride: GLsizei,
pointer: *const void,
)
pub unsafe fn VertexAttribPointer( &self, index: GLuint, size: GLint, type_: GLenum, normalized: GLboolean, stride: GLsizei, pointer: *const void, )
Sourcepub fn Viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
pub fn Viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
glViewport (GL 1.0, GLES 2.0)
Specifies the affine transformation of x and y from normalized device
coordinates to window coordinates. The window coordinates are computed as
follows:
x_win = (x_ndc + 1)*(width / 2) + x
y_win = (y_ndc + 1)*(height / 2) + yxandyspecify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).widthandheightspecify the width and height of the viewport. When a GL context is first attached to a window, width and height are set to the dimensions of that window.
§Errors
GL_INVALID_VALUEis generated if eitherwidthorheightare negative.
§Associated Gets
GL_VIEWPORTGL_MAX_VIEWPORT_DIMS