GlFns

Struct GlFns 

Source
pub struct GlFns { /* private fields */ }

Implementations§

Source§

impl GlFns

Source

pub unsafe fn from_loader( load: &dyn Fn(ZStr<'_>) -> *mut c_void, ) -> Option<Self>

Source§

impl GlFns

Source

pub fn ActiveTexture(&self, texture: GLenum)

Source

pub fn AttachShader(&self, program: GLuint, shader: GLuint)

Source

pub fn BindBuffer(&self, target: GLenum, buffer: GLuint)

Source

pub unsafe fn BindBufferBase( &self, target: GLenum, index: GLuint, buffer: GLuint, )

Source

pub unsafe fn BindBufferRange( &self, target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr, )

Source

pub unsafe fn BindFramebuffer(&self, target: GLenum, framebuffer: GLuint)

Source

pub fn BindRenderbuffer(&self, target: GLenum, renderbuffer: GLuint)

Source

pub fn BindTexture(&self, target: GLenum, texture: GLuint)

Source

pub fn BindVertexArray(&self, array: GLuint)

Source

pub fn BlendEquation(&self, mode: GLenum)

Source

pub fn BlendFunc(&self, sfactor: GLenum, dfactor: GLenum)

Source

pub fn BlendFunci(&self, buf: GLuint, sfactor: GLenum, dfactor: GLenum)

Source

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, )

Source

pub unsafe fn BufferData( &self, target: GLenum, size: GLsizeiptr, data: *const void, usage: GLenum, )

Source

pub unsafe fn BufferSubData( &self, target: GLenum, offset: GLintptr, size: GLsizeiptr, data: *const void, )

Source

pub fn CheckFramebufferStatus(&self, target: GLenum) -> GLenum

Source

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.

  • mask can contain any of the following bits:
    • GL_COLOR_BUFFER_BIT
    • GL_DEPTH_BUFFER_BIT
    • GL_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_VALUE is generated if any bit other than the three defined bits is set in mask.
Source

pub unsafe fn ClearBufferfv( &self, buffer: GLenum, drawbuffer: GLint, value: *const GLfloat, )

Source

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
Source

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
Source

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_VALUE
  • GL_STENCIL_BITS
Source

pub fn CompileShader(&self, shader: GLuint)

Source

pub fn CreateProgram(&self) -> GLuint

Source

pub fn CreateShader(&self, shaderType: GLenum) -> GLuint

Source

pub fn CullFace(&self, mode: GLenum)

Source

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.

Source

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.

Source

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).

Source

pub unsafe fn DeleteBuffers(&self, n: GLsizei, buffers: *const GLuint)

Source

pub unsafe fn DeleteFramebuffers(&self, n: GLsizei, framebuffers: *mut GLuint)

Source

pub fn DeleteProgram(&self, program: GLuint)

Source

pub fn DeleteShader(&self, shader: GLuint)

Source

pub unsafe fn DeleteTextures(&self, n: GLsizei, textures: *const GLuint)

Source

pub unsafe fn DeleteVertexArrays(&self, n: GLsizei, arrays: *const GLuint)

Source

pub fn DepthFunc(&self, func: GLenum)

Source

pub fn DepthMask(&self, flag: GLboolean)

Source

pub fn Disable(&self, cap: GLenum)

Source

pub fn DisableVertexAttribArray(&self, index: GLuint)

Source

pub unsafe fn DrawArrays(&self, mode: GLenum, first: GLint, count: GLsizei)

Source

pub unsafe fn DrawArraysInstanced( &self, mode: GLenum, first: GLint, count: GLsizei, instancecount: GLsizei, )

Source

pub fn DrawBuffer(&self, buf: GLenum)

Source

pub unsafe fn DrawBuffers(&self, n: GLsizei, bufs: *const GLenum)

Source

pub unsafe fn DrawElements( &self, mode: GLenum, count: GLsizei, type_: GLenum, indices: *const void, )

Source

pub unsafe fn DrawElementsInstanced( &self, mode: GLenum, count: GLsizei, type_: GLenum, indices: *const void, instancecount: GLsizei, )

Source

pub fn Enable(&self, cap: GLenum)

Source

pub fn EnableVertexAttribArray(&self, index: GLuint)

Source

pub fn FramebufferRenderbuffer( &self, target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint, )

Source

pub fn FramebufferTexture( &self, target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, )

Source

pub fn FramebufferTexture2D( &self, target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, )

Source

pub fn FrontFace(&self, mode: GLenum)

Source

pub unsafe fn GenBuffers(&self, n: GLsizei, buffers: *mut GLuint)

Source

pub unsafe fn GenFramebuffers(&self, n: GLsizei, ids: *mut GLuint)

Source

pub unsafe fn GenRenderbuffers(&self, n: GLsizei, renderbuffers: *mut GLuint)

Source

pub unsafe fn GenTextures(&self, n: GLsizei, textures: *mut GLuint)

Source

pub unsafe fn GenVertexArrays(&self, n: GLsizei, arrays: *mut GLuint)

Source

pub fn GenerateMipmap(&self, target: GLenum)

Source

pub fn GetError(&self) -> GLenum

Source

pub unsafe fn GetFloatv(&self, pname: GLenum, data: *mut GLfloat)

Source

pub unsafe fn GetIntegerv(&self, pname: GLenum, data: *mut GLint)

Source

pub unsafe fn GetProgramInfoLog( &self, program: GLuint, maxLength: GLsizei, length: *mut GLsizei, infoLog: *mut GLchar, )

Source

pub unsafe fn GetProgramiv( &self, program: GLuint, pname: GLenum, params: *mut GLint, )

Source

pub unsafe fn GetShaderInfoLog( &self, shader: GLuint, maxLength: GLsizei, length: *mut GLsizei, infoLog: *mut GLchar, )

Source

pub unsafe fn GetShaderiv( &self, shader: GLuint, pname: GLenum, params: *mut GLint, )

Source

pub fn GetString(&self, name: GLenum) -> *const GLubyte

Source

pub fn GetStringi(&self, name: GLenum, index: GLuint) -> *const GLubyte

Source

pub unsafe fn GetUniformBlockIndex( &self, program: GLuint, uniformBlockName: *const GLchar, ) -> GLuint

Source

pub unsafe fn GetUniformLocation( &self, program: GLuint, name: *const GLchar, ) -> GLint

Source

pub fn LinkProgram(&self, program: GLuint)

Source

pub fn PixelStorei(&self, pname: GLenum, param: GLint)

Source

pub fn PolygonMode(&self, face: GLenum, mode: GLenum)

Source

pub fn ReadBuffer(&self, mode: GLenum)

Source

pub fn RenderbufferStorage( &self, target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, )

Source

pub fn RenderbufferStorageMultisample( &self, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, )

Source

pub unsafe fn ShaderSource( &self, shader: GLuint, count: GLsizei, string: *const *mut GLchar, length: *const GLint, )

Source

pub fn StencilFunc(&self, func: GLenum, ref_: GLint, mask: GLuint)

Source

pub fn StencilMask(&self, mask: GLuint)

Source

pub fn StencilOp(&self, sfail: GLenum, dpfail: GLenum, dppass: GLenum)

Source

pub unsafe fn TexImage2D( &self, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type_: GLenum, data: *const void, )

Source

pub fn TexImage2DMultisample( &self, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, fixedsamplelocations: GLboolean, )

Source

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, )

Source

pub unsafe fn TexParameterfv( &self, target: GLenum, pname: GLenum, params: *const GLfloat, )

Source

pub fn TexParameteri(&self, target: GLenum, pname: GLenum, param: GLint)

Source

pub fn Uniform1f(&self, location: GLint, v0: GLfloat)

Source

pub unsafe fn Uniform1fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 1], )

Source

pub fn Uniform1i(&self, location: GLint, v0: GLint)

Source

pub unsafe fn Uniform1iv( &self, location: GLint, count: GLsizei, value: *const GLint, )

Source

pub fn Uniform2f(&self, location: GLint, v0: GLfloat, v1: GLfloat)

Source

pub unsafe fn Uniform2fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 2], )

Source

pub fn Uniform3f(&self, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)

Source

pub unsafe fn Uniform3fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 3], )

Source

pub fn Uniform4f( &self, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat, v3: GLfloat, )

Source

pub unsafe fn Uniform4fv( &self, location: GLint, count: GLsizei, value: *const [GLfloat; 4], )

Source

pub unsafe fn UniformBlockBinding( &self, program: GLuint, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint, )

Source

pub unsafe fn UniformMatrix2fv( &self, location: GLint, count: GLsizei, transpose: GLboolean, value: *const [GLfloat; 4], )

Source

pub unsafe fn UniformMatrix3fv( &self, location: GLint, count: GLsizei, transpose: GLboolean, value: *const [GLfloat; 9], )

Source

pub unsafe fn UniformMatrix4fv( &self, location: GLint, count: GLsizei, transpose: GLboolean, value: *const [GLfloat; 16], )

Source

pub fn UseProgram(&self, program: GLuint)

Source

pub fn VertexAttribDivisor(&self, index: GLuint, divisor: GLuint)

Source

pub unsafe fn VertexAttribIPointer( &self, index: GLuint, size: GLint, type_: GLenum, stride: GLsizei, pointer: *const void, )

Source

pub unsafe fn VertexAttribPointer( &self, index: GLuint, size: GLint, type_: GLenum, normalized: GLboolean, stride: GLsizei, pointer: *const void, )

Source

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) + y
  • x and y specify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
  • width and height specify 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_VALUE is generated if either width or height are negative.
§Associated Gets
  • GL_VIEWPORT
  • GL_MAX_VIEWPORT_DIMS

Auto Trait Implementations§

§

impl Freeze for GlFns

§

impl RefUnwindSafe for GlFns

§

impl !Send for GlFns

§

impl !Sync for GlFns

§

impl Unpin for GlFns

§

impl UnwindSafe for GlFns

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.