Antkeeper  0.0.1
Classes | Enumerations | Functions | Variables
gl Namespace Reference

Graphics library interface. More...

Classes

struct  clear_value
 Clear value. More...
 
struct  color_blend_equation
 Color blend factors and operations. More...
 
struct  framebuffer_attachment
 Framebuffer attachment. More...
 
class  framebuffer
 
class  image_view
 Image view. More...
 
class  image_view_1d
 1D image view. More...
 
class  image_view_1d_array
 1D image array view. More...
 
class  image_view_2d
 2D image view. More...
 
class  image_view_2d_array
 2D image array view. More...
 
class  image_view_3d
 3D image view. More...
 
class  image_view_cube
 Cube image view. More...
 
class  image_view_cube_array
 Cube image array view. More...
 
class  image
 
class  image_1d
 1D image. More...
 
class  image_2d
 2D image. More...
 
class  image_3d
 3D image. More...
 
class  image_cube
 Cube-compatible 2D image. More...
 
class  gl_shader_bool
 Boolean shader variable implementation using OpenGL. More...
 
class  gl_shader_bvec2
 2-dimensional boolean vector shader variable implementation using OpenGL. More...
 
class  gl_shader_bvec3
 3-dimensional boolean vector shader variable implementation using OpenGL. More...
 
class  gl_shader_bvec4
 4-dimensional boolean vector shader variable implementation using OpenGL. More...
 
class  gl_shader_int
 Signed integer shader variable implementation using OpenGL. More...
 
class  gl_shader_ivec2
 2-dimensional signed integer vector shader variable implementation using OpenGL. More...
 
class  gl_shader_ivec3
 3-dimensional signed integer vector shader variable implementation using OpenGL. More...
 
class  gl_shader_ivec4
 4-dimensional signed integer vector shader variable implementation using OpenGL. More...
 
class  gl_shader_uint
 Unsigned integer shader variable implementation using OpenGL. More...
 
class  gl_shader_uvec2
 2-dimensional unsigned integer vector shader variable implementation using OpenGL. More...
 
class  gl_shader_uvec3
 3-dimensional unsigned integer vector shader variable implementation using OpenGL. More...
 
class  gl_shader_uvec4
 4-dimensional unsigned integer vector shader variable implementation using OpenGL. More...
 
class  gl_shader_float
 Floating-point shader variable implementation using OpenGL. More...
 
class  gl_shader_fvec2
 2-dimensional floating-point vector shader variable implementation using OpenGL. More...
 
class  gl_shader_fvec3
 3-dimensional floating-point vector shader variable implementation using OpenGL. More...
 
class  gl_shader_fvec4
 4-dimensional floating-point vector shader variable implementation using OpenGL. More...
 
class  gl_shader_fmat2
 2x2 floating-point matrix shader variable implementation using OpenGL. More...
 
class  gl_shader_fmat3
 3x3 floating-point matrix shader variable implementation using OpenGL. More...
 
class  gl_shader_fmat4
 4x4 floating-point matrix shader variable implementation using OpenGL. More...
 
class  gl_shader_texture_1d
 1-dimensional texture shader variable implementation using OpenGL. More...
 
class  gl_shader_texture_2d
 2-dimensional texture shader variable implementation using OpenGL. More...
 
class  gl_shader_texture_3d
 3-dimensional texture shader variable implementation using OpenGL. More...
 
class  gl_shader_texture_cube
 Cube texture shader variable implementation using OpenGL. More...
 
struct  pipeline_color_blend_state
 Pipeline color blend state. More...
 
struct  pipeline_depth_stencil_state
 Pipeline depth/stencil state. More...
 
struct  pipeline_input_assembly_state
 Pipeline input assembly state. More...
 
struct  pipeline_rasterization_state
 Pipeline rasterization state. More...
 
struct  pipeline_vertex_input_state
 Pipeline input assembly state. More...
 
struct  pipeline_viewport_state
 Pipeline viewport state. More...
 
class  pipeline
 Graphics pipeline interface. More...
 
class  sampler
 Sampler object. More...
 
struct  scissor_region
 Scissor region offset and extents. More...
 
class  shader_object
 Shader object which can be compiled and linked to a shader program. More...
 
class  shader_program
 Shader program which can be linked to shader objects and executed. More...
 
class  shader_template
 Template used to for generating one or more shader variants from a single source. More...
 
class  shader_variable
 Shader program variable. More...
 
struct  stencil_op_state
 Stencil operation state. More...
 
class  texture
 Image view and sampler object pair. More...
 
class  texture_1d
 1D texture. More...
 
class  texture_1d_array
 1D texture array. More...
 
class  texture_2d
 2D texture. More...
 
class  texture_2d_array
 2D texture array. More...
 
class  texture_3d
 3D texture. More...
 
class  texture_cube
 Cube texture. More...
 
class  texture_cube_array
 Cube texture array. More...
 
class  vertex_array
 Vertex arrays describes how vertex input attributes are stored in vertex buffers. More...
 
class  vertex_buffer
 Vertex buffer object (VBO). More...
 
struct  vertex_input_attribute
 Vertex input attribute. More...
 
struct  vertex_input_binding
 Vertex input binding. More...
 
struct  viewport
 Viewport position, dimensions, and depth range. More...
 

Enumerations

enum class  blend_factor : std::uint8_t {
  zero , one , src_color , one_minus_src_color ,
  dst_color , one_minus_dst_color , src_alpha , one_minus_src_alpha ,
  dst_alpha , one_minus_dst_alpha , constant_color , one_minus_constant_color ,
  constant_alpha , one_minus_constant_alpha , src_alpha_saturate , src1_color ,
  one_minus_src1_color , src1_alpha , one_minus_src1_alpha
}
 Source and destination color and alpha blending factors. More...
 
enum class  blend_op : std::uint8_t {
  add , subtract , reverse_subtract , min ,
  max
}
 Framebuffer blending operations. More...
 
enum class  buffer_usage : std::uint8_t {
  stream_draw , stream_read , stream_copy , static_draw ,
  static_read , static_copy , dynamic_draw , dynamic_read ,
  dynamic_copy
}
 Usage hints for vertex buffers. More...
 
enum  : std::uint8_t { color_clear_bit = 0b001 , depth_clear_bit = 0b010 , stencil_clear_bit = 0b100 }
 Clear mask bits. More...
 
enum  : std::uint8_t { color_component_r_bit = 0b0001 , color_component_g_bit = 0b0010 , color_component_b_bit = 0b0100 , color_component_a_bit = 0b1000 }
 Bits controlling which components are written to the framebuffer. More...
 
enum class  compare_op : std::uint8_t {
  never , less , equal , less_or_equal ,
  greater , not_equal , greater_or_equal , always
}
 Comparison operators. More...
 
enum class  cube_map_layout : std::uint8_t {
  unknown , column , row , vertical_cross ,
  horizontal_cross , equirectangular , spherical
}
 Cube map layouts. More...
 
enum class  cull_mode : std::uint8_t { none , front , back , front_and_back }
 Triangle culling mode. More...
 
enum class  fill_mode : std::uint8_t { fill , line , point }
 Polygon rasterization mode. More...
 
enum class  format : std::uint32_t {
  undefined , r4g4_unorm_pack8 , r4g4b4a4_unorm_pack16 , b4g4r4a4_unorm_pack16 ,
  r5g6b5_unorm_pack16 , b5g6r5_unorm_pack16 , r5g5b5a1_unorm_pack16 , b5g5r5a1_unorm_pack16 ,
  a1r5g5b5_unorm_pack16 , r8_unorm , r8_snorm , r8_uscaled ,
  r8_sscaled , r8_uint , r8_sint , r8_srgb ,
  r8g8_unorm , r8g8_snorm , r8g8_uscaled , r8g8_sscaled ,
  r8g8_uint , r8g8_sint , r8g8_srgb , r8g8b8_unorm ,
  r8g8b8_snorm , r8g8b8_uscaled , r8g8b8_sscaled , r8g8b8_uint ,
  r8g8b8_sint , r8g8b8_srgb , b8g8r8_unorm , b8g8r8_snorm ,
  b8g8r8_uscaled , b8g8r8_sscaled , b8g8r8_uint , b8g8r8_sint ,
  b8g8r8_srgb , r8g8b8a8_unorm , r8g8b8a8_snorm , r8g8b8a8_uscaled ,
  r8g8b8a8_sscaled , r8g8b8a8_uint , r8g8b8a8_sint , r8g8b8a8_srgb ,
  b8g8r8a8_unorm , b8g8r8a8_snorm , b8g8r8a8_uscaled , b8g8r8a8_sscaled ,
  b8g8r8a8_uint , b8g8r8a8_sint , b8g8r8a8_srgb , a8b8g8r8_unorm_pack32 ,
  a8b8g8r8_snorm_pack32 , a8b8g8r8_uscaled_pack32 , a8b8g8r8_sscaled_pack32 , a8b8g8r8_uint_pack32 ,
  a8b8g8r8_sint_pack32 , a8b8g8r8_srgb_pack32 , a2r10g10b10_unorm_pack32 , a2r10g10b10_snorm_pack32 ,
  a2r10g10b10_uscaled_pack32 , a2r10g10b10_sscaled_pack32 , a2r10g10b10_uint_pack32 , a2r10g10b10_sint_pack32 ,
  a2b10g10r10_unorm_pack32 , a2b10g10r10_snorm_pack32 , a2b10g10r10_uscaled_pack32 , a2b10g10r10_sscaled_pack32 ,
  a2b10g10r10_uint_pack32 , a2b10g10r10_sint_pack32 , r16_unorm , r16_snorm ,
  r16_uscaled , r16_sscaled , r16_uint , r16_sint ,
  r16_sfloat , r16g16_unorm , r16g16_snorm , r16g16_uscaled ,
  r16g16_sscaled , r16g16_uint , r16g16_sint , r16g16_sfloat ,
  r16g16b16_unorm , r16g16b16_snorm , r16g16b16_uscaled , r16g16b16_sscaled ,
  r16g16b16_uint , r16g16b16_sint , r16g16b16_sfloat , r16g16b16a16_unorm ,
  r16g16b16a16_snorm , r16g16b16a16_uscaled , r16g16b16a16_sscaled , r16g16b16a16_uint ,
  r16g16b16a16_sint , r16g16b16a16_sfloat , r32_uint , r32_sint ,
  r32_sfloat , r32g32_uint , r32g32_sint , r32g32_sfloat ,
  r32g32b32_uint , r32g32b32_sint , r32g32b32_sfloat , r32g32b32a32_uint ,
  r32g32b32a32_sint , r32g32b32a32_sfloat , r64_uint , r64_sint ,
  r64_sfloat , r64g64_uint , r64g64_sint , r64g64_sfloat ,
  r64g64b64_uint , r64g64b64_sint , r64g64b64_sfloat , r64g64b64a64_uint ,
  r64g64b64a64_sint , r64g64b64a64_sfloat , b10g11r11_ufloat_pack32 , e5b9g9r9_ufloat_pack32 ,
  d16_unorm , x8_d24_unorm_pack32 , d32_sfloat , s8_uint ,
  d16_unorm_s8_uint , d24_unorm_s8_uint , d32_sfloat_s8_uint , bc1_rgb_unorm_block ,
  bc1_rgb_srgb_block , bc1_rgba_unorm_block , bc1_rgba_srgb_block , bc2_unorm_block ,
  bc2_srgb_block , bc3_unorm_block , bc3_srgb_block , bc4_unorm_block ,
  bc4_snorm_block , bc5_unorm_block , bc5_snorm_block , bc6h_ufloat_block ,
  bc6h_sfloat_block , bc7_unorm_block , bc7_srgb_block , etc2_r8g8b8_unorm_block ,
  etc2_r8g8b8_srgb_block , etc2_r8g8b8a1_unorm_block , etc2_r8g8b8a1_srgb_block , etc2_r8g8b8a8_unorm_block ,
  etc2_r8g8b8a8_srgb_block , eac_r11_unorm_block , eac_r11_snorm_block , eac_r11g11_unorm_block ,
  eac_r11g11_snorm_block , astc_4x4_unorm_block , astc_4x4_srgb_block , astc_5x4_unorm_block ,
  astc_5x4_srgb_block , astc_5x5_unorm_block , astc_5x5_srgb_block , astc_6x5_unorm_block ,
  astc_6x5_srgb_block , astc_6x6_unorm_block , astc_6x6_srgb_block , astc_8x5_unorm_block ,
  astc_8x5_srgb_block , astc_8x6_unorm_block , astc_8x6_srgb_block , astc_8x8_unorm_block ,
  astc_8x8_srgb_block , astc_10x5_unorm_block , astc_10x5_srgb_block , astc_10x6_unorm_block ,
  astc_10x6_srgb_block , astc_10x8_unorm_block , astc_10x8_srgb_block , astc_10x10_unorm_block ,
  astc_10x10_srgb_block , astc_12x10_unorm_block , astc_12x10_srgb_block , astc_12x12_unorm_block ,
  astc_12x12_srgb_block
}
 Image and vertex formats. More...
 
enum  : std::uint8_t { color_attachment_bit = 0b001 , depth_attachment_bit = 0b010 , stencil_attachment_bit = 0b100 , depth_stencil_attachment_bits = 0b110 }
 Framebuffer attachment usage bits. More...
 
enum class  front_face : std::uint8_t { counter_clockwise , clockwise }
 Polygon front-facing orientation. More...
 
enum class  image_flag : std::uint8_t { cube_compatible = 0b00000001 }
 Image flags. More...
 
enum class  image_view_flag : std::uint8_t { array = 0b00000001 , cube = 0b00000010 }
 Image flags. More...
 
enum class  index_type : std::uint8_t { uint8 , uint16 , uint32 }
 Index types for index buffers. More...
 
enum class  logic_op : std::uint8_t {
  bitwise_clear , bitwise_and , bitwise_and_reverse , bitwise_copy ,
  bitwise_and_inverted , bitwise_no_op , bitwise_xor , bitwise_or ,
  bitwise_nor , bitwise_equivalent , bitwise_invert , bitwise_or_reverse ,
  bitwise_copy_inverted , bitwise_or_inverted , bitwise_nand , bitwise_set
}
 Framebuffer logical operations. More...
 
enum class  pixel_format : std::uint8_t {
  d , ds , r , rg ,
  rgb , bgr , rgba , bgra
}
 
enum class  pixel_type : std::uint8_t {
  int_8 , uint_8 , int_16 , uint_16 ,
  int_32 , uint_32 , float_16 , float_32
}
 
enum class  primitive_topology : std::uint8_t {
  point_list , line_list , line_strip , triangle_list ,
  triangle_strip , triangle_fan , line_list_with_adjacency , line_strip_with_adjacency ,
  triangle_list_with_adjacency , triangle_strip_with_adjacency , patch_list
}
 Primitive topologies. More...
 
enum class  provoking_vertex_mode : std::uint8_t { first , last }
 Vertex to be used as the source of data for flat-shaded varyings. More...
 
enum class  sampler_address_mode : std::uint8_t {
  repeat , mirrored_repeat , clamp_to_edge , clamp_to_border ,
  mirror_clamp_to_edge
}
 Behaviors of sampling with texture coordinates outside an image. More...
 
enum class  sampler_filter : std::uint8_t { nearest , linear }
 Filters used for texture lookups. More...
 
enum class  sampler_mipmap_mode : std::uint8_t { nearest , linear }
 Mipmap modes used for texture lookups. More...
 
enum class  shader_stage : std::uint8_t { vertex , fragment , geometry }
 Enumerates all supported shader stages. More...
 
enum class  shader_variable_type : std::uint8_t {
  bvec1 , bvec2 , bvec3 , bvec4 ,
  ivec1 , ivec2 , ivec3 , ivec4 ,
  uvec1 , uvec2 , uvec3 , uvec4 ,
  fvec1 , fvec2 , fvec3 , fvec4 ,
  fmat2 , fmat3 , fmat4 , texture_1d ,
  texture_2d , texture_3d , texture_cube
}
 Shader variable data types. More...
 
enum  : std::uint8_t { stencil_face_front_bit = 0b01 , stencil_face_back_bit = 0b10 , stencil_face_front_and_back = 0b11 }
 Stencil face mask bits specifying which stencil state(s) to update. More...
 
enum class  stencil_op : std::uint8_t {
  keep , zero , replace , increment_and_clamp ,
  decrement_and_clamp , invert , increment_and_wrap , decrement_and_wrap
}
 Stencil comparison functions. More...
 
enum class  vertex_input_rate : std::uint8_t { vertex , instance }
 Rate at which vertex attributes are pulled from buffers. More...
 

Functions

cube_map_layout infer_cube_map_layout (std::uint32_t width, std::uint32_t height) noexcept
 Infers the layout of a cube map from its dimensions. More...
 
std::uint32_t infer_cube_map_face_width (std::uint32_t width, std::uint32_t height, cube_map_layout layout) noexcept
 Infers the width of a cube map face from its dimensons and layout. More...
 

Variables

constexpr GLenum gl_format_lut [][3]
 Maps gl::format to OpenGL internal format, base format, and pixel type. More...
 

Detailed Description

Graphics library interface.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : std::uint8_t

Clear mask bits.

Enumerator
color_clear_bit 

Indicates the color buffer should be cleared.

depth_clear_bit 

Indicates the depth buffer should be cleared.

stencil_clear_bit 

Indicates the stencil buffer should be cleared.

Definition at line 1 of file clear-bits.hpp.

◆ anonymous enum

anonymous enum : std::uint8_t

Bits controlling which components are written to the framebuffer.

Enumerator
color_component_r_bit 

Indicates that the R value is written to the color attachment for the appropriate sample.

color_component_g_bit 

Indicates that the G value is written to the color attachment for the appropriate sample.

color_component_b_bit 

Indicates that the B value is written to the color attachment for the appropriate sample.

color_component_a_bit 

Indicates that the A value is written to the color attachment for the appropriate sample.

Definition at line 1 of file color-component-bits.hpp.

◆ anonymous enum

anonymous enum : std::uint8_t

Framebuffer attachment usage bits.

Enumerator
color_attachment_bit 

Framebuffer color attachment.

depth_attachment_bit 

Framebuffer depth attachment.

stencil_attachment_bit 

Framebuffer stencil attachment.

depth_stencil_attachment_bits 

Framebuffer depth/stencil attachment.

Definition at line 1 of file framebuffer-usage-bits.hpp.

◆ anonymous enum

anonymous enum : std::uint8_t

Stencil face mask bits specifying which stencil state(s) to update.

Enumerator
stencil_face_front_bit 

Only the front set of stencil state is updated.

stencil_face_back_bit 

Only the back set of stencil state is updated.

stencil_face_front_and_back 

Both sets of stencil state are updated.

Definition at line 1 of file stencil-face-bits.hpp.

◆ blend_factor

enum gl::blend_factor : std::uint8_t
strong

Source and destination color and alpha blending factors.

Enumerator
zero 
one 
src_color 
one_minus_src_color 
dst_color 
one_minus_dst_color 
src_alpha 
one_minus_src_alpha 
dst_alpha 
one_minus_dst_alpha 
constant_color 
one_minus_constant_color 
constant_alpha 
one_minus_constant_alpha 
src_alpha_saturate 
src1_color 
one_minus_src1_color 
src1_alpha 
one_minus_src1_alpha 

Definition at line 28 of file blend-factor.hpp.

◆ blend_op

enum gl::blend_op : std::uint8_t
strong

Framebuffer blending operations.

Enumerator
add 
subtract 
reverse_subtract 
min 
max 

Definition at line 28 of file blend-op.hpp.

◆ buffer_usage

enum gl::buffer_usage : std::uint8_t
strong

Usage hints for vertex buffers.

See also
gl::vertex_buffer
Enumerator
stream_draw 

Data will be modified once, by the application, and used at most a few times, for drawing commands.

stream_read 

Data will be modified once, by reading data from the GL, and used at most a few times, to return that data to the application.

stream_copy 

Data will be modified once, by reading data from the GL, and used at most a few times, for drawing commands.

static_draw 

Data will be modified once, by the application, and used many times, for drawing commands.

static_read 

Data will be modified once, by reading data from the GL, and used many times, to return that data to the application.

static_copy 

Data will be modified once, by reading data from the GL, and many times, for drawing commands.

dynamic_draw 

Data will be modified repeatedly, by the application, and used many times, for drawing commands.

dynamic_read 

Data will be modified repeatedly, by reading data from the GL, and used many times, to return that data to the application.

dynamic_copy 

Data will be modified repeatedly, by reading data from the GL, and used many times, for drawing commands.

Definition at line 32 of file buffer-usage.hpp.

◆ compare_op

enum gl::compare_op : std::uint8_t
strong

Comparison operators.

Enumerator
never 

Comparison always evaluates false.

less 

Comparison evaluates reference < test.

equal 

Comparison evaluates reference == test.

less_or_equal 

Comparison evaluates reference <= test.

greater 

Comparison evaluates reference > test.

not_equal 

Comparison evaluates reference != test.

greater_or_equal 

Comparison evaluates reference >= test.

always 

Comparison always evaluates true.

Definition at line 28 of file compare-op.hpp.

◆ cube_map_layout

enum gl::cube_map_layout : std::uint8_t
strong

Cube map layouts.

Enumerator
unknown 

Unknown layout.

column 

Faces are stored consecutively in a single column.

row 

Faces are stored consecutively in a single row.

vertical_cross 

Faces are stored in a vertical cross.

horizontal_cross 

Faces are stored in a horizontal cross.

equirectangular 

Faces are stored in an equirectangular projection.

spherical 

Faces are stored in a spherical projection.

Definition at line 28 of file cube-map.hpp.

◆ cull_mode

enum gl::cull_mode : std::uint8_t
strong

Triangle culling mode.

Enumerator
none 

No triangles are discarded.

front 

Front-facing triangles are discarded.

back 

Back-facing triangles are discarded.

front_and_back 

All triangles are discarded.

Definition at line 28 of file cull-mode.hpp.

◆ fill_mode

enum gl::fill_mode : std::uint8_t
strong

Polygon rasterization mode.

Enumerator
fill 

Polygons are filled.

line 

Polygons edges are drawn as line segments.

point 

Polygons vertices are drawn as points.

Definition at line 28 of file fill-mode.hpp.

◆ format

enum gl::format : std::uint32_t
strong

Image and vertex formats.

Enumerator
undefined 
r4g4_unorm_pack8 
r4g4b4a4_unorm_pack16 
b4g4r4a4_unorm_pack16 
r5g6b5_unorm_pack16 
b5g6r5_unorm_pack16 
r5g5b5a1_unorm_pack16 
b5g5r5a1_unorm_pack16 
a1r5g5b5_unorm_pack16 
r8_unorm 
r8_snorm 
r8_uscaled 
r8_sscaled 
r8_uint 
r8_sint 
r8_srgb 
r8g8_unorm 
r8g8_snorm 
r8g8_uscaled 
r8g8_sscaled 
r8g8_uint 
r8g8_sint 
r8g8_srgb 
r8g8b8_unorm 
r8g8b8_snorm 
r8g8b8_uscaled 
r8g8b8_sscaled 
r8g8b8_uint 
r8g8b8_sint 
r8g8b8_srgb 
b8g8r8_unorm 
b8g8r8_snorm 
b8g8r8_uscaled 
b8g8r8_sscaled 
b8g8r8_uint 
b8g8r8_sint 
b8g8r8_srgb 
r8g8b8a8_unorm 
r8g8b8a8_snorm 
r8g8b8a8_uscaled 
r8g8b8a8_sscaled 
r8g8b8a8_uint 
r8g8b8a8_sint 
r8g8b8a8_srgb 
b8g8r8a8_unorm 
b8g8r8a8_snorm 
b8g8r8a8_uscaled 
b8g8r8a8_sscaled 
b8g8r8a8_uint 
b8g8r8a8_sint 
b8g8r8a8_srgb 
a8b8g8r8_unorm_pack32 
a8b8g8r8_snorm_pack32 
a8b8g8r8_uscaled_pack32 
a8b8g8r8_sscaled_pack32 
a8b8g8r8_uint_pack32 
a8b8g8r8_sint_pack32 
a8b8g8r8_srgb_pack32 
a2r10g10b10_unorm_pack32 
a2r10g10b10_snorm_pack32 
a2r10g10b10_uscaled_pack32 
a2r10g10b10_sscaled_pack32 
a2r10g10b10_uint_pack32 
a2r10g10b10_sint_pack32 
a2b10g10r10_unorm_pack32 
a2b10g10r10_snorm_pack32 
a2b10g10r10_uscaled_pack32 
a2b10g10r10_sscaled_pack32 
a2b10g10r10_uint_pack32 
a2b10g10r10_sint_pack32 
r16_unorm 
r16_snorm 
r16_uscaled 
r16_sscaled 
r16_uint 
r16_sint 
r16_sfloat 
r16g16_unorm 
r16g16_snorm 
r16g16_uscaled 
r16g16_sscaled 
r16g16_uint 
r16g16_sint 
r16g16_sfloat 
r16g16b16_unorm 
r16g16b16_snorm 
r16g16b16_uscaled 
r16g16b16_sscaled 
r16g16b16_uint 
r16g16b16_sint 
r16g16b16_sfloat 
r16g16b16a16_unorm 
r16g16b16a16_snorm 
r16g16b16a16_uscaled 
r16g16b16a16_sscaled 
r16g16b16a16_uint 
r16g16b16a16_sint 
r16g16b16a16_sfloat 
r32_uint 
r32_sint 
r32_sfloat 
r32g32_uint 
r32g32_sint 
r32g32_sfloat 
r32g32b32_uint 
r32g32b32_sint 
r32g32b32_sfloat 
r32g32b32a32_uint 
r32g32b32a32_sint 
r32g32b32a32_sfloat 
r64_uint 
r64_sint 
r64_sfloat 
r64g64_uint 
r64g64_sint 
r64g64_sfloat 
r64g64b64_uint 
r64g64b64_sint 
r64g64b64_sfloat 
r64g64b64a64_uint 
r64g64b64a64_sint 
r64g64b64a64_sfloat 
b10g11r11_ufloat_pack32 
e5b9g9r9_ufloat_pack32 
d16_unorm 
x8_d24_unorm_pack32 
d32_sfloat 
s8_uint 
d16_unorm_s8_uint 
d24_unorm_s8_uint 
d32_sfloat_s8_uint 
bc1_rgb_unorm_block 
bc1_rgb_srgb_block 
bc1_rgba_unorm_block 
bc1_rgba_srgb_block 
bc2_unorm_block 
bc2_srgb_block 
bc3_unorm_block 
bc3_srgb_block 
bc4_unorm_block 
bc4_snorm_block 
bc5_unorm_block 
bc5_snorm_block 
bc6h_ufloat_block 
bc6h_sfloat_block 
bc7_unorm_block 
bc7_srgb_block 
etc2_r8g8b8_unorm_block 
etc2_r8g8b8_srgb_block 
etc2_r8g8b8a1_unorm_block 
etc2_r8g8b8a1_srgb_block 
etc2_r8g8b8a8_unorm_block 
etc2_r8g8b8a8_srgb_block 
eac_r11_unorm_block 
eac_r11_snorm_block 
eac_r11g11_unorm_block 
eac_r11g11_snorm_block 
astc_4x4_unorm_block 
astc_4x4_srgb_block 
astc_5x4_unorm_block 
astc_5x4_srgb_block 
astc_5x5_unorm_block 
astc_5x5_srgb_block 
astc_6x5_unorm_block 
astc_6x5_srgb_block 
astc_6x6_unorm_block 
astc_6x6_srgb_block 
astc_8x5_unorm_block 
astc_8x5_srgb_block 
astc_8x6_unorm_block 
astc_8x6_srgb_block 
astc_8x8_unorm_block 
astc_8x8_srgb_block 
astc_10x5_unorm_block 
astc_10x5_srgb_block 
astc_10x6_unorm_block 
astc_10x6_srgb_block 
astc_10x8_unorm_block 
astc_10x8_srgb_block 
astc_10x10_unorm_block 
astc_10x10_srgb_block 
astc_12x10_unorm_block 
astc_12x10_srgb_block 
astc_12x12_unorm_block 
astc_12x12_srgb_block 

Definition at line 28 of file format.hpp.

◆ front_face

enum gl::front_face : std::uint8_t
strong

Polygon front-facing orientation.

Enumerator
counter_clockwise 

Triangle with positive area is considered front-facing.

clockwise 

Triangle with negative area is considered front-facing.

Definition at line 28 of file front-face.hpp.

◆ image_flag

enum gl::image_flag : std::uint8_t
strong

Image flags.

Enumerator
cube_compatible 

Cube map view compatible image.

Definition at line 28 of file image-flag.hpp.

◆ image_view_flag

enum gl::image_view_flag : std::uint8_t
strong

Image flags.

Enumerator
array 

Image array view.

cube 

Cube map view.

Definition at line 28 of file image-view-flag.hpp.

◆ index_type

enum gl::index_type : std::uint8_t
strong

Index types for index buffers.

Enumerator
uint8 

8-bit unsigned integer values.

uint16 

16-bit unsigned integer values.

uint32 

32-bit unsigned integer values.

Definition at line 28 of file index-type.hpp.

◆ logic_op

enum gl::logic_op : std::uint8_t
strong

Framebuffer logical operations.

Enumerator
bitwise_clear 
bitwise_and 
bitwise_and_reverse 
bitwise_copy 
bitwise_and_inverted 
bitwise_no_op 
bitwise_xor 
bitwise_or 
bitwise_nor 
bitwise_equivalent 
bitwise_invert 
bitwise_or_reverse 
bitwise_copy_inverted 
bitwise_or_inverted 
bitwise_nand 
bitwise_set 

Definition at line 28 of file logic-op.hpp.

◆ pixel_format

enum gl::pixel_format : std::uint8_t
strong
Enumerator

Depth.

ds 

Depth, stencil.

Red.

rg 

Red, green.

rgb 

Red, green, blue.

bgr 

Blue, green, red.

rgba 

Red, green, blue, alpha.

Blue, green, red, alpha

bgra 

Definition at line 27 of file pixel-format.hpp.

◆ pixel_type

enum gl::pixel_type : std::uint8_t
strong
Enumerator
int_8 
uint_8 
int_16 
uint_16 
int_32 
uint_32 
float_16 
float_32 

Definition at line 27 of file pixel-type.hpp.

◆ primitive_topology

enum gl::primitive_topology : std::uint8_t
strong

Primitive topologies.

Enumerator
point_list 

Separate point primitives.

line_list 

Separate line primitives.

line_strip 

Connected line primitives with consecutive lines sharing a vertex.

triangle_list 

Separate triangle primitives.

triangle_strip 

Connected triangle primitives with consecutive triangles sharing an edge.

triangle_fan 

Connected triangle primitives with all triangles sharing a common vertex.

line_list_with_adjacency 

Separate line primitives with adjacency.

line_strip_with_adjacency 

Connected line primitives with adjacency, with consecutive primitives sharing three vertices.

triangle_list_with_adjacency 

Separate triangle primitives with adjacency.

triangle_strip_with_adjacency 

Connected triangle primitives with adjacency, with consecutive triangles sharing an edge.

patch_list 

Separate patch primitives.

Definition at line 28 of file primitive-topology.hpp.

◆ provoking_vertex_mode

enum gl::provoking_vertex_mode : std::uint8_t
strong

Vertex to be used as the source of data for flat-shaded varyings.

Enumerator
first 

Provoking vertex is the first non-adjacency vertex.

last 

Provoking vertex is the last non-adjacency vertex.

Definition at line 28 of file provoking-vertex-mode.hpp.

◆ sampler_address_mode

enum gl::sampler_address_mode : std::uint8_t
strong

Behaviors of sampling with texture coordinates outside an image.

Enumerator
repeat 

Repeat wrap mode.

mirrored_repeat 

Mirrored repeat wrap mode.

clamp_to_edge 

Clamp to edge wrap mode.

clamp_to_border 

Clamp to border wrap mode.

mirror_clamp_to_edge 

Mirror clamp to edge wrap mode.

Definition at line 28 of file sampler-address-mode.hpp.

◆ sampler_filter

enum gl::sampler_filter : std::uint8_t
strong

Filters used for texture lookups.

Enumerator
nearest 

Nearest filtering.

linear 

Linear filtering.

Definition at line 28 of file sampler-filter.hpp.

◆ sampler_mipmap_mode

enum gl::sampler_mipmap_mode : std::uint8_t
strong

Mipmap modes used for texture lookups.

Enumerator
nearest 

Nearest filtering.

linear 

Linear filtering.

Definition at line 28 of file sampler-mipmap-mode.hpp.

◆ shader_stage

enum gl::shader_stage : std::uint8_t
strong

Enumerates all supported shader stages.

Enumerator
vertex 

Vertex shader stage.

fragment 

Fragment shader stage.

geometry 

Geometry shader stage.

Definition at line 30 of file shader-stage.hpp.

◆ shader_variable_type

enum gl::shader_variable_type : std::uint8_t
strong

Shader variable data types.

Enumerator
bvec1 
bvec2 
bvec3 
bvec4 
ivec1 
ivec2 
ivec3 
ivec4 
uvec1 
uvec2 
uvec3 
uvec4 
fvec1 
fvec2 
fvec3 
fvec4 
fmat2 
fmat3 
fmat4 
texture_1d 
texture_2d 
texture_3d 
texture_cube 

Definition at line 30 of file shader-variable-type.hpp.

◆ stencil_op

enum gl::stencil_op : std::uint8_t
strong

Stencil comparison functions.

Enumerator
keep 

Keeps the current value.

zero 

Sets the value to 0.

replace 

Sets the value to reference.

increment_and_clamp 

Increments the current value and clamps to the maximum representable unsigned value.

decrement_and_clamp 

Decrements the current value and clamps to 0.

invert 

Bitwise-inverts the current value.

increment_and_wrap 

Increments the current value and wraps to 0 when the maximum value would have been exceeded.

decrement_and_wrap 

Decrements the current value and wraps to the maximum possible value when the value would go below 0.

Definition at line 28 of file stencil-op.hpp.

◆ vertex_input_rate

enum gl::vertex_input_rate : std::uint8_t
strong

Rate at which vertex attributes are pulled from buffers.

Enumerator
vertex 

Vertex attribute addressing is a function of the vertex index.

instance 

Vertex attribute addressing is a function of the instance index.

Definition at line 28 of file vertex-input-rate.hpp.

Function Documentation

◆ infer_cube_map_face_width()

std::uint32_t gl::infer_cube_map_face_width ( std::uint32_t  width,
std::uint32_t  height,
cube_map_layout  layout 
)
noexcept

Infers the width of a cube map face from its dimensons and layout.

Parameters
widthCube map width.
heightCube map height.
layoutCube map layout.
Returns
Inferred cube map face width.

Definition at line 54 of file cube-map.cpp.

◆ infer_cube_map_layout()

cube_map_layout gl::infer_cube_map_layout ( std::uint32_t  width,
std::uint32_t  height 
)
noexcept

Infers the layout of a cube map from its dimensions.

Parameters
widthCube map width.
heightCube map height.
Returns
Inferred cube map layout.

Definition at line 24 of file cube-map.cpp.

Variable Documentation

◆ gl_format_lut

constexpr GLenum gl::gl_format_lut[][3]
constexpr

Maps gl::format to OpenGL internal format, base format, and pixel type.

Definition at line 28 of file gl-format-lut.hpp.