OGLplus  (0.59.0) a C++ wrapper for rendering APIs

Compiled-in resource blocks.

Classes

class  eagine::embedded_resource
 Class providing access to a const resource block embedded into the executable. More...
 

Functions

static auto eagine::embed (identifier res_id, string_view src_path) noexcept -> embedded_resource
 Triggers the embedding of data from a file on the specified path. More...
 
static auto as_chars (const embedded_resource &res) noexcept
 Converts the embedded resource block to a const span of characters.
 

Detailed Description

Function Documentation

◆ embed()

static auto eagine::embed ( identifier  res_id,
string_view  src_path 
) -> embedded_resource
inlinestaticnoexcept

Triggers the embedding of data from a file on the specified path.

See also
embedded_resource

This function only works properly if the build system invokes the embed generator, that generates appropriate C++ code that defines byte blocks with the content of the specified resource files, compiles them and links them into the built executable. The embed generator is installed as one of the tools and in cmake-based build systems the eagine_embed_packed_target_resources and eagine_embed_target_resources cmake functions can be used invoke it.

Examples
application/000_stencil_shadow/main.cpp, application/000_stencil_shadow/resources.cpp, application/003_checker/main.cpp, application/004_triangle/main.cpp, application/005_pick_triangle/main.cpp, application/006_writing/main.cpp, application/007_cube/main.cpp, application/008_yaml_shape/main.cpp, application/009_json_shape/main.cpp, application/010_newton/main.cpp, application/011_mandelbrot/main.cpp, application/012_atomic_counters/main.cpp, application/014_voronoi/resources.cpp, application/015_worley/resources.cpp, application/016_torus/resources.cpp, application/017_occlusion/main.cpp, application/018_uv_map/main.cpp, application/019_scaled_cubes/resources.cpp, application/020_bezier_patch/resources.cpp, application/021_cel_shading/resources.cpp, application/022_single_pass_edges/resources.cpp, application/023_sketch/resources.cpp, application/024_overdraw/resources.cpp, application/025_recursive_cube/resources.cpp, application/026_halo/main.cpp, application/026_halo/resources.cpp, application/028_compute_particles/resources.cpp, application/031_tessellation/resources.cpp, application/032_translucent_arrow/resources.cpp, application/040_metaballs/resources.cpp, eagine/ecs/elements/init.cpp, eagine/embed_baked.cpp, and eagine/embed_self.cpp.

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).