Gorgon
Show / Hide Table of Contents

Interface IGorgonTexture2DInfo

Information used to create a 2D texture object.

Inherited Members
IGorgonNamedObject.Name
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public interface IGorgonTexture2DInfo : IGorgonNamedObject
Remarks

This provides an immutable view of the texture information so that it cannot be modified after the texture is created.

Properties

| Edit this page View Source

ArrayCount

Property to return the number of array levels for a texture.

Declaration
int ArrayCount { get; }
Property Value
Type Description
int
Remarks

When this value is greater than 0, the texture will be used as a texture array. If the texture is supposed to be a cube map, then this value should be a multiple of 6 (1 for each face in the cube).

This value is defaulted to 1.

| Edit this page View Source

Binding

Property to return the flags to determine how the texture will be bound with the pipeline when rendering.

Declaration
TextureBinding Binding { get; }
Property Value
Type Description
TextureBinding
Remarks

If the Usage property is set to Staging, then the texture must be created with a value of None as staging textures do not support bindings of any kind. If this value is set to anything other than None, an exception will be thrown.

This value is defaulted to ShaderResource.

| Edit this page View Source

Format

Property to return the format of the texture.

Declaration
BufferFormat Format { get; }
Property Value
Type Description
BufferFormat
| Edit this page View Source

Height

Property to return the height of the texture, in pixels.

Declaration
int Height { get; }
Property Value
Type Description
int
| Edit this page View Source

IsCubeMap

Property to return whether this 2D texture is a cube map.

Declaration
bool IsCubeMap { get; }
Property Value
Type Description
bool
Remarks

When this value is set to true, then the texture is defined as a cube map using the ArrayCount as the number of faces. Because of this, the ArrayCount value must be a multiple of 6. If it is not, then the array count will be adjusted to meet the requirement.

This value is defaulted to false.

| Edit this page View Source

MipLevels

Property to return the number of mip-map levels for the texture.

Declaration
int MipLevels { get; }
Property Value
Type Description
int
Remarks

If the texture is multisampled, this value must be set to 1.

This value is defaulted to 1.

| Edit this page View Source

MultisampleInfo

Property to return the multisample quality and count for this texture.

Declaration
GorgonMultisampleInfo MultisampleInfo { get; }
Property Value
Type Description
GorgonMultisampleInfo
Remarks

This value is defaulted to NoMultiSampling.

| Edit this page View Source

Shared

Property to return whether this texture can be shared with other graphics interfaces.

Declaration
TextureSharingOptions Shared { get; }
Property Value
Type Description
TextureSharingOptions
Remarks

Settings this flag to true allows the texture to be used with external graphics interfaces such as a Direct3D device. This is useful for providing interoperation between systems.

| Edit this page View Source

Usage

Property to return the intended usage flags for this texture.

Declaration
ResourceUsage Usage { get; }
Property Value
Type Description
ResourceUsage
Remarks

This value is defaulted to Default.

| Edit this page View Source

Width

Property to return the width of the texture, in pixels.

Declaration
int Width { get; }
Property Value
Type Description
int

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author