Class Texture
This class represent a Texture graphics resource.
Inheritance
Texture
Inherited Members
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public abstract class Texture : GraphicsResource, ILoadable, IDisposable, 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 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 could be attached to a framebuffer.
Declaration
public virtual bool CouldBeAttachedToFramebuffer { get; }
Property Value
Type | Description |
---|---|
bool |
Dependencies
Gets the dependency list.
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 debuggers 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 texture associate sampler state.
Declaration
public SamplerState Sampler { get; set; }
Property Value
Type | Description |
---|---|
SamplerState |
Methods
Dispose()
Dispose this instance.
Declaration
public override void Dispose()
Overrides
Invalidate(ILoadable)
Invalidates this instance and raise 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()
Release unused memory.
Declaration
public void ReleaseUnusedMemory()
Events
Invalidated
Occurs when this instance has been invalidated and all references must be reloaded.
Declaration
public event EventHandler<ILoadable> Invalidated
Event Type
Type | Description |
---|---|
EventHandler<ILoadable> |