Class GLTexture
The OpenGL implementation of a Texture object.
Inherited Members
Namespace: Evergine.OpenGL
Assembly: Evergine.OpenGL.dll
Syntax
public class GLTexture : GLBaseTexture, ILoadable, IDisposable, 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 IntPtr NativePointer { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Overrides
Methods
CopyTo(uint, uint, uint, uint, uint, Texture, uint, uint, uint, uint, uint, uint, uint, uint, uint)
Copy 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 coord source texture. |
uint | sourceY | V coord source texture. |
uint | sourceZ | W coord source texture. |
uint | sourceMipLevel | Source mip level. |
uint | sourceBasedArrayLayer | Source array index. |
Texture | destination | Destination texture. |
uint | destinationX | U coord destination texture. |
uint | destinationY | V coord destination texture. |
uint | destinationZ | W coord destination texture. |
uint | destinationMipLevel | Destination mip level. |
uint | destinationBasedArrayLayer | Destination array index. |
uint | width | Destination width. |
uint | height | Destination heigh. |
uint | depth | Destination depth. |
uint | layerCount | Destination layer count. |
Dispose()
Dispose this instance.
Declaration
public override void Dispose()
Overrides
FromNativeOpenGLTexture(GLGraphicsContext, uint, ref TextureDescription)
Create 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(IntPtr, uint, uint)
Fill the buffer from a pointer.
Declaration
public void SetData(IntPtr source, uint sourceSizeInBytes, uint subResource = 0)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | source | The data pointer. |
uint | sourceSizeInBytes | The size in bytes. |
uint | subResource | The subresource index. |