Search Results for

    Show / Hide Table of Contents

    Class GLTexture

    The OpenGL implementation of a texture object.

    Inheritance
    object
    GraphicsResource
    Texture
    GLBaseTexture
    GLTexture
    Implements
    ILoadable
    IDependencyObject
    Inherited Members
    GLBaseTexture.TextureTarget
    GLBaseTexture.Format
    GLBaseTexture.Name
    GLBaseTexture.HasStencil()
    Texture.Id
    Texture.Description
    Texture.ReaderVersion
    Texture.Invalidated
    Texture.Dependencies
    Texture.Sampler
    Texture.CouldBeAttachedToFramebuffer
    Texture.Invalidate(ILoadable)
    Texture.ReleaseUnusedMemory()
    GraphicsResource.Context
    GraphicsResource.Disposed
    GraphicsResource.Dispose()
    GraphicsResource.Dispose(bool)
    Namespace: Evergine.OpenGL
    Assembly: Evergine.OpenGL.dll
    Syntax
    public class GLTexture : GLBaseTexture, ILoadable, IDependencyObject

    Constructors

    GLTexture(GLGraphicsContext, DataBox[], ref TextureDescription)

    Initializes a new instance of the GLTexture class.

    Declaration
    public GLTexture(GLGraphicsContext context, DataBox[] data, ref TextureDescription description)
    Parameters
    Type Name Description
    GLGraphicsContext context

    The graphics context.

    DataBox[] data

    The data pointer.

    TextureDescription description

    The texture description.

    Properties

    NativePointer

    Gets the native pointer.

    Declaration
    public override nint NativePointer { get; }
    Property Value
    Type Description
    nint
    Overrides
    GLBaseTexture.NativePointer

    Methods

    CopyTo(uint, uint, uint, uint, uint, Texture, uint, uint, uint, uint, uint, uint, uint, uint, uint)

    Copies a pixel region from source to destination texture.

    Declaration
    public void CopyTo(uint sourceX, uint sourceY, uint sourceZ, uint sourceMipLevel, uint sourceBasedArrayLayer, Texture destination, uint destinationX, uint destinationY, uint destinationZ, uint destinationMipLevel, uint destinationBasedArrayLayer, uint width, uint height, uint depth, uint layerCount)
    Parameters
    Type Name Description
    uint sourceX

    U coordinate of the source texture.

    uint sourceY

    V coordinate of the source texture.

    uint sourceZ

    W coordinate of the source texture.

    uint sourceMipLevel

    Source mip level.

    uint sourceBasedArrayLayer

    Source array index.

    Texture destination

    Destination texture.

    uint destinationX

    U coordinate of the destination texture.

    uint destinationY

    V coordinate of the destination texture.

    uint destinationZ

    W coordinate of the destination texture.

    uint destinationMipLevel

    Destination mip level.

    uint destinationBasedArrayLayer

    Destination array index.

    uint width

    Destination width.

    uint height

    Destination height.

    uint depth

    Destination depth.

    uint layerCount

    Destination layer count.

    Destroy()

    Destroy graphics native resources.

    Declaration
    protected override void Destroy()
    Overrides
    Texture.Destroy()

    FromNativeOpenGLTexture(GLGraphicsContext, uint, ref TextureDescription)

    Creates a GL wrapped texture from a native texture.

    Declaration
    public static GLTexture FromNativeOpenGLTexture(GLGraphicsContext context, uint textureID, ref TextureDescription description)
    Parameters
    Type Name Description
    GLGraphicsContext context

    The OpenGL graphics context.

    uint textureID

    The OpenGL texture ID.

    TextureDescription description

    The structure with the texture description parameters.

    Returns
    Type Description
    GLTexture

    The wrapped texture.

    SetData(nint, uint, uint)

    Fills the buffer from a pointer.

    Declaration
    public void SetData(nint source, uint sourceSizeInBytes, uint subResource = 0)
    Parameters
    Type Name Description
    nint source

    The data pointer.

    uint sourceSizeInBytes

    The size in bytes.

    uint subResource

    The subresource index.

    Implements

    ILoadable
    IDependencyObject

    Extension Methods

    TextureExtension.SaveToFile(Texture, GraphicsContext, string)
    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX