[][src]Module mallumo_gls::raw

Raw module wraps C OpenGL functions for convenience, it does following things:

  • OpenGL enums, which are integers, are wrapped in Rusts enums avoiding GL_INVALID_ENUM errors
  • Hides C pointers and returns only safe Rust types as results. For example get_program_log returns String, create_buffer does not take anything and returns newtype BufferId

Not all of OpenGL functions are wrapped, only those that were picked as suitable for modern programming. More specifically they are limited to OpenGL 4.5 Core version + few extensions beyond 4.5. Futhermore they are also limited by techniques which should be preferred nowadays for performance reasons:

  • only Direct State Access functions
  • no Vertex Array Object, you should use Full Vertex Pulling instead (see OpenGL Insights)
  • only bindless textures

Collection of functions was inspired by this list

Structs

BlockIndex
BufferId
ClearColor
DepthRange
DispatchCommand
DrawArraysIndirectCommand
DrawElementsIndirectCommand
FramebufferId
MemoryBarriers
ProgramId
ProgramPipelineId
ShaderId
ShaderProgramId
TextureHandle
TextureId
Viewport

Enums

BindBufferTarget
BlendingEquation

Equation that the GPU will use for blending.

BufferBaseTarget
BufferData
BufferMap
BufferMutability
ClearBuffers
ClipControlDepth
ClipControlOrigin
DepthMask
DepthTest
DrawMode
EnableOption
Face
FaceOrientation
FramebufferAttachment
FramebufferCompleteness
FramebufferDrawBuffer
FramebufferParameter
FramebufferTarget
GetParameterName
ImageAccess
ImageInternalFormat
LinearBlendingFactor

Indicates which value to multiply each component with.

LogicOperation

Bitwise operation between incoming pixel S and framebuffer pixel D

PipelineShaderStage
ShaderParameter
ShaderProgramParameter
ShaderType
StencilTest
SyncFlushCommands
SyncStatus
TextureBufferInternalFormat
TextureDataType
TextureFormat
TextureInternalFormat
TextureMipmapFilter
TextureParameterOption
TextureSeamless
TextureTarget
TextureTexelFilter
TextureWrapMode

Constants

DEFAULT_FRAMEBUFFER_ID

Functions

attach_shader
bind_buffer
bind_buffer_base
bind_buffer_range
bind_buffers_base
bind_framebuffer
bind_image_texture
bind_program_pipeline
bind_texture_unit
bind_textures
blend_color
blend_equation_separate
blend_func_separate
check_named_framebuffer_status
clear
clear_buffer_data
clear_buffer_sub_data
clear_color
clear_depth
clear_tex_image_null
client_wait_sync
clip_control
color_mask
compile_shader
copy_named_buffer_sub_data
create_buffer

Returns a new buffer

create_framebuffer
create_program
create_program_pipeline
create_shader
create_shader_program
create_texture
cull_face
delete_buffer

Deletes buffer

delete_framebuffer
delete_program
delete_program_pipeline
delete_shader
delete_shader_program
delete_sync
delete_texture
depth_function
depth_mask
depth_range
detach_shader
disable
dispatch_compute
dispatch_compute_indirect
draw_arrays
draw_arrays_indirect
draw_arrays_instanced
draw_arrays_instanced_base_instace
enable
fence_sync
framebuffer_parameter
front_face
generate_texture_mipmap
get_error
get_error_always
get_integer_i_v
get_named_buffer_sub_data
get_program
get_program_info_log
get_program_linked
get_shader
get_shader_compiled
get_shader_info_log
get_shader_program
get_shader_program_info_log
get_texture_handle
link_program
logic_op
make_texture_handle_resident
map_named_buffer_range

Returns pointer to buffer memory

memory_barrier
multi_draw_arrays
multi_draw_arrays_indirect
multi_draw_elements_indirect
named_buffer_storage

Initializes buffer

named_buffer_sub_data

Copies data from slice to GPU memory pointer by buffer

named_framebuffer_draw_buffer
named_framebuffer_draw_buffers
named_framebuffer_texture
named_framebuffer_texture_layer
program_uniform_1f
program_uniform_1i
program_uniform_1ui
program_uniform_1fv
program_uniform_1iv
program_uniform_1uiv
program_uniform_2f
program_uniform_2i
program_uniform_2ui
program_uniform_2fv
program_uniform_2iv
program_uniform_2uiv
program_uniform_3f
program_uniform_3i
program_uniform_3ui
program_uniform_3fv
program_uniform_3iv
program_uniform_3uiv
program_uniform_4f
program_uniform_4i
program_uniform_4ui
program_uniform_4fv
program_uniform_4iv
program_uniform_4uiv
program_uniform_matrix_2f
program_uniform_matrix_3f
program_uniform_matrix_4f
scissor
shader_binary
shader_source
specialize_shader
stencil_func_separate
texture_buffer
texture_buffer_range
texture_parameter_i
texture_storage_1d
texture_storage_2d
texture_storage_3d
texture_subimage_1d
texture_subimage_2d
texture_subimage_3d
use_program
use_program_stage
viewport
wait_sync