载入中...
搜索中...
未找到
eve::asset_graphics::GraphicsImageFactoryAdapter类 参考final

Result-based adapter over the engine's established graphics resource factory. 更多...

#include <EvpackImageLoader.h>

类 eve::asset_graphics::GraphicsImageFactoryAdapter 继承关系图:
eve::graphics::IImageResourceFactory

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()

eve::asset_graphics::GraphicsImageFactoryAdapter::GraphicsImageFactoryAdapter ( graphics::IResourceFactory &  factory)
inlineexplicitnoexcept

Bind a borrowed graphics factory that must outlive this adapter.

Factory.

在文件 EvpackImageLoader.h 第 29 行定义.

成员函数说明

◆ releaseImage()

Result< void > eve::asset_graphics::GraphicsImageFactoryAdapter::releaseImage ( graphics::Texture *  texture)
overridevirtual

Release a texture previously returned by this factory.

参数
textureBorrowed live factory-owned texture, not retained after the call. @thread Must run on the graphics thread.
textureBorrowed 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()

Result< graphics::Texture * > eve::asset_graphics::GraphicsImageFactoryAdapter::uploadRgba8 ( std::uint32_t  width,
std::uint32_t  height,
const std::uint8_t *  pixels,
bool  srgb 
)
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()

Result< graphics::Texture * > eve::asset_graphics::GraphicsImageFactoryAdapter::uploadRgba8MipChain ( uint32_t  width,
uint32_t  height,
uint32_t  levels,
std::span< const uint8_t >  pixels 
)
overridevirtual

Upload complete explicit linear RGBA8 mips without regeneration.

参数
widthPositive base width.
heightPositive base height.
levelsFull halving chain including 1x1.
pixelsBorrowed 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()

Result< graphics::Texture * > eve::asset_graphics::GraphicsImageFactoryAdapter::uploadRgba8Volume ( uint32_t  width,
uint32_t  height,
uint32_t  depth,
std::span< const uint8_t >  pixels 
)
overridevirtual

Upload one tightly packed linear RGBA8 volume.

参数
widthPositive X extent.
heightPositive Y extent.
depthPositive Z extent.
pixelsBorrowed 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.


该类的文档由以下文件生成: