Unravel Engine C++ Reference
Loading...
Searching...
No Matches
gfx Namespace Reference

Namespaces

namespace  format_search_flags
 

Classes

class  Atlas
 
struct  AtlasRegion
 
struct  buffer_type
 type of vertex and index buffer to use with a TextBuffer More...
 
struct  clip_quad_def
 
struct  dd_raii
 
struct  fbo_attachment
 
struct  fbo_key
 
struct  font_info
 
class  font_manager
 
struct  font_profile_scope
 
struct  format_details
 
struct  frame_buffer
 
struct  gfx_callback
 
struct  glyph_info
 A structure that describe a glyph. More...
 
class  handle_impl
 
struct  index_buffer
 
struct  mesh_vertex
 
struct  pos_texcoord0_color0_vertex
 
struct  pos_texcoord0_vertex
 
struct  pos_vertex
 
struct  program
 
class  RectanglePacker
 
struct  render_pass
 
class  render_view
 
struct  screen_pos_vertex
 
struct  shader
 
class  text_buffer
 
class  text_buffer_manager
 
class  text_line_metrics
 Compute text crop area for text using a single font. More...
 
class  text_metrics
 
struct  text_rectangle
 
struct  texture
 
struct  texture_key
 
class  true_type_font
 
struct  uniform
 
struct  vertex
 
struct  vertex_buffer
 

Typedefs

using texture_format = bgfx::TextureFormat::Enum
 
using init_type = bgfx::Init
 
using view_id = bgfx::ViewId
 
using renderer_type = bgfx::RendererType::Enum
 
using backbuffer_ratio = bgfx::BackbufferRatio::Enum
 
using memory_view = bgfx::Memory
 
using texture_info = bgfx::TextureInfo
 
using uniform_type = bgfx::UniformType::Enum
 
using uniform_info = bgfx::UniformInfo
 
using attachment = bgfx::Attachment
 
using platform_data = bgfx::PlatformData
 
using caps = bgfx::Caps
 
using stats = bgfx::Stats
 
using access = bgfx::Access::Enum
 
using view_mode = bgfx::ViewMode::Enum
 
using occlusion_query_result = bgfx::OcclusionQueryResult::Enum
 
using topology_conversion = bgfx::TopologyConvert::Enum
 
using topology_sort = bgfx::TopologySort::Enum
 
using topology = bgfx::Topology
 
using release_fn = bgfx::ReleaseFn
 
using encoder = bgfx::Encoder
 
using transform = bgfx::Transform
 
using dynamic_index_buffer_handle = bgfx::DynamicIndexBufferHandle
 
using dynamic_vertex_buffer_handle = bgfx::DynamicVertexBufferHandle
 
using frame_buffer_handle = bgfx::FrameBufferHandle
 
using index_buffer_handle = bgfx::IndexBufferHandle
 
using indirect_buffer_handle = bgfx::IndirectBufferHandle
 
using occlusion_query_handle = bgfx::OcclusionQueryHandle
 
using program_handle = bgfx::ProgramHandle
 
using shader_handle = bgfx::ShaderHandle
 
using texture_handle = bgfx::TextureHandle
 
using uniform_handle = bgfx::UniformHandle
 
using vertex_buffer_handle = bgfx::VertexBufferHandle
 
using vertex_layout_handle = bgfx::VertexLayoutHandle
 
using embedded_shader = bgfx::EmbeddedShader
 
using transient_vertex_buffer = bgfx::TransientVertexBuffer
 
using transient_index_buffer = bgfx::TransientIndexBuffer
 
using instance_data_buffer = bgfx::InstanceDataBuffer
 
using glyph_lut_t = stl::unordered_map<code_point, glyph_info>
 
using code_point = uint32_t
 Unicode value of a character.
 
using vertex_layout = bgfx::VertexLayout
 
using attribute = bgfx::Attrib::Enum
 
using attribute_type = bgfx::AttribType::Enum
 

Enumerations

enum  text_style_flags {
  style_normal = 0 , style_overline = 1 , style_underline = 1 << 1 , style_strike_through = 1 << 2 ,
  style_background = 1 << 3 , style_foreground = 1 << 4
}
 special style effect (can be combined) More...
 

Functions

void draw_billboard (DebugDrawEncoder &dd, bgfx::TextureHandle icon_texture, const bx::Vec3 &icon_center, const bx::Vec3 &camera_pos, const bx::Vec3 &camera_look_dir, float half_size)
 
auto get_best_float_format (std::uint16_t type_flags, std::uint32_t search_flags, bool requires_alpha, bool accept_padding, bool accept_half, bool accept_full) -> texture_format
 
auto get_best_standard_format (std::uint16_t type_flags, std::uint32_t search_flags, bool requires_alpha, bool accept_padding) -> texture_format
 
auto get_best_depth_format (std::uint16_t type_flags, std::uint32_t search_flags) -> texture_format
 
auto get_best_format (std::uint16_t type_flags, std::uint32_t search_flags) -> texture_format
 
auto get_default_rt_sampler_flags () -> uint64_t
 
auto is_format_supported (uint16_t flags, texture_format format) -> bool
 
auto get_format_info (texture_format fmt) -> format_details
 
auto to_string (texture_format fmt) -> std::string
 
auto is_format_supported (std::uint16_t flags, texture_format format) -> bool
 
void set_trace_logger (const std::function< void(const std::string &, const char *, uint16_t)> &logger)
 
void set_info_logger (const std::function< void(const std::string &, const char *, uint16_t)> &logger)
 
void set_warning_logger (const std::function< void(const std::string &, const char *, uint16_t)> &logger)
 
void set_error_logger (const std::function< void(const std::string &, const char *, uint16_t)> &logger)
 
void log (const std::string &category, const std::string &log_msg, const char *_filePath, uint16_t _line)
 
void set_platform_data (const platform_data &_data)
 
void shutdown ()
 
bool init (init_type init_data)
 
void vertex_pack (const float _input[4], bool _inputNormalized, attribute _attr, const vertex_layout &_decl, void *_data, uint32_t _index)
 
void vertex_unpack (float _output[4], attribute _attr, const vertex_layout &_decl, const void *_data, uint32_t _index)
 
void vertex_convert (const vertex_layout &_destDecl, void *_destData, const vertex_layout &_srcDecl, const void *_srcData, uint32_t _num)
 
uint16_t weld_vertices (uint16_t *_output, const vertex_layout &_decl, const void *_data, uint16_t _num, float _epsilon)
 
uint32_t topology_convert (topology_conversion _conversion, void *_dst, uint32_t _dstSize, const void *_indices, uint32_t _numIndices, bool _index32)
 
void topology_sort_tri_list (topology_sort _sort, void *_dst, uint32_t _dstSize, const float _dir[], const float _pos[], const void *_vertices, uint32_t _stride, const void *_indices, uint32_t _numIndices, bool _index32)
 
shader_handle create_embedded_shader (const embedded_shader *_es, renderer_type _type, const char *_name)
 
uint8_t get_supported_renderers (uint8_t _max, renderer_type *_enum)
 
const char * get_renderer_name (renderer_type _type)
 
void reset (uint32_t _width, uint32_t _height, uint32_t _flags)
 
encoderbegin ()
 
void end (encoder *_encoder)
 
uint32_t frame (bool _capture)
 
renderer_type get_renderer_type ()
 
const capsget_caps ()
 
const statsget_stats ()
 
const memory_viewalloc (uint32_t _size)
 
const memory_viewcopy (const void *_data, uint32_t _size)
 
const memory_viewmake_ref (const void *_data, uint32_t _size, release_fn _releaseFn, void *_userData)
 
void set_debug (uint32_t _debug)
 
void dbg_text_clear (uint8_t _attr, bool _small)
 
void dbg_text_printf (uint16_t _x, uint16_t _y, uint8_t _attr, const char *_format)
 
void dbg_text_vprintf (uint16_t _x, uint16_t _y, uint8_t _attr, const char *_format, va_list _argList)
 
void dbg_text_image (uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void *_data, uint16_t _pitch)
 
index_buffer_handle create_index_buffer (const memory_view *_mem, uint16_t _flags)
 
void destroy (index_buffer_handle _handle)
 
vertex_buffer_handle create_vertex_buffer (const memory_view *_mem, const vertex_layout &_decl, uint16_t _flags)
 
void destroy (vertex_buffer_handle _handle)
 
dynamic_index_buffer_handle create_dynamic_index_buffer (uint32_t _num, uint16_t _flags)
 
dynamic_index_buffer_handle create_dynamic_index_buffer (const memory_view *_mem, uint16_t _flags)
 
void update (dynamic_index_buffer_handle _handle, uint32_t _startIndex, const memory_view *_mem)
 
void destroy (dynamic_index_buffer_handle _handle)
 
dynamic_vertex_buffer_handle create_dynamic_vertex_buffer (uint32_t _num, const vertex_layout &_decl, uint16_t _flags)
 
dynamic_vertex_buffer_handle create_dynamic_vertex_buffer (const memory_view *_mem, const vertex_layout &_decl, uint16_t _flags)
 
void update (dynamic_vertex_buffer_handle _handle, uint32_t _startVertex, const memory_view *_mem)
 
void destroy (dynamic_vertex_buffer_handle _handle)
 
uint32_t get_avail_transient_index_buffer (uint32_t _num, bool _index32)
 
uint32_t get_avail_transient_vertex_buffer (uint32_t _num, const vertex_layout &_decl)
 
uint32_t get_avail_instance_data_buffer (uint32_t _num, uint16_t _stride)
 
void alloc_transient_index_buffer (transient_index_buffer *_tib, uint32_t _num, bool _index32)
 
void alloc_transient_vertex_buffer (transient_vertex_buffer *_tvb, uint32_t _num, const vertex_layout &_decl)
 
bool alloc_transient_buffers (transient_vertex_buffer *_tvb, const vertex_layout &_decl, uint32_t _numVertices, transient_index_buffer *_tib, uint32_t _numIndices)
 
void alloc_instance_data_buffer (instance_data_buffer *_idb, uint32_t _num, uint16_t _stride)
 
indirect_buffer_handle create_indirect_buffer (uint32_t _num)
 
void destroy (indirect_buffer_handle _handle)
 
shader_handle create_shader (const memory_view *_mem)
 
uint16_t get_shader_uniforms (shader_handle _handle, uniform_handle *_uniforms, uint16_t _max)
 
void get_uniform_info (uniform_handle _handle, uniform_info &_info)
 
void set_name (shader_handle _handle, const char *_name, int32_t _len)
 
void destroy (shader_handle _handle)
 
program_handle create_program (shader_handle _vsh, shader_handle _fsh, bool _destroyShaders)
 
program_handle create_program (shader_handle _csh, bool _destroyShaders)
 
void destroy (program_handle _handle)
 
bool is_texture_valid (uint16_t _depth, bool _cubeMap, uint16_t _numLayers, texture_format _format, uint64_t _flags)
 
void calc_texture_size (texture_info &_info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, texture_format _format)
 
texture_handle create_texture (const memory_view *_mem, uint64_t _flags, uint8_t _skip, texture_info *_info)
 
texture_handle create_texture_2d (uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, texture_format _format, uint64_t _flags, const memory_view *_mem)
 
texture_handle create_texture_2d (backbuffer_ratio _ratio, bool _hasMips, uint16_t _numLayers, texture_format _format, uint64_t _flags)
 
texture_handle create_texture_3d (uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, texture_format _format, uint64_t _flags, const memory_view *_mem)
 
texture_handle create_texture_cube (uint16_t _size, bool _hasMips, uint16_t _numLayers, texture_format _format, uint64_t _flags, const memory_view *_mem)
 
void update_texture_2d (texture_handle _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const memory_view *_mem, uint16_t _pitch)
 
void update_texture_3d (texture_handle _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const memory_view *_mem)
 
void update_texture_cube (texture_handle _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const memory_view *_mem, uint16_t _pitch)
 
uint32_t read_texture (texture_handle _handle, void *_data, uint8_t _mip)
 
void set_name (texture_handle _handle, const char *_name, int32_t _len)
 
void destroy (texture_handle _handle)
 
frame_buffer_handle create_frame_buffer (uint16_t _width, uint16_t _height, texture_format _format, uint64_t _textureFlags)
 
frame_buffer_handle create_frame_buffer (backbuffer_ratio _ratio, texture_format _format, uint64_t _textureFlags)
 
frame_buffer_handle create_frame_buffer (uint8_t _num, const texture_handle *_handles, bool _destroyTextures)
 
frame_buffer_handle create_frame_buffer (uint8_t _num, const attachment *_attachment, bool _destroyTextures)
 
frame_buffer_handle create_frame_buffer (void *_nwh, uint16_t _width, uint16_t _height, texture_format _format, texture_format _depthFormat)
 
texture_handle get_texture (frame_buffer_handle _handle, uint8_t _attachment)
 
void set_name (frame_buffer_handle _handle, const char *_name, int32_t _len)
 
void destroy (frame_buffer_handle _handle)
 
uniform_handle create_uniform (const char *_name, uniform_type _type, uint16_t _num)
 
void destroy (uniform_handle _handle)
 
occlusion_query_handle create_occlusion_query ()
 
occlusion_query_result get_result (occlusion_query_handle _handle, int32_t *_result)
 
void destroy (occlusion_query_handle _handle)
 
void set_palette_color (uint8_t _index, uint32_t _rgba)
 
void set_palette_color (uint8_t _index, const float _rgba[])
 
void set_palette_color (uint8_t _index, float _r, float _g, float _b, float _a)
 
void set_view_name (view_id _id, const char *_name)
 
void set_view_rect (view_id _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
 
void set_view_rect (view_id _id, uint16_t _x, uint16_t _y, backbuffer_ratio _ratio)
 
void set_view_scissor (view_id _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
 
void set_view_clear (view_id _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
 
void set_view_clear (view_id _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7)
 
void set_view_mode (view_id _id, view_mode _mode)
 
void set_view_frame_buffer (view_id _id, frame_buffer_handle _handle)
 
void set_view_transform (view_id _id, const void *_view, const void *_proj)
 
void set_view_order (view_id _id, uint16_t _num, const view_id *_order)
 
void reset_view (view_id _id)
 
void set_marker (const char *_marker)
 
void set_state (uint64_t _state, uint32_t _rgba)
 
void set_condition (occlusion_query_handle _handle, bool _visible)
 
void set_stencil (uint32_t _fstencil, uint32_t _bstencil)
 
uint16_t set_scissor (uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
 
void set_scissor (uint16_t _cache)
 
uint32_t set_transform (const void *_mtx, uint16_t _num)
 
uint32_t alloc_transform (transform *_transform, uint16_t _num)
 
void set_transform (uint32_t _cache, uint16_t _num)
 
void set_uniform (uniform_handle _handle, const void *_value, uint16_t _num)
 
void set_index_buffer (index_buffer_handle _handle)
 
void set_index_buffer (index_buffer_handle _handle, uint32_t _firstIndex, uint32_t _numIndices)
 
void set_index_buffer (dynamic_index_buffer_handle _handle)
 
void set_index_buffer (dynamic_index_buffer_handle _handle, uint32_t _firstIndex, uint32_t _numIndices)
 
void set_index_buffer (const transient_index_buffer *_tib)
 
void set_index_buffer (const transient_index_buffer *_tib, uint32_t _firstIndex, uint32_t _numIndices)
 
void set_vertex_buffer (uint8_t _stream, vertex_buffer_handle _handle)
 
void set_vertex_buffer (uint8_t _stream, vertex_buffer_handle _handle, uint32_t _startVertex, uint32_t _numVertices)
 
void set_vertex_buffer (uint8_t _stream, dynamic_vertex_buffer_handle _handle)
 
void set_vertex_buffer (uint8_t _stream, dynamic_vertex_buffer_handle _handle, uint32_t _startVertex, uint32_t _numVertices)
 
void set_vertex_buffer (uint8_t _stream, const transient_vertex_buffer *_tvb)
 
void set_vertex_buffer (uint8_t _stream, const transient_vertex_buffer *_tvb, uint32_t _startVertex, uint32_t _numVertices)
 
void set_instance_data_buffer (const instance_data_buffer *_idb, uint32_t _start, uint32_t _num)
 
void set_instance_data_buffer (vertex_buffer_handle _handle, uint32_t _startVertex, uint32_t _num)
 
void set_instance_data_buffer (dynamic_vertex_buffer_handle _handle, uint32_t _startVertex, uint32_t _num)
 
void set_texture (uint8_t _stage, uniform_handle _sampler, texture_handle _handle, uint32_t _flags)
 
void touch (view_id _id)
 
void submit (view_id _id, program_handle _handle, int32_t _depth, bool _preserveState)
 
void submit (view_id _id, program_handle _program, occlusion_query_handle _occlusionQuery, int32_t _depth, bool _preserveState)
 
void submit (view_id _id, program_handle _handle, indirect_buffer_handle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState)
 
void set_image (uint8_t _stage, texture_handle _handle, uint8_t _mip, access _access, texture_format _format)
 
void set_buffer (uint8_t _stage, index_buffer_handle _handle, access _access)
 
void set_buffer (uint8_t _stage, vertex_buffer_handle _handle, access _access)
 
void set_buffer (uint8_t _stage, dynamic_index_buffer_handle _handle, access _access)
 
void set_buffer (uint8_t _stage, dynamic_vertex_buffer_handle _handle, access _access)
 
void set_buffer (uint8_t _stage, indirect_buffer_handle _handle, access _access)
 
void dispatch (view_id _id, program_handle _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ)
 
void dispatch (view_id _id, program_handle _handle, indirect_buffer_handle _indirectHandle, uint16_t _start, uint16_t _num)
 
void discard (uint8_t _flags)
 
void blit (view_id _id, texture_handle _dst, uint16_t _dstX, uint16_t _dstY, texture_handle _src, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height)
 
void blit (view_id _id, texture_handle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, texture_handle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth)
 
void request_screen_shot (frame_buffer_handle _handle, const char *_filePath)
 
void flush ()
 
auto screen_quad (float dest_width, float dest_height, float depth, float width, float height) -> uint64_t
 
auto clip_quad (float depth, float width, float height) -> uint64_t
 
uint64_t clip_quad_ex (const clip_quad_def &def)
 
void get_size_from_ratio (backbuffer_ratio _ratio, uint16_t &_width, uint16_t &_height)
 
auto get_renderer_filename_extension (renderer_type _type) -> const std::string &
 
auto get_current_renderer_filename_extension () -> const std::string &
 
auto get_renderer_platform_supported_filename_extensions () -> const std::vector< std::string > &
 
auto get_renderer_based_on_filename_extension (const std::string &_type) -> renderer_type
 
auto is_homogeneous_depth () -> bool
 
auto is_origin_bottom_left () -> bool
 
auto get_max_blend_transforms () -> uint32_t
 
auto get_half_texel () -> float
 
auto is_supported (uint64_t flag) -> bool
 
bool check_avail_transient_buffers (uint32_t _numVertices, const vertex_layout &_layout, uint32_t _numIndices, bool _index32)
 
uint32_t get_render_frame ()
 
void set_world_transform (const void *_mtx, uint16_t _num)
 
void topology_sort_tri_list (topology_sort _sort, void *_dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void *_vertices, uint32_t _stride, const void *_indices, uint32_t _numIndices, bool _index32)
 
void dbg_text_printf (uint16_t _x, uint16_t _y, uint8_t _attr, const char *_format,...)
 
void set_palette_color (uint8_t _index, const float _rgba[4])
 
void dispatch_indirect (view_id _id, program_handle _handle, indirect_buffer_handle _indirectHandle, uint16_t _start=0, uint16_t _num=1)
 
void set_trace_logger (const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> &logger)
 
void set_info_logger (const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> &logger)
 
void set_warning_logger (const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> &logger)
 
void set_error_logger (const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> &logger)
 
bool operator== (const texture_key &key1, const texture_key &key2)
 
bool operator== (const fbo_key &key1, const fbo_key &key2)
 
void deinit_uniform_cache ()
 
auto add_white_glyph (Atlas *atlas, uint32_t size) -> glyph_info
 
 REFLECT (texture_info)
 
 REFLECT_EXTERN (texture_info)
 
void set_world_transform (const std::vector< math::transform::mat4_t > &matrices)
 Sets the transformation matrices.
 
void set_world_transform (const std::vector< math::transform > &matrices)
 Sets the transformations.
 
void set_world_transform (const math::transform::mat4_t &matrix)
 Sets the transformation matrix.
 
void set_world_transform (const math::transform &matrix)
 Sets the transformation.
 
void set_transform (const std::vector< math::transform::mat4_t > &matrices)
 
void set_transform (const std::vector< math::transform > &matrices)
 
void set_transform (const math::transform::mat4_t &matrix)
 
void set_transform (const math::transform &matrix)
 
void set_texture (const gfx::program::uniform_ptr &uniform, std::uint8_t stage, const gfx::frame_buffer::ptr &handle, uint8_t attachment=0, std::uint32_t flags=std::numeric_limits< std::uint32_t >::max())
 Sets the texture for a specific stage using a frame buffer.
 
void set_texture (const gfx::program::uniform_ptr &uniform, std::uint8_t stage, const gfx::texture::ptr &texture, std::uint32_t flags=std::numeric_limits< std::uint32_t >::max())
 Sets the texture for a specific stage using a texture.
 
void set_texture (const gfx::program::uniform_ptr &uniform, std::uint8_t stage, const gfx::frame_buffer *handle, uint8_t attachment=0, std::uint32_t flags=std::numeric_limits< std::uint32_t >::max())
 Sets the texture for a specific stage using a frame buffer.
 
void set_texture (const gfx::program::uniform_ptr &uniform, std::uint8_t stage, const gfx::texture *texture, std::uint32_t flags=std::numeric_limits< std::uint32_t >::max())
 Sets the texture for a specific stage using a texture.
 
void set_texture (const gfx::program::uniform_ptr &uniform, std::uint8_t stage, const asset_handle< gfx::texture > &texture, std::uint32_t flags=std::numeric_limits< std::uint32_t >::max())
 Sets the texture for a specific stage using a texture.
 
void set_uniform (const gfx::program::uniform_ptr &uniform, const void *value, std::uint16_t num=1)
 Sets a uniform value.
 
void set_uniform (const gfx::program::uniform_ptr &uniform, const math::mat4 &value, std::uint16_t num=1)
 Sets a uniform value.
 
void set_uniform (const gfx::program::uniform_ptr &uniform, const math::vec4 &value, std::uint16_t num=1)
 Sets a uniform value.
 
void set_uniform (const gfx::program::uniform_ptr &uniform, const math::vec3 &value, std::uint16_t num=1)
 Sets a uniform value.
 
void set_uniform (const gfx::program::uniform_ptr &uniform, const math::vec2 &value, std::uint16_t num=1)
 Sets a uniform value.
 

Detailed Description

Inspired from texture-atlas from freetype-gl (http://code.google.com/p/freetype-gl/) by Nicolas Rougier (Nicol.nosp@m.as.R.nosp@m.ougie.nosp@m.r@in.nosp@m.ria.f.nosp@m.r) The actual implementation is based on the article by Jukka Jylänki : "A Thousand Ways to Pack the Bin - A Practical Approach to Two-Dimensional Rectangle Bin Packing", February 27, 2010. More precisely, this is an implementation of the Skyline Bottom-Left algorithm based on C++ sources provided by Jukka Jylänki at: http://clb.demon.fi/files/RectangleBinPack/

Typedef Documentation

◆ access

using gfx::access = bgfx::Access::Enum

Definition at line 31 of file graphics.h.

◆ attachment

using gfx::attachment = bgfx::Attachment

Definition at line 27 of file graphics.h.

◆ attribute

using gfx::attribute = bgfx::Attrib::Enum

Definition at line 9 of file vertex_decl.h.

◆ attribute_type

using gfx::attribute_type = bgfx::AttribType::Enum

Definition at line 10 of file vertex_decl.h.

◆ backbuffer_ratio

using gfx::backbuffer_ratio = bgfx::BackbufferRatio::Enum

Definition at line 22 of file graphics.h.

◆ caps

using gfx::caps = bgfx::Caps

Definition at line 29 of file graphics.h.

◆ code_point

using gfx::code_point = uint32_t

Unicode value of a character.

Definition at line 92 of file font_manager.h.

◆ dynamic_index_buffer_handle

using gfx::dynamic_index_buffer_handle = bgfx::DynamicIndexBufferHandle

Definition at line 41 of file graphics.h.

◆ dynamic_vertex_buffer_handle

using gfx::dynamic_vertex_buffer_handle = bgfx::DynamicVertexBufferHandle

Definition at line 42 of file graphics.h.

◆ embedded_shader

using gfx::embedded_shader = bgfx::EmbeddedShader

Definition at line 53 of file graphics.h.

◆ encoder

using gfx::encoder = bgfx::Encoder

Definition at line 38 of file graphics.h.

◆ frame_buffer_handle

using gfx::frame_buffer_handle = bgfx::FrameBufferHandle

Definition at line 43 of file graphics.h.

◆ glyph_lut_t

using gfx::glyph_lut_t = stl::unordered_map<code_point, glyph_info>

Definition at line 367 of file font_manager.cpp.

◆ index_buffer_handle

using gfx::index_buffer_handle = bgfx::IndexBufferHandle

Definition at line 44 of file graphics.h.

◆ indirect_buffer_handle

using gfx::indirect_buffer_handle = bgfx::IndirectBufferHandle

Definition at line 45 of file graphics.h.

◆ init_type

using gfx::init_type = bgfx::Init

Definition at line 19 of file graphics.h.

◆ instance_data_buffer

using gfx::instance_data_buffer = bgfx::InstanceDataBuffer

Definition at line 56 of file graphics.h.

◆ memory_view

using gfx::memory_view = bgfx::Memory

Definition at line 23 of file graphics.h.

◆ occlusion_query_handle

using gfx::occlusion_query_handle = bgfx::OcclusionQueryHandle

Definition at line 46 of file graphics.h.

◆ occlusion_query_result

using gfx::occlusion_query_result = bgfx::OcclusionQueryResult::Enum

Definition at line 33 of file graphics.h.

◆ platform_data

using gfx::platform_data = bgfx::PlatformData

Definition at line 28 of file graphics.h.

◆ program_handle

using gfx::program_handle = bgfx::ProgramHandle

Definition at line 47 of file graphics.h.

◆ release_fn

using gfx::release_fn = bgfx::ReleaseFn

Definition at line 37 of file graphics.h.

◆ renderer_type

using gfx::renderer_type = bgfx::RendererType::Enum

Definition at line 21 of file graphics.h.

◆ shader_handle

using gfx::shader_handle = bgfx::ShaderHandle

Definition at line 48 of file graphics.h.

◆ stats

using gfx::stats = bgfx::Stats

Definition at line 30 of file graphics.h.

◆ texture_format

using gfx::texture_format = bgfx::TextureFormat::Enum

Definition at line 10 of file format.h.

◆ texture_handle

using gfx::texture_handle = bgfx::TextureHandle

Definition at line 49 of file graphics.h.

◆ texture_info

using gfx::texture_info = bgfx::TextureInfo

Definition at line 24 of file graphics.h.

◆ topology

using gfx::topology = bgfx::Topology

Definition at line 36 of file graphics.h.

◆ topology_conversion

using gfx::topology_conversion = bgfx::TopologyConvert::Enum

Definition at line 34 of file graphics.h.

◆ topology_sort

using gfx::topology_sort = bgfx::TopologySort::Enum

Definition at line 35 of file graphics.h.

◆ transform

using gfx::transform = bgfx::Transform

Definition at line 40 of file graphics.h.

◆ transient_index_buffer

using gfx::transient_index_buffer = bgfx::TransientIndexBuffer

Definition at line 55 of file graphics.h.

◆ transient_vertex_buffer

using gfx::transient_vertex_buffer = bgfx::TransientVertexBuffer

Definition at line 54 of file graphics.h.

◆ uniform_handle

using gfx::uniform_handle = bgfx::UniformHandle

Definition at line 50 of file graphics.h.

◆ uniform_info

using gfx::uniform_info = bgfx::UniformInfo

Definition at line 26 of file graphics.h.

◆ uniform_type

using gfx::uniform_type = bgfx::UniformType::Enum

Definition at line 25 of file graphics.h.

◆ vertex_buffer_handle

using gfx::vertex_buffer_handle = bgfx::VertexBufferHandle

Definition at line 51 of file graphics.h.

◆ vertex_layout

using gfx::vertex_layout = bgfx::VertexLayout

Definition at line 8 of file vertex_decl.h.

◆ vertex_layout_handle

using gfx::vertex_layout_handle = bgfx::VertexLayoutHandle

Definition at line 52 of file graphics.h.

◆ view_id

using gfx::view_id = bgfx::ViewId

Definition at line 20 of file graphics.h.

◆ view_mode

using gfx::view_mode = bgfx::ViewMode::Enum

Definition at line 32 of file graphics.h.

Enumeration Type Documentation

◆ text_style_flags

special style effect (can be combined)

Enumerator
style_normal 
style_overline 
style_underline 
style_strike_through 
style_background 
style_foreground 

Definition at line 29 of file text_buffer_manager.h.

Function Documentation

◆ add_white_glyph()

auto gfx::add_white_glyph ( Atlas * atlas,
uint32_t size ) -> glyph_info

make sure the white glyph doesn't bleed by using a one pixel inner outline

Definition at line 383 of file font_manager.cpp.

◆ alloc()

const memory_view * gfx::alloc ( uint32_t _size)

Definition at line 296 of file graphics.cpp.

◆ alloc_instance_data_buffer()

void gfx::alloc_instance_data_buffer ( instance_data_buffer * _idb,
uint32_t _num,
uint16_t _stride )

Definition at line 432 of file graphics.cpp.

◆ alloc_transform()

uint32_t gfx::alloc_transform ( transform * _transform,
uint16_t _num )

Definition at line 793 of file graphics.cpp.

◆ alloc_transient_buffers()

bool gfx::alloc_transient_buffers ( transient_vertex_buffer * _tvb,
const vertex_layout & _decl,
uint32_t _numVertices,
transient_index_buffer * _tib,
uint32_t _numIndices )

Definition at line 423 of file graphics.cpp.

◆ alloc_transient_index_buffer()

void gfx::alloc_transient_index_buffer ( transient_index_buffer * _tib,
uint32_t _num,
bool _index32 )

Definition at line 413 of file graphics.cpp.

◆ alloc_transient_vertex_buffer()

void gfx::alloc_transient_vertex_buffer ( transient_vertex_buffer * _tvb,
uint32_t _num,
const vertex_layout & _decl )

Definition at line 418 of file graphics.cpp.

◆ begin()

encoder * gfx::begin ( )

Definition at line 265 of file graphics.cpp.

◆ blit() [1/2]

void gfx::blit ( view_id _id,
texture_handle _dst,
uint16_t _dstX,
uint16_t _dstY,
texture_handle _src,
uint16_t _srcX,
uint16_t _srcY,
uint16_t _width,
uint16_t _height )

Definition at line 973 of file graphics.cpp.

◆ blit() [2/2]

void gfx::blit ( view_id _id,
texture_handle _dst,
uint8_t _dstMip,
uint16_t _dstX,
uint16_t _dstY,
uint16_t _dstZ,
texture_handle _src,
uint8_t _srcMip,
uint16_t _srcX,
uint16_t _srcY,
uint16_t _srcZ,
uint16_t _width,
uint16_t _height,
uint16_t _depth )

Definition at line 986 of file graphics.cpp.

◆ calc_texture_size()

void gfx::calc_texture_size ( texture_info & _info,
uint16_t _width,
uint16_t _height,
uint16_t _depth,
bool _cubeMap,
bool _hasMips,
uint16_t _numLayers,
texture_format _format )

Definition at line 492 of file graphics.cpp.

◆ check_avail_transient_buffers()

bool gfx::check_avail_transient_buffers ( uint32_t _numVertices,
const vertex_layout & _layout,
uint32_t _numIndices,
bool _index32 )

Definition at line 1329 of file graphics.cpp.

◆ clip_quad()

uint64_t gfx::clip_quad ( float depth,
float width,
float height ) -> uint64_t

Definition at line 1075 of file graphics.cpp.

◆ clip_quad_ex()

uint64_t gfx::clip_quad_ex ( const clip_quad_def & def)

Definition at line 1137 of file graphics.cpp.

◆ copy()

const memory_view * gfx::copy ( const void * _data,
uint32_t _size )

Definition at line 301 of file graphics.cpp.

◆ create_dynamic_index_buffer() [1/2]

dynamic_index_buffer_handle gfx::create_dynamic_index_buffer ( const memory_view * _mem,
uint16_t _flags )

Definition at line 361 of file graphics.cpp.

◆ create_dynamic_index_buffer() [2/2]

dynamic_index_buffer_handle gfx::create_dynamic_index_buffer ( uint32_t _num,
uint16_t _flags )

Definition at line 356 of file graphics.cpp.

◆ create_dynamic_vertex_buffer() [1/2]

dynamic_vertex_buffer_handle gfx::create_dynamic_vertex_buffer ( const memory_view * _mem,
const vertex_layout & _decl,
uint16_t _flags )

Definition at line 381 of file graphics.cpp.

◆ create_dynamic_vertex_buffer() [2/2]

dynamic_vertex_buffer_handle gfx::create_dynamic_vertex_buffer ( uint32_t _num,
const vertex_layout & _decl,
uint16_t _flags )

Definition at line 376 of file graphics.cpp.

◆ create_embedded_shader()

shader_handle gfx::create_embedded_shader ( const embedded_shader * _es,
renderer_type _type,
const char * _name )

Definition at line 245 of file graphics.cpp.

◆ create_frame_buffer() [1/5]

frame_buffer_handle gfx::create_frame_buffer ( backbuffer_ratio _ratio,
texture_format _format,
uint64_t _textureFlags )

Definition at line 613 of file graphics.cpp.

◆ create_frame_buffer() [2/5]

frame_buffer_handle gfx::create_frame_buffer ( uint16_t _width,
uint16_t _height,
texture_format _format,
uint64_t _textureFlags )

Definition at line 605 of file graphics.cpp.

◆ create_frame_buffer() [3/5]

frame_buffer_handle gfx::create_frame_buffer ( uint8_t _num,
const attachment * _attachment,
bool _destroyTextures )

Definition at line 623 of file graphics.cpp.

◆ create_frame_buffer() [4/5]

frame_buffer_handle gfx::create_frame_buffer ( uint8_t _num,
const texture_handle * _handles,
bool _destroyTextures )

Definition at line 618 of file graphics.cpp.

◆ create_frame_buffer() [5/5]

frame_buffer_handle gfx::create_frame_buffer ( void * _nwh,
uint16_t _width,
uint16_t _height,
texture_format _format,
texture_format _depthFormat )

Definition at line 628 of file graphics.cpp.

◆ create_index_buffer()

index_buffer_handle gfx::create_index_buffer ( const memory_view * _mem,
uint16_t _flags )

Definition at line 336 of file graphics.cpp.

◆ create_indirect_buffer()

indirect_buffer_handle gfx::create_indirect_buffer ( uint32_t _num)

Definition at line 437 of file graphics.cpp.

◆ create_occlusion_query()

occlusion_query_handle gfx::create_occlusion_query ( )

Definition at line 662 of file graphics.cpp.

◆ create_program() [1/2]

program_handle gfx::create_program ( shader_handle _csh,
bool _destroyShaders )

Definition at line 477 of file graphics.cpp.

◆ create_program() [2/2]

program_handle gfx::create_program ( shader_handle _vsh,
shader_handle _fsh,
bool _destroyShaders )

Definition at line 472 of file graphics.cpp.

◆ create_shader()

shader_handle gfx::create_shader ( const memory_view * _mem)

Definition at line 447 of file graphics.cpp.

◆ create_texture()

texture_handle gfx::create_texture ( const memory_view * _mem,
uint64_t _flags,
uint8_t _skip,
texture_info * _info )

Definition at line 504 of file graphics.cpp.

◆ create_texture_2d() [1/2]

texture_handle gfx::create_texture_2d ( backbuffer_ratio _ratio,
bool _hasMips,
uint16_t _numLayers,
texture_format _format,
uint64_t _flags )

Definition at line 520 of file graphics.cpp.

◆ create_texture_2d() [2/2]

texture_handle gfx::create_texture_2d ( uint16_t _width,
uint16_t _height,
bool _hasMips,
uint16_t _numLayers,
texture_format _format,
uint64_t _flags,
const memory_view * _mem )

Definition at line 509 of file graphics.cpp.

◆ create_texture_3d()

texture_handle gfx::create_texture_3d ( uint16_t _width,
uint16_t _height,
uint16_t _depth,
bool _hasMips,
texture_format _format,
uint64_t _flags,
const memory_view * _mem )

Definition at line 529 of file graphics.cpp.

◆ create_texture_cube()

texture_handle gfx::create_texture_cube ( uint16_t _size,
bool _hasMips,
uint16_t _numLayers,
texture_format _format,
uint64_t _flags,
const memory_view * _mem )

Definition at line 540 of file graphics.cpp.

◆ create_uniform()

uniform_handle gfx::create_uniform ( const char * _name,
uniform_type _type,
uint16_t _num )

Definition at line 652 of file graphics.cpp.

◆ create_vertex_buffer()

vertex_buffer_handle gfx::create_vertex_buffer ( const memory_view * _mem,
const vertex_layout & _decl,
uint16_t _flags )

Definition at line 346 of file graphics.cpp.

◆ dbg_text_clear()

void gfx::dbg_text_clear ( uint8_t _attr,
bool _small )

Definition at line 316 of file graphics.cpp.

◆ dbg_text_image()

void gfx::dbg_text_image ( uint16_t _x,
uint16_t _y,
uint16_t _width,
uint16_t _height,
const void * _data,
uint16_t _pitch )

Definition at line 331 of file graphics.cpp.

◆ dbg_text_printf() [1/2]

void gfx::dbg_text_printf ( uint16_t _x,
uint16_t _y,
uint8_t _attr,
const char * _format )

Definition at line 321 of file graphics.cpp.

◆ dbg_text_printf() [2/2]

void gfx::dbg_text_printf ( uint16_t _x,
uint16_t _y,
uint8_t _attr,
const char * _format,
... )

◆ dbg_text_vprintf()

void gfx::dbg_text_vprintf ( uint16_t _x,
uint16_t _y,
uint8_t _attr,
const char * _format,
va_list _argList )

Definition at line 326 of file graphics.cpp.

◆ deinit_uniform_cache()

void gfx::deinit_uniform_cache ( )

Definition at line 59 of file uniform.cpp.

◆ destroy() [1/11]

void gfx::destroy ( dynamic_index_buffer_handle _handle)

Definition at line 371 of file graphics.cpp.

◆ destroy() [2/11]

void gfx::destroy ( dynamic_vertex_buffer_handle _handle)

Definition at line 393 of file graphics.cpp.

◆ destroy() [3/11]

void gfx::destroy ( frame_buffer_handle _handle)

Definition at line 647 of file graphics.cpp.

◆ destroy() [4/11]

void gfx::destroy ( index_buffer_handle _handle)

Definition at line 341 of file graphics.cpp.

◆ destroy() [5/11]

void gfx::destroy ( indirect_buffer_handle _handle)

Definition at line 442 of file graphics.cpp.

◆ destroy() [6/11]

void gfx::destroy ( occlusion_query_handle _handle)

Definition at line 672 of file graphics.cpp.

◆ destroy() [7/11]

void gfx::destroy ( program_handle _handle)

Definition at line 482 of file graphics.cpp.

◆ destroy() [8/11]

void gfx::destroy ( shader_handle _handle)

Definition at line 467 of file graphics.cpp.

◆ destroy() [9/11]

void gfx::destroy ( texture_handle _handle)

Definition at line 600 of file graphics.cpp.

◆ destroy() [10/11]

void gfx::destroy ( uniform_handle _handle)

Definition at line 657 of file graphics.cpp.

◆ destroy() [11/11]

void gfx::destroy ( vertex_buffer_handle _handle)

Definition at line 351 of file graphics.cpp.

◆ discard()

void gfx::discard ( uint8_t _flags)

Definition at line 968 of file graphics.cpp.

◆ dispatch() [1/2]

void gfx::dispatch ( view_id _id,
program_handle _handle,
indirect_buffer_handle _indirectHandle,
uint16_t _start,
uint16_t _num )

Definition at line 959 of file graphics.cpp.

◆ dispatch() [2/2]

void gfx::dispatch ( view_id _id,
program_handle _handle,
uint32_t _numX,
uint32_t _numY,
uint32_t _numZ )

Definition at line 954 of file graphics.cpp.

◆ dispatch_indirect()

void gfx::dispatch_indirect ( view_id _id,
program_handle _handle,
indirect_buffer_handle _indirectHandle,
uint16_t _start = 0,
uint16_t _num = 1 )

◆ draw_billboard()

void gfx::draw_billboard ( DebugDrawEncoder & dd,
bgfx::TextureHandle icon_texture,
const bx::Vec3 & icon_center,
const bx::Vec3 & camera_pos,
const bx::Vec3 & camera_look_dir,
float half_size )

Definition at line 25 of file debugdraw.cpp.

◆ end()

void gfx::end ( encoder * _encoder)

Definition at line 270 of file graphics.cpp.

◆ flush()

void gfx::flush ( )

Definition at line 1009 of file graphics.cpp.

◆ frame()

uint32_t gfx::frame ( bool _capture)

Definition at line 275 of file graphics.cpp.

◆ get_avail_instance_data_buffer()

uint32_t gfx::get_avail_instance_data_buffer ( uint32_t _num,
uint16_t _stride )

Definition at line 408 of file graphics.cpp.

◆ get_avail_transient_index_buffer()

uint32_t gfx::get_avail_transient_index_buffer ( uint32_t _num,
bool _index32 )

Definition at line 398 of file graphics.cpp.

◆ get_avail_transient_vertex_buffer()

uint32_t gfx::get_avail_transient_vertex_buffer ( uint32_t _num,
const vertex_layout & _decl )

Definition at line 403 of file graphics.cpp.

◆ get_best_depth_format()

auto gfx::get_best_depth_format ( std::uint16_t type_flags,
std::uint32_t search_flags ) -> texture_format

Definition at line 198 of file format.cpp.

◆ get_best_float_format()

auto gfx::get_best_float_format ( std::uint16_t type_flags,
std::uint32_t search_flags,
bool requires_alpha,
bool accept_padding,
bool accept_half,
bool accept_full ) -> texture_format

Definition at line 6 of file format.cpp.

◆ get_best_format()

auto gfx::get_best_format ( std::uint16_t type_flags,
std::uint32_t search_flags ) -> texture_format

Definition at line 234 of file format.cpp.

◆ get_best_standard_format()

auto gfx::get_best_standard_format ( std::uint16_t type_flags,
std::uint32_t search_flags,
bool requires_alpha,
bool accept_padding ) -> texture_format

Definition at line 70 of file format.cpp.

◆ get_caps()

const caps * gfx::get_caps ( )

Definition at line 286 of file graphics.cpp.

◆ get_current_renderer_filename_extension()

const std::string & gfx::get_current_renderer_filename_extension ( ) -> const std::string &

Definition at line 1264 of file graphics.cpp.

◆ get_default_rt_sampler_flags()

auto gfx::get_default_rt_sampler_flags ( ) -> uint64_t

Definition at line 283 of file format.cpp.

◆ get_format_info()

auto gfx::get_format_info ( texture_format fmt) -> format_details

Definition at line 296 of file format.cpp.

◆ get_half_texel()

float gfx::get_half_texel ( ) -> float

Definition at line 1316 of file graphics.cpp.

◆ get_max_blend_transforms()

uint32_t gfx::get_max_blend_transforms ( ) -> uint32_t

Definition at line 1311 of file graphics.cpp.

◆ get_render_frame()

uint32_t gfx::get_render_frame ( )

Definition at line 1338 of file graphics.cpp.

◆ get_renderer_based_on_filename_extension()

renderer_type gfx::get_renderer_based_on_filename_extension ( const std::string & _type) -> renderer_type

Definition at line 1284 of file graphics.cpp.

◆ get_renderer_filename_extension()

const std::string & gfx::get_renderer_filename_extension ( renderer_type _type) -> const std::string &

Definition at line 1241 of file graphics.cpp.

◆ get_renderer_name()

const char * gfx::get_renderer_name ( renderer_type _type)

Definition at line 255 of file graphics.cpp.

◆ get_renderer_platform_supported_filename_extensions()

const std::vector< std::string > & gfx::get_renderer_platform_supported_filename_extensions ( ) -> const std::vector< std::string > &

Definition at line 1269 of file graphics.cpp.

◆ get_renderer_type()

renderer_type gfx::get_renderer_type ( )

Definition at line 281 of file graphics.cpp.

◆ get_result()

occlusion_query_result gfx::get_result ( occlusion_query_handle _handle,
int32_t * _result )

Definition at line 667 of file graphics.cpp.

◆ get_shader_uniforms()

uint16_t gfx::get_shader_uniforms ( shader_handle _handle,
uniform_handle * _uniforms,
uint16_t _max )

Definition at line 452 of file graphics.cpp.

◆ get_size_from_ratio()

void gfx::get_size_from_ratio ( backbuffer_ratio _ratio,
uint16_t & _width,
uint16_t & _height )

Definition at line 1205 of file graphics.cpp.

◆ get_stats()

const stats * gfx::get_stats ( )

Definition at line 291 of file graphics.cpp.

◆ get_supported_renderers()

uint8_t gfx::get_supported_renderers ( uint8_t _max,
renderer_type * _enum )

Definition at line 250 of file graphics.cpp.

◆ get_texture()

texture_handle gfx::get_texture ( frame_buffer_handle _handle,
uint8_t _attachment )

Definition at line 637 of file graphics.cpp.

◆ get_uniform_info()

void gfx::get_uniform_info ( uniform_handle _handle,
uniform_info & _info )

Definition at line 457 of file graphics.cpp.

◆ init()

bool gfx::init ( init_type init_data)

Definition at line 177 of file graphics.cpp.

◆ is_format_supported() [1/2]

auto gfx::is_format_supported ( std::uint16_t flags,
texture_format format ) -> bool

◆ is_format_supported() [2/2]

auto gfx::is_format_supported ( uint16_t flags,
texture_format format ) -> bool

Definition at line 290 of file format.cpp.

◆ is_homogeneous_depth()

bool gfx::is_homogeneous_depth ( ) -> bool

Definition at line 1300 of file graphics.cpp.

◆ is_origin_bottom_left()

bool gfx::is_origin_bottom_left ( ) -> bool

Definition at line 1306 of file graphics.cpp.

◆ is_supported()

bool gfx::is_supported ( uint64_t flag) -> bool

Definition at line 1322 of file graphics.cpp.

◆ is_texture_valid()

bool gfx::is_texture_valid ( uint16_t _depth,
bool _cubeMap,
uint16_t _numLayers,
texture_format _format,
uint64_t _flags )

Definition at line 487 of file graphics.cpp.

◆ log()

void gfx::log ( const std::string & category,
const std::string & log_msg,
const char * _filePath,
uint16_t _line )

Definition at line 47 of file graphics.cpp.

◆ make_ref()

const memory_view * gfx::make_ref ( const void * _data,
uint32_t _size,
release_fn _releaseFn,
void * _userData )

Definition at line 306 of file graphics.cpp.

◆ operator==() [1/2]

bool gfx::operator== ( const fbo_key & key1,
const fbo_key & key2 )

Definition at line 15 of file render_view_keys.cpp.

◆ operator==() [2/2]

bool gfx::operator== ( const texture_key & key1,
const texture_key & key2 )

Definition at line 5 of file render_view_keys.cpp.

◆ read_texture()

uint32_t gfx::read_texture ( texture_handle _handle,
void * _data,
uint8_t _mip )

Definition at line 590 of file graphics.cpp.

◆ REFLECT()

gfx::REFLECT ( texture_info )

Definition at line 9 of file texture.cpp.

◆ REFLECT_EXTERN()

gfx::REFLECT_EXTERN ( texture_info )

◆ request_screen_shot()

void gfx::request_screen_shot ( frame_buffer_handle _handle,
const char * _filePath )

Definition at line 1004 of file graphics.cpp.

◆ reset()

void gfx::reset ( uint32_t _width,
uint32_t _height,
uint32_t _flags )

Definition at line 260 of file graphics.cpp.

◆ reset_view()

void gfx::reset_view ( view_id _id)

Definition at line 753 of file graphics.cpp.

◆ screen_quad()

uint64_t gfx::screen_quad ( float dest_width,
float dest_height,
float depth,
float width,
float height ) -> uint64_t

Definition at line 1015 of file graphics.cpp.

◆ set_buffer() [1/5]

void gfx::set_buffer ( uint8_t _stage,
dynamic_index_buffer_handle _handle,
access _access )

Definition at line 939 of file graphics.cpp.

◆ set_buffer() [2/5]

void gfx::set_buffer ( uint8_t _stage,
dynamic_vertex_buffer_handle _handle,
access _access )

Definition at line 944 of file graphics.cpp.

◆ set_buffer() [3/5]

void gfx::set_buffer ( uint8_t _stage,
index_buffer_handle _handle,
access _access )

Definition at line 929 of file graphics.cpp.

◆ set_buffer() [4/5]

void gfx::set_buffer ( uint8_t _stage,
indirect_buffer_handle _handle,
access _access )

Definition at line 949 of file graphics.cpp.

◆ set_buffer() [5/5]

void gfx::set_buffer ( uint8_t _stage,
vertex_buffer_handle _handle,
access _access )

Definition at line 934 of file graphics.cpp.

◆ set_condition()

void gfx::set_condition ( occlusion_query_handle _handle,
bool _visible )

Definition at line 768 of file graphics.cpp.

◆ set_debug()

void gfx::set_debug ( uint32_t _debug)

Definition at line 311 of file graphics.cpp.

◆ set_error_logger() [1/2]

void gfx::set_error_logger ( const std::function< void(const std::string &, const char *, uint16_t)> & logger)

Definition at line 43 of file graphics.cpp.

◆ set_error_logger() [2/2]

void gfx::set_error_logger ( const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> & logger)

◆ set_image()

void gfx::set_image ( uint8_t _stage,
texture_handle _handle,
uint8_t _mip,
access _access,
texture_format _format )

Definition at line 924 of file graphics.cpp.

◆ set_index_buffer() [1/6]

void gfx::set_index_buffer ( const transient_index_buffer * _tib)

Definition at line 828 of file graphics.cpp.

◆ set_index_buffer() [2/6]

void gfx::set_index_buffer ( const transient_index_buffer * _tib,
uint32_t _firstIndex,
uint32_t _numIndices )

Definition at line 833 of file graphics.cpp.

◆ set_index_buffer() [3/6]

void gfx::set_index_buffer ( dynamic_index_buffer_handle _handle)

Definition at line 818 of file graphics.cpp.

◆ set_index_buffer() [4/6]

void gfx::set_index_buffer ( dynamic_index_buffer_handle _handle,
uint32_t _firstIndex,
uint32_t _numIndices )

Definition at line 823 of file graphics.cpp.

◆ set_index_buffer() [5/6]

void gfx::set_index_buffer ( index_buffer_handle _handle)

Definition at line 808 of file graphics.cpp.

◆ set_index_buffer() [6/6]

void gfx::set_index_buffer ( index_buffer_handle _handle,
uint32_t _firstIndex,
uint32_t _numIndices )

Definition at line 813 of file graphics.cpp.

◆ set_info_logger() [1/2]

void gfx::set_info_logger ( const std::function< void(const std::string &, const char *, uint16_t)> & logger)

Definition at line 35 of file graphics.cpp.

◆ set_info_logger() [2/2]

void gfx::set_info_logger ( const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> & logger)

◆ set_instance_data_buffer() [1/3]

void gfx::set_instance_data_buffer ( const instance_data_buffer * _idb,
uint32_t _start,
uint32_t _num )

Definition at line 874 of file graphics.cpp.

◆ set_instance_data_buffer() [2/3]

void gfx::set_instance_data_buffer ( dynamic_vertex_buffer_handle _handle,
uint32_t _startVertex,
uint32_t _num )

Definition at line 884 of file graphics.cpp.

◆ set_instance_data_buffer() [3/3]

void gfx::set_instance_data_buffer ( vertex_buffer_handle _handle,
uint32_t _startVertex,
uint32_t _num )

Definition at line 879 of file graphics.cpp.

◆ set_marker()

void gfx::set_marker ( const char * _marker)

Definition at line 758 of file graphics.cpp.

◆ set_name() [1/3]

void gfx::set_name ( frame_buffer_handle _handle,
const char * _name,
int32_t _len )

Definition at line 642 of file graphics.cpp.

◆ set_name() [2/3]

void gfx::set_name ( shader_handle _handle,
const char * _name,
int32_t _len )

Definition at line 462 of file graphics.cpp.

◆ set_name() [3/3]

void gfx::set_name ( texture_handle _handle,
const char * _name,
int32_t _len )

Definition at line 595 of file graphics.cpp.

◆ set_palette_color() [1/4]

void gfx::set_palette_color ( uint8_t _index,
const float _rgba[4] )

◆ set_palette_color() [2/4]

void gfx::set_palette_color ( uint8_t _index,
const float _rgba[] )

Definition at line 682 of file graphics.cpp.

◆ set_palette_color() [3/4]

void gfx::set_palette_color ( uint8_t _index,
float _r,
float _g,
float _b,
float _a )

Definition at line 687 of file graphics.cpp.

◆ set_palette_color() [4/4]

void gfx::set_palette_color ( uint8_t _index,
uint32_t _rgba )

Definition at line 677 of file graphics.cpp.

◆ set_platform_data()

void gfx::set_platform_data ( const platform_data & _data)

Definition at line 162 of file graphics.cpp.

◆ set_scissor() [1/2]

void gfx::set_scissor ( uint16_t _cache)

Definition at line 783 of file graphics.cpp.

◆ set_scissor() [2/2]

uint16_t gfx::set_scissor ( uint16_t _x,
uint16_t _y,
uint16_t _width,
uint16_t _height )

Definition at line 778 of file graphics.cpp.

◆ set_state()

void gfx::set_state ( uint64_t _state,
uint32_t _rgba )

Definition at line 763 of file graphics.cpp.

◆ set_stencil()

void gfx::set_stencil ( uint32_t _fstencil,
uint32_t _bstencil )

Definition at line 773 of file graphics.cpp.

◆ set_texture() [1/6]

void gfx::set_texture ( const gfx::program::uniform_ptr & uniform,
std::uint8_t stage,
const asset_handle< gfx::texture > & texture,
std::uint32_t flags = std::numeric_limits< std::uint32_t >::max() )

Sets the texture for a specific stage using a texture.

Parameters
uniformThe uniform pointer.
_stageThe stage number.
_textureThe texture handle.
_flagsThe texture flags.

Definition at line 280 of file gpu_program.cpp.

◆ set_texture() [2/6]

void gfx::set_texture ( const gfx::program::uniform_ptr & uniform,
std::uint8_t stage,
const gfx::frame_buffer * handle,
uint8_t attachment = 0,
std::uint32_t flags = std::numeric_limits< std::uint32_t >::max() )

Sets the texture for a specific stage using a frame buffer.

Parameters
uniformThe uniform pointer.
_stageThe stage number.
_handleThe frame buffer handle.
_attachmentThe attachment point.
_flagsThe texture flags.

Definition at line 253 of file gpu_program.cpp.

◆ set_texture() [3/6]

void gfx::set_texture ( const gfx::program::uniform_ptr & uniform,
std::uint8_t stage,
const gfx::frame_buffer::ptr & handle,
uint8_t attachment = 0,
std::uint32_t flags = std::numeric_limits< std::uint32_t >::max() )

Sets the texture for a specific stage using a frame buffer.

Parameters
uniformThe uniform pointer.
_stageThe stage number.
_handleThe frame buffer handle.
_attachmentThe attachment point.
_flagsThe texture flags.

Definition at line 236 of file gpu_program.cpp.

◆ set_texture() [4/6]

void gfx::set_texture ( const gfx::program::uniform_ptr & uniform,
std::uint8_t stage,
const gfx::texture * texture,
std::uint32_t flags = std::numeric_limits< std::uint32_t >::max() )

Sets the texture for a specific stage using a texture.

Parameters
uniformThe uniform pointer.
_stageThe stage number.
_textureThe texture handle.
_flagsThe texture flags.

Definition at line 267 of file gpu_program.cpp.

◆ set_texture() [5/6]

void gfx::set_texture ( const gfx::program::uniform_ptr & uniform,
std::uint8_t stage,
const gfx::texture::ptr & texture,
std::uint32_t flags = std::numeric_limits< std::uint32_t >::max() )

Sets the texture for a specific stage using a texture.

Parameters
uniformThe uniform pointer.
_stageThe stage number.
_textureThe texture handle.
_flagsThe texture flags.

Definition at line 245 of file gpu_program.cpp.

◆ set_texture() [6/6]

void gfx::set_texture ( uint8_t _stage,
uniform_handle _sampler,
texture_handle _handle,
uint32_t _flags )

Definition at line 889 of file graphics.cpp.

◆ set_trace_logger() [1/2]

void gfx::set_trace_logger ( const std::function< void(const std::string &, const char *, uint16_t)> & logger)

Definition at line 30 of file graphics.cpp.

◆ set_trace_logger() [2/2]

void gfx::set_trace_logger ( const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> & logger)

◆ set_transform() [1/6]

void gfx::set_transform ( const math::transform & matrix)

Definition at line 231 of file gpu_program.cpp.

◆ set_transform() [2/6]

void gfx::set_transform ( const math::transform::mat4_t & matrix)

Definition at line 225 of file gpu_program.cpp.

◆ set_transform() [3/6]

void gfx::set_transform ( const std::vector< math::transform > & matrices)

Definition at line 207 of file gpu_program.cpp.

◆ set_transform() [4/6]

void gfx::set_transform ( const std::vector< math::transform::mat4_t > & matrices)

Definition at line 197 of file gpu_program.cpp.

◆ set_transform() [5/6]

uint32_t gfx::set_transform ( const void * _mtx,
uint16_t _num )

Definition at line 788 of file graphics.cpp.

◆ set_transform() [6/6]

void gfx::set_transform ( uint32_t _cache,
uint16_t _num )

Definition at line 798 of file graphics.cpp.

◆ set_uniform() [1/6]

void gfx::set_uniform ( const gfx::program::uniform_ptr & uniform,
const math::mat4 & value,
std::uint16_t num = 1 )

Sets a uniform value.

Parameters
uniformThe uniform pointer.
_valueThe mat4 value to set.
_numThe number of elements (default is 1).

Definition at line 297 of file gpu_program.cpp.

◆ set_uniform() [2/6]

void gfx::set_uniform ( const gfx::program::uniform_ptr & uniform,
const math::vec2 & value,
std::uint16_t num = 1 )

Sets a uniform value.

Parameters
uniformThe uniform pointer.
_valueThe vec2 value to set.
_numThe number of elements (default is 1).

Definition at line 309 of file gpu_program.cpp.

◆ set_uniform() [3/6]

void gfx::set_uniform ( const gfx::program::uniform_ptr & uniform,
const math::vec3 & value,
std::uint16_t num = 1 )

Sets a uniform value.

Parameters
uniformThe uniform pointer.
_valueThe vec3 value to set.
_numThe number of elements (default is 1).

Definition at line 305 of file gpu_program.cpp.

◆ set_uniform() [4/6]

void gfx::set_uniform ( const gfx::program::uniform_ptr & uniform,
const math::vec4 & value,
std::uint16_t num = 1 )

Sets a uniform value.

Parameters
uniformThe uniform pointer.
_valueThe vec4 value to set.
_numThe number of elements (default is 1).

Definition at line 301 of file gpu_program.cpp.

◆ set_uniform() [5/6]

void gfx::set_uniform ( const gfx::program::uniform_ptr & uniform,
const void * value,
std::uint16_t num = 1 )

Sets a uniform value.

Parameters
uniformThe uniform pointer.
_valueThe value to set.
_numThe number of elements (default is 1).

Definition at line 288 of file gpu_program.cpp.

◆ set_uniform() [6/6]

void gfx::set_uniform ( uniform_handle _handle,
const void * _value,
uint16_t _num )

Definition at line 803 of file graphics.cpp.

◆ set_vertex_buffer() [1/6]

void gfx::set_vertex_buffer ( uint8_t _stream,
const transient_vertex_buffer * _tvb )

Definition at line 861 of file graphics.cpp.

◆ set_vertex_buffer() [2/6]

void gfx::set_vertex_buffer ( uint8_t _stream,
const transient_vertex_buffer * _tvb,
uint32_t _startVertex,
uint32_t _numVertices )

Definition at line 866 of file graphics.cpp.

◆ set_vertex_buffer() [3/6]

void gfx::set_vertex_buffer ( uint8_t _stream,
dynamic_vertex_buffer_handle _handle )

Definition at line 848 of file graphics.cpp.

◆ set_vertex_buffer() [4/6]

void gfx::set_vertex_buffer ( uint8_t _stream,
dynamic_vertex_buffer_handle _handle,
uint32_t _startVertex,
uint32_t _numVertices )

Definition at line 853 of file graphics.cpp.

◆ set_vertex_buffer() [5/6]

void gfx::set_vertex_buffer ( uint8_t _stream,
vertex_buffer_handle _handle )

Definition at line 838 of file graphics.cpp.

◆ set_vertex_buffer() [6/6]

void gfx::set_vertex_buffer ( uint8_t _stream,
vertex_buffer_handle _handle,
uint32_t _startVertex,
uint32_t _numVertices )

Definition at line 843 of file graphics.cpp.

◆ set_view_clear() [1/2]

void gfx::set_view_clear ( view_id _id,
uint16_t _flags,
float _depth,
uint8_t _stencil,
uint8_t _0,
uint8_t _1,
uint8_t _2,
uint8_t _3,
uint8_t _4,
uint8_t _5,
uint8_t _6,
uint8_t _7 )

Definition at line 717 of file graphics.cpp.

◆ set_view_clear() [2/2]

void gfx::set_view_clear ( view_id _id,
uint16_t _flags,
uint32_t _rgba,
float _depth,
uint8_t _stencil )

Definition at line 712 of file graphics.cpp.

◆ set_view_frame_buffer()

void gfx::set_view_frame_buffer ( view_id _id,
frame_buffer_handle _handle )

Definition at line 738 of file graphics.cpp.

◆ set_view_mode()

void gfx::set_view_mode ( view_id _id,
view_mode _mode )

Definition at line 733 of file graphics.cpp.

◆ set_view_name()

void gfx::set_view_name ( view_id _id,
const char * _name )

Definition at line 692 of file graphics.cpp.

◆ set_view_order()

void gfx::set_view_order ( view_id _id,
uint16_t _num,
const view_id * _order )

Definition at line 748 of file graphics.cpp.

◆ set_view_rect() [1/2]

void gfx::set_view_rect ( view_id _id,
uint16_t _x,
uint16_t _y,
backbuffer_ratio _ratio )

Definition at line 702 of file graphics.cpp.

◆ set_view_rect() [2/2]

void gfx::set_view_rect ( view_id _id,
uint16_t _x,
uint16_t _y,
uint16_t _width,
uint16_t _height )

Definition at line 697 of file graphics.cpp.

◆ set_view_scissor()

void gfx::set_view_scissor ( view_id _id,
uint16_t _x,
uint16_t _y,
uint16_t _width,
uint16_t _height )

Definition at line 707 of file graphics.cpp.

◆ set_view_transform()

void gfx::set_view_transform ( view_id _id,
const void * _view,
const void * _proj )

Definition at line 743 of file graphics.cpp.

◆ set_warning_logger() [1/2]

void gfx::set_warning_logger ( const std::function< void(const std::string &, const char *, uint16_t)> & logger)

Definition at line 39 of file graphics.cpp.

◆ set_warning_logger() [2/2]

void gfx::set_warning_logger ( const std::function< void(const std::string &, const char *_filePath, uint16_t _line)> & logger)

◆ set_world_transform() [1/5]

void gfx::set_world_transform ( const math::transform & matrix)

Sets the transformation.

Parameters
matrixThe transformation.

Definition at line 192 of file gpu_program.cpp.

◆ set_world_transform() [2/5]

void gfx::set_world_transform ( const math::transform::mat4_t & matrix)

Sets the transformation matrix.

Parameters
matrixThe transformation matrix.

Definition at line 186 of file gpu_program.cpp.

◆ set_world_transform() [3/5]

void gfx::set_world_transform ( const std::vector< math::transform > & matrices)

Sets the transformations.

Parameters
matricesThe vector of transformations.

Definition at line 168 of file gpu_program.cpp.

◆ set_world_transform() [4/5]

void gfx::set_world_transform ( const std::vector< math::transform::mat4_t > & matrices)

Sets the transformation matrices.

Parameters
matricesThe vector of transformation matrices.

Definition at line 158 of file gpu_program.cpp.

◆ set_world_transform() [5/5]

void gfx::set_world_transform ( const void * _mtx,
uint16_t _num )

Definition at line 1343 of file graphics.cpp.

◆ shutdown()

void gfx::shutdown ( )

Definition at line 167 of file graphics.cpp.

◆ submit() [1/3]

void gfx::submit ( view_id _id,
program_handle _handle,
indirect_buffer_handle _indirectHandle,
uint16_t _start,
uint16_t _num,
int32_t _depth,
bool _preserveState )

Definition at line 913 of file graphics.cpp.

◆ submit() [2/3]

void gfx::submit ( view_id _id,
program_handle _handle,
int32_t _depth,
bool _preserveState )

Definition at line 899 of file graphics.cpp.

◆ submit() [3/3]

void gfx::submit ( view_id _id,
program_handle _program,
occlusion_query_handle _occlusionQuery,
int32_t _depth,
bool _preserveState )

Definition at line 904 of file graphics.cpp.

◆ to_string()

auto gfx::to_string ( texture_format fmt) -> std::string

Definition at line 378 of file format.cpp.

◆ topology_convert()

uint32_t gfx::topology_convert ( topology_conversion _conversion,
void * _dst,
uint32_t _dstSize,
const void * _indices,
uint32_t _numIndices,
bool _index32 )

Definition at line 221 of file graphics.cpp.

◆ topology_sort_tri_list() [1/2]

void gfx::topology_sort_tri_list ( topology_sort _sort,
void * _dst,
uint32_t _dstSize,
const float _dir[3],
const float _pos[3],
const void * _vertices,
uint32_t _stride,
const void * _indices,
uint32_t _numIndices,
bool _index32 )

◆ topology_sort_tri_list() [2/2]

void gfx::topology_sort_tri_list ( topology_sort _sort,
void * _dst,
uint32_t _dstSize,
const float _dir[],
const float _pos[],
const void * _vertices,
uint32_t _stride,
const void * _indices,
uint32_t _numIndices,
bool _index32 )

Definition at line 231 of file graphics.cpp.

◆ touch()

void gfx::touch ( view_id _id)

Definition at line 894 of file graphics.cpp.

◆ update() [1/2]

void gfx::update ( dynamic_index_buffer_handle _handle,
uint32_t _startIndex,
const memory_view * _mem )

Definition at line 366 of file graphics.cpp.

◆ update() [2/2]

void gfx::update ( dynamic_vertex_buffer_handle _handle,
uint32_t _startVertex,
const memory_view * _mem )

Definition at line 388 of file graphics.cpp.

◆ update_texture_2d()

void gfx::update_texture_2d ( texture_handle _handle,
uint16_t _layer,
uint8_t _mip,
uint16_t _x,
uint16_t _y,
uint16_t _width,
uint16_t _height,
const memory_view * _mem,
uint16_t _pitch )

Definition at line 550 of file graphics.cpp.

◆ update_texture_3d()

void gfx::update_texture_3d ( texture_handle _handle,
uint8_t _mip,
uint16_t _x,
uint16_t _y,
uint16_t _z,
uint16_t _width,
uint16_t _height,
uint16_t _depth,
const memory_view * _mem )

Definition at line 563 of file graphics.cpp.

◆ update_texture_cube()

void gfx::update_texture_cube ( texture_handle _handle,
uint16_t _layer,
uint8_t _side,
uint8_t _mip,
uint16_t _x,
uint16_t _y,
uint16_t _width,
uint16_t _height,
const memory_view * _mem,
uint16_t _pitch )

Definition at line 576 of file graphics.cpp.

◆ vertex_convert()

void gfx::vertex_convert ( const vertex_layout & _destDecl,
void * _destData,
const vertex_layout & _srcDecl,
const void * _srcData,
uint32_t _num )

Definition at line 207 of file graphics.cpp.

◆ vertex_pack()

void gfx::vertex_pack ( const float _input[4],
bool _inputNormalized,
attribute _attr,
const vertex_layout & _decl,
void * _data,
uint32_t _index )

Definition at line 192 of file graphics.cpp.

◆ vertex_unpack()

void gfx::vertex_unpack ( float _output[4],
attribute _attr,
const vertex_layout & _decl,
const void * _data,
uint32_t _index )

Definition at line 202 of file graphics.cpp.

◆ weld_vertices()

uint16_t gfx::weld_vertices ( uint16_t * _output,
const vertex_layout & _decl,
const void * _data,
uint16_t _num,
float _epsilon )

Definition at line 216 of file graphics.cpp.