Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Textures::ExrLoader Class Reference

Loader for EXR (OpenEXR) image files. More...

#include <ExrLoader.h>

Public Member Functions

 ExrLoader ()=default
 ~ExrLoader ()=default
tinygltf::Image load (const std::filesystem::path &filename)
 Load a complete EXR image file.
ExrHeader loadHeader (std::filesystem::path path)
 Load only the header information from an EXR file.

Detailed Description

Loader for EXR (OpenEXR) image files.

Provides functionality to load EXR image files, with support for loading headers separately (useful for ECS systems) and loading full image data. Converts planar EXR channel data to interleaved format compatible with glTF/OpenGL.

Definition at line 54 of file ExrLoader.h.

Constructor & Destructor Documentation

◆ ExrLoader()

Engine::Assets::Textures::ExrLoader::ExrLoader ( )
default

◆ ~ExrLoader()

Engine::Assets::Textures::ExrLoader::~ExrLoader ( )
default

Member Function Documentation

◆ load()

tinygltf::Image Engine::Assets::Textures::ExrLoader::load ( const std::filesystem::path & filename)

Load a complete EXR image file.

Loads both header and pixel data from an EXR file and converts it to a tinygltf::Image format. The image data is interleaved (RGBA) from the planar format used by EXR files. Channel order is converted from EXR's BGR to RGB for OpenGL compatibility.

Parameters
filenamePath to the EXR file to load
Returns
tinygltf::Image containing the loaded image data
Return values
Emptyimage if loading fails

◆ loadHeader()

ExrHeader Engine::Assets::Textures::ExrLoader::loadHeader ( std::filesystem::path path)
nodiscard

Load only the header information from an EXR file.

Parses and extracts header information without loading pixel data. Useful for inspecting file properties before loading, or for use with ECS systems that need header data as components.

Parameters
pathPath to the EXR file
Returns
ExrHeader containing the parsed header information
Return values
ExrHeaderwith valid=false if parsing fails

The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Texture/ExrLoader.h