Diamond
Diamond.Textures.Texture Class Reference

Manages a OpenGL Texture object More...

Inheritance diagram for Diamond.Textures.Texture:
Diamond.GLObject

Public Member Functions

void Bind (int unit)
 Bind this texture to a particular unit More...
 
override string ToString ()
 
override void Dispose ()
 Delegate Dispose to underlying wrapper class More...
 

Static Public Member Functions

static Texture FromBitmap (Bitmap bmp, string name=null)
 Create a texture object and upload bitmap data to it More...
 
static Texture FromFile (string path, string name=null)
 Create a texture and upload the contents of an image file to it More...
 

Public Attributes

TextureTarget Target => Wrapper.Target
 This textures target; how it is used More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Diamond.GLObject
static readonly Logger Logger = LogManager.GetLogger(nameof(GLObject))
 Logger for all GLObjects More...
 
- Properties inherited from Diamond.GLObject
string Name [get, protected set]
 Name of this GLObject used for identification More...
 

Detailed Description

Manages a OpenGL Texture object

Member Function Documentation

◆ Bind()

void Diamond.Textures.Texture.Bind ( int  unit)

Bind this texture to a particular unit

◆ Dispose()

override void Diamond.Textures.Texture.Dispose ( )
virtual

Delegate Dispose to underlying wrapper class

Implements Diamond.GLObject.

◆ FromBitmap()

static Texture Diamond.Textures.Texture.FromBitmap ( Bitmap  bmp,
string  name = null 
)
static

Create a texture object and upload bitmap data to it

Parameters
bmpThe image to upload
nameThe name of this GLObject
Returns
The initialized Texture, or null if initialsation failed

◆ FromFile()

static Texture Diamond.Textures.Texture.FromFile ( string  path,
string  name = null 
)
static

Create a texture and upload the contents of an image file to it

Parameters
pathThe path to the file
nameThe name of this GLObject
Returns
The initialized Texture, or null if instantiation failed

Member Data Documentation

◆ Target

TextureTarget Diamond.Textures.Texture.Target => Wrapper.Target

This textures target; how it is used


The documentation for this class was generated from the following file: