Result-based adapter over the engine's established graphics resource factory. 更多...
#include <EvpackImageLoader.h>
Public 成员函数 | |
| GraphicsImageFactoryAdapter (graphics::IResourceFactory &factory) noexcept | |
| Bind a borrowed graphics factory that must outlive this adapter. | |
| Result< graphics::Texture * > | uploadRgba8 (std::uint32_t width, std::uint32_t height, const std::uint8_t *pixels, bool srgb) override |
| Upload one tightly packed, top-down RGBA8 image. | |
| Result< graphics::Texture * > | uploadRgba8MipChain (uint32_t width, uint32_t height, uint32_t levels, std::span< const uint8_t > pixels) override |
| Upload complete explicit linear RGBA8 mips without regeneration. | |
| Result< graphics::Texture * > | uploadRgba8Volume (uint32_t width, uint32_t height, uint32_t depth, std::span< const uint8_t > pixels) override |
| Upload one tightly packed linear RGBA8 volume. | |
| Result< void > | releaseImage (graphics::Texture *texture) override |
| Release a texture previously returned by this factory. | |
Public 成员函数 继承自 eve::graphics::IImageResourceFactory | |
| virtual | ~IImageResourceFactory ()=default |
| Releases IImageResourceFactory resources. | |
详细描述
Result-based adapter over the engine's established graphics resource factory.
在文件 EvpackImageLoader.h 第 26 行定义.
构造及析构函数说明
◆ GraphicsImageFactoryAdapter()
|
inlineexplicitnoexcept |
Bind a borrowed graphics factory that must outlive this adapter.
Factory.
在文件 EvpackImageLoader.h 第 29 行定义.
成员函数说明
◆ releaseImage()
|
overridevirtual |
Release a texture previously returned by this factory.
- 参数
-
texture Borrowed live factory-owned texture, not retained after the call. @thread Must run on the graphics thread. texture Borrowed factory-owned texture, observed only for this call.
Release image.
实现了 eve::graphics::IImageResourceFactory.
在文件 GraphicsImageFactoryAdapter.cpp 第 44 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::graphics::IResourceFactory::releaseTexture() , 以及 eve::Result< T >::success().
◆ uploadRgba8()
|
overridevirtual |
Upload one tightly packed, top-down RGBA8 image.
- 返回
- Structured failure or a borrowed backend-owned texture. @ownership The backend factory owns the returned texture; release it through this factory. @lifetime Valid until
releaseImage, backend shutdown, or graphics-device loss. @thread Must run on the graphics thread; pixels are borrowed only for this call. @ownership Returned texture remains owned by the bound graphics factory. @lifetime Valid until release, backend shutdown, or device loss.
Uploads rgba 8.
实现了 eve::graphics::IImageResourceFactory.
在文件 GraphicsImageFactoryAdapter.cpp 第 13 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), height, eve::InvalidArgument, eve::graphics::IResourceFactory::newTexture(), pixels, eve::Result< T >::success(), eve::Unsupported , 以及 width.
◆ uploadRgba8MipChain()
|
overridevirtual |
Upload complete explicit linear RGBA8 mips without regeneration.
- 参数
-
width Positive base width. height Positive base height. levels Full halving chain including 1x1. pixels Borrowed top-down RGBA8 levels in increasing LOD order; not retained.
- 返回
- Failure without publication or a factory-owned texture, released by releaseImage. @lifetime Returned texture lives until release, shutdown or device loss. @thread Graphics thread, synchronous, non-reentrant, no callbacks. Default is Unsupported.
Uploads rgba 8 mip chain.
重载 eve::graphics::IImageResourceFactory .
在文件 GraphicsImageFactoryAdapter.cpp 第 32 行定义.
引用了 height, eve::graphics::IResourceFactory::newTextureMipChain(), pixels , 以及 width.
◆ uploadRgba8Volume()
|
overridevirtual |
Upload one tightly packed linear RGBA8 volume.
- 参数
-
width Positive X extent. height Positive Y extent. depth Positive Z extent. pixels Borrowed X-fastest RGBA8 voxels; not retained.
- 返回
- Failure without publication or a factory-owned texture, released by releaseImage. @lifetime Returned texture lives until release, shutdown or device loss. @thread Graphics thread, synchronous, non-reentrant, no callbacks. Default is Unsupported.
Uploads rgba 8 volume.
重载 eve::graphics::IImageResourceFactory .
在文件 GraphicsImageFactoryAdapter.cpp 第 38 行定义.
引用了 depth, height, eve::graphics::IResourceFactory::newTexture3DRgba8(), pixels , 以及 width.
该类的文档由以下文件生成:
- src/modules/asset/graphics/EvpackImageLoader.h
- src/modules/asset/graphics/GraphicsImageFactoryAdapter.cpp
Public 成员函数 继承自