Skip to content

Commit

Permalink
[examples] use le_exr in lut_grading example
Browse files Browse the repository at this point in the history
add a dependency on le_exr to lut_grading example, so that we may test
le_exr using CI

this also demonstrates how to add a decoder for a new file type to
le_resource_manager.
  • Loading branch information
tgfrerer committed Feb 2, 2024
1 parent 41db093 commit cecb6a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ depends_on_island_module(le_ui_event)
depends_on_island_module(le_renderer)
depends_on_island_module(le_pipeline_builder)
depends_on_island_module(le_camera)

depends_on_island_module(le_pixels)
depends_on_island_module(le_resource_manager)
depends_on_island_module(le_exr)

set (SOURCES "lut_grading_example_app.cpp")
set (SOURCES ${SOURCES} "lut_grading_example_app.h")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "le_pipeline_builder.h"
#include "le_resource_manager.h"
#include "le_ui_event.h"
#include "le_exr.h" // provides the exr image decoder interface

#include <iostream>
#include <memory>
Expand Down Expand Up @@ -51,6 +52,10 @@ static lut_grading_example_app_o* lut_grading_example_app_create() {

app->renderer.setup( le::RendererInfoBuilder( app->window ).build() );

// This is how you introduce a new image decoder to resource_manager -
// Now you could open '.exr' images using the resource_manager...
app->resource_manager.set_decoder_interface_for_filetype( "exr", le_exr_api_i->le_exr_image_decoder_i );

char const* hald_lut =
"./local_resources/images/night_from_day.png";
// "./local_resources/images/hald_8_identity.png"; // pass-through
Expand Down

0 comments on commit cecb6a1

Please sign in to comment.