Interface IAssetRegistry
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public interface IAssetRegistry : IDisposable
Methods
|
Edit this page
View Source
EstimateTextureBytes()
Estimates the total bytes consumed by all registered textures by
iterating texture pixel format and dimensions. O(N) over registered textures.
Intended for diagnostic snapshots — NOT for the per-frame render loop.
Declaration
long EstimateTextureBytes()
Returns
|
Edit this page
View Source
EstimateTextureBytesByScene()
Returns texture bytes grouped by scene tag (Story 12.3). Untagged
assets are aggregated under the empty-string key. O(N) over registered
textures — intended for diagnostic snapshots.
Declaration
IReadOnlyDictionary<string, long> EstimateTextureBytesByScene()
Returns
|
Edit this page
View Source
GetAssetCounts()
Returns the current count of registered assets in each category.
O(1) — reads dictionary counts only, no enumeration.
Declaration
AssetCounts GetAssetCounts()
Returns
|
Edit this page
View Source
GetAssetCountsByScene()
Returns asset counts grouped by scene tag (Story 12.3). The empty-string
key holds untagged assets. O(N) over registrations.
Declaration
IReadOnlyDictionary<string, AssetCounts> GetAssetCountsByScene()
Returns
|
Edit this page
View Source
GetAsset<T>(string)
Declaration
T GetAsset<T>(string id) where T : struct
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
Type Parameters
|
Edit this page
View Source
GetFont(string)
Declaration
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
|
Edit this page
View Source
GetModelAsset(string)
Declaration
AnimatedModelData? GetModelAsset(string id)
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
|
Edit this page
View Source
GetShader(string)
Declaration
Shader? GetShader(string id)
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
|
Edit this page
View Source
GetShaderCount()
Returns the count of registered shaders. Shader GPU memory is opaque to
the engine, so byte estimation is intentionally not provided. O(1).
Declaration
Returns
|
Edit this page
View Source
GetSoundAsset(string)
Declaration
IAudioSource? GetSoundAsset(string id)
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
| Type |
Description |
| IAudioSource |
|
|
Edit this page
View Source
RegisterAsset(string, string, AssetType)
Declaration
void RegisterAsset(string id, string path, AssetType type)
Parameters
|
Edit this page
View Source
RegisterAsset(string, string, AssetType, string?)
Registers an asset and tags it with a scene identifier so per-scene
memory breakdowns are possible (Story 12.3 Task 1 — diagnostics
snapshots report bytes attributed by source scene). When
sceneTag is null or empty the asset is treated as
untagged ("shared" in snapshot reports). Tags are free-form and chosen
by the caller — SceneLoader uses Scene.GetType().Name.
Declaration
void RegisterAsset(string id, string path, AssetType type, string? sceneTag)
Parameters
|
Edit this page
View Source
RegisterShader(string, string?, string?)
Declaration
void RegisterShader(string id, string? vertexPath, string? fragmentPath)
Parameters
|
Edit this page
View Source
RegisterShader(string, string?, string?, string?)
Declaration
void RegisterShader(string id, string? vertexPath, string? fragmentPath, string? sceneTag)
Parameters