Module mallumo_gls::raw [] [src]

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
ImageBindlessId
MemoryBarriers
ProgramId
ProgramPipelineId
ShaderId
ShaderProgramId
TextureBindlessId
TextureId
Viewport

Enums

BindBufferTarget
BlendingEquation

Equation that the GPU will use for blending.

BufferBaseTarget
BufferData
BufferMap
BufferMutability
ClearBuffers
DepthMask
DepthTest
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
GL_ALL_BARRIER_BITS
GL_ATOMIC_COUNTER_BARRIER
GL_BUFFER_UPDATE_BARRIER
GL_COMMAND_BARRIER
GL_ELEMENT_ARRAY_BARRIER
GL_FRAMEBUFFER_BARRIER
GL_PIXEL_BUFFER_BARRIER
GL_QUERY_BUFFER_BARRIER
GL_SHADER_IMAGE_ACCESS_BARRIER
GL_SHADER_STORAGE_BARRIER
GL_TEXTURE_FETCH_BARRIER
GL_TEXTURE_UPDATE_BARRIER
GL_TRANSFORM_FEEDBACK_BARRIER
GL_UNIFORM_BARRIER
VERTEX_ATTRIB_ARRAY_BARRIER

Functions

attach_shader
bind_buffer
bind_buffer_base
bind_buffers_base
bind_framebuffer
bind_program_pipeline
blend_color
blend_equation_separate
blend_func_separate
check_named_framebuffer_status
clear
clear_buffer_data
clear_buffer_sub_data
clear_color
client_wait_sync
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
enable
fence_sync
framebuffer_parameter
front_face
generate_texture_mipmap
get_error
get_image_handle
get_integer_i_v
get_program
get_program_info_log
get_shader
get_shader_info_log
get_shader_program
get_shader_program_info_log
get_texture_handle
link_program
logic_op
make_image_handle_non_resident
make_image_handle_resident
make_texture_handle_non_resident
make_texture_handle_resident
map_named_buffer_range

Returns pointer to buffer memory

memory_barrier
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
scissor
shader_source
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