Class Texture
This class represents a Texture graphics resource.
Inheritance
Inherited Members
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public abstract class Texture : GraphicsResource, ILoadable, IDependencyObject
Constructors
Texture(GraphicsContext, ref TextureDescription)
Initializes a new instance of the Texture class.
Declaration
protected Texture(GraphicsContext context, ref TextureDescription description)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsContext | context | The graphics context. |
| TextureDescription | description | The texture's description. |
Fields
Description
Gets or sets the TextureDescription struct.
Declaration
public readonly TextureDescription Description
Field Value
| Type | Description |
|---|---|
| TextureDescription |
Properties
CouldBeAttachedToFramebuffer
Gets a value indicating whether this texture can be attached to a framebuffer.
Declaration
public virtual bool CouldBeAttachedToFramebuffer { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Dependencies
Gets the list of dependencies.
Declaration
public Lazy<List<IDependencyLink>> Dependencies { get; }
Property Value
| Type | Description |
|---|---|
| Lazy<List<IDependencyLink>> |
Id
Gets or sets the asset ID.
Declaration
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid | The texture ID. |
Name
Gets or sets a string identifying this instance. Can be used in graphics debugger tools.
Declaration
public abstract string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReaderVersion
Gets the reader version.
Declaration
public Version ReaderVersion { get; }
Property Value
| Type | Description |
|---|---|
| Version |
Sampler
Gets or sets the texture-associated sampler state.
Declaration
public SamplerState Sampler { get; set; }
Property Value
| Type | Description |
|---|---|
| SamplerState |
Methods
Destroy()
Destroy graphics native resources.
Declaration
protected override void Destroy()
Overrides
Invalidate(ILoadable)
Invalidates this instance and raises the Invalidated event with the new ILoadable instance.
Declaration
public void Invalidate(ILoadable newInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| ILoadable | newInstance | The new ILoadable instance. |
ReleaseUnusedMemory()
Releases unused memory.
Declaration
public void ReleaseUnusedMemory()
Events
Invalidated
Occurs when this instance is invalidated and all references must be reloaded.
Declaration
public event EventHandler<ILoadable> Invalidated
Event Type
| Type | Description |
|---|---|
| EventHandler<ILoadable> |