Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::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.

Date
2025-10-25
Author
Konstantin Passig

Definition at line 81 of file ExrLoader.h.

Constructor & Destructor Documentation

◆ ExrLoader()

EngineCore::ExrLoader::ExrLoader ( )
default

◆ ~ExrLoader()

EngineCore::ExrLoader::~ExrLoader ( )
default

Member Function Documentation

◆ load()

tinygltf::Image EngineCore::ExrLoader::load ( const std::filesystem::path & filename)

Load a complete EXR image file.

Load complete EXR image with header and pixel data.

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

Loads both header and pixel data, converting from planar to interleaved format. Handles BGR to RGB channel conversion for OpenGL compatibility.

Definition at line 40 of file ExrLoader.cpp.

References TRACY_ZONE_SCOPED_NAMED.

Referenced by EngineCore::GltfLoader::GltfMaterialData::GltfMaterialData(), Ecs::TextureAssetPipeline::loadImageData(), and Ecs::ModelAssetPipeline::processTextures().

Here is the caller graph for this function:

◆ loadHeader()

ExrHeader EngineCore::ExrLoader::loadHeader ( std::filesystem::path path)
nodiscard

Load only the header information from an EXR file.

Load only header information from 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

Parses the EXR file header without loading pixel data. Returns an ExrHeader wrapper that owns its data, allowing the native EXRHeader to be freed.

Definition at line 176 of file ExrLoader.cpp.

References TRACY_ZONE_SCOPED_NAMED.

Referenced by Ecs::TextureAssetPipeline::requestExrHeaders().

Here is the caller graph for this function:

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