Struct Asset
Defined in File graphic.h
Inheritance Relationships
Base Type
public CE::Assets::Content2D(Struct Content2D)
Struct Documentation
-
struct Asset : public CE::Assets::Content2D
Declaration:
finalA whole-image quad in local Y-up pixels about a normalized top-left pivot.
Direct construction retains handles without validating their compatibility.
Public Functions
Retain an explicitly assembled whole-image value without compatibility/null validation.
See also
- Parameters:
geometry – Uploaded quad geometry.
image – Uploaded image contents.
material – Optional explicit material; this direct constructor creates none. Use from_image()/load() for ordinary default-material creation and upload.
Public Static Functions
Declaration:
[[nodiscard]]Upload a six-vertex whole-image quad on the provider’s owner/current context.
See also
- Parameters:
image – Non-null, nonempty image compatible with the provider’s backend domain.
provider – Borrowed resource owner for geometry/default material creation.
pivot – Finite normalized top-left-origin origin; geometry uses local Y-up image pixels.
material – Optional override; absent requests the provider’s builtin textured material.
- Returns:
Retained geometry/image/material asset, with no cache publication. Invalid image/pivot or backend/default-material/upload failures propagate. CPU vertices are copied during upload and not borrowed by the result.
Declaration:
[[nodiscard]]Decode/upload an image and construct its whole-image quad on the provider owner.
See also
- Parameters:
file – Source path; relative paths use the caller’s working directory.
provider – Live compatible resource provider, borrowed for the operation.
pivot – Finite normalized top-left-origin pivot.
material – Optional override; absent selects the provider textured default.
- Returns:
Complete retained asset; failures return no asset and publish no cache entry. File decoding can block; preparation/upload obey provider affinity and exception contracts.