| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- /*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause
- */
- #ifndef BIMG_ENCODE_H_HEADER_GUARD
- #define BIMG_ENCODE_H_HEADER_GUARD
- #include "bimg.h"
- namespace bimg
- {
- struct Quality
- {
- enum Enum
- {
- Default,
- Highest,
- Fastest,
- Count
- };
- };
- ///
- void imageEncodeFromRgba8(
- bx::AllocatorI* _allocator
- , void* _dst
- , const void* _src
- , uint32_t _width
- , uint32_t _height
- , uint32_t _depth
- , TextureFormat::Enum _format
- , Quality::Enum _quality
- , bx::Error* _err = NULL
- );
- ///
- void imageEncodeFromRgba32f(
- bx::AllocatorI* _allocator
- , void* _dst
- , const void* _src
- , uint32_t _width
- , uint32_t _height
- , uint32_t _depth
- , TextureFormat::Enum _format
- , Quality::Enum _quality
- , bx::Error* _err = NULL
- );
- ///
- void imageEncode(
- bx::AllocatorI* _allocator
- , void* _dst
- , const void* _src
- , TextureFormat::Enum _srcFormat
- , uint32_t _width
- , uint32_t _height
- , uint32_t _depth
- , TextureFormat::Enum _dstFormat
- , Quality::Enum _quality
- , bx::Error* _err
- );
- ///
- ImageContainer* imageEncode(
- bx::AllocatorI* _allocator
- , TextureFormat::Enum _dstFormat
- , Quality::Enum _quality
- , const ImageContainer& _input
- );
- ///
- void imageRgba32f11to01(
- void* _dst
- , uint32_t _width
- , uint32_t _height
- , uint32_t _depth
- , uint32_t _pitch
- , const void* _src
- );
- ///
- void imageMakeDist(
- bx::AllocatorI* _allocator
- , void* _dst
- , uint32_t _width
- , uint32_t _height
- , uint32_t _srcPitch
- , const void* _src
- );
- ///
- float imageQualityRgba8(
- const void* _reference
- , const void* _data
- , uint16_t _width
- , uint16_t _height
- );
- ///
- bool imageResizeRgba32fLinear(
- ImageContainer* _dst
- , const ImageContainer* _src
- );
- ///
- float imageAlphaTestCoverage(
- TextureFormat::Enum _format
- , uint32_t _width
- , uint32_t _height
- , uint32_t _srcPitch
- , const void* _src
- , float _alphaRef
- , float _scale = 1.0f
- );
- ///
- void imageScaleAlphaToCoverage(
- TextureFormat::Enum _format
- , uint32_t _width
- , uint32_t _height
- , uint32_t _srcPitch
- , void* _src
- , float _coverage
- , float _alphaRef
- );
- ///
- ImageContainer* imageCubemapFromLatLongRgba32F(
- bx::AllocatorI* _allocator
- , const ImageContainer& _input
- , bool _useBilinearInterpolation
- , bx::Error* _err
- );
- ///
- ImageContainer* imageCubemapFromStripRgba32F(
- bx::AllocatorI* _allocator
- , const ImageContainer& _input
- , bx::Error* _err
- );
- ///
- ImageContainer* imageGenerateMips(
- bx::AllocatorI* _allocator
- , const ImageContainer& _image
- );
- struct LightingModel
- {
- enum Enum
- {
- Phong,
- PhongBrdf,
- Blinn,
- BlinnBrdf,
- Ggx,
- Count
- };
- };
- ///
- ImageContainer* imageCubemapRadianceFilter(
- bx::AllocatorI* _allocator
- , const ImageContainer& _image
- , LightingModel::Enum _lightingModel
- , bx::Error* _err
- );
- } // namespace bimg
- #endif // BIMG_ENCODE_H_HEADER_GUARD
|