SolidKit3D.Drawing.Texture class

From Solid Graphics Wiki

Jump to: navigation, search
SolidKit3D.Drawing.Texture class
Namespace: SolidKit3D.Drawing
Base type: (None)
Assembly: SolidKit.dll
Platform: .NET

The Texture class represents a 2D raster image which is intended to be used as OpenGL texture.




Fields

Field name Type Description
Width int Width (in pixels) of the source image used to load the texture. This attribute is undefined/uninitialized if the texture is not loaded yet. Use the IsLoaded property to determine whether the texture is loaded.
Height int Height (in pixels) of the source image used to load the texture. This attribute is undefined/uninitialized if the texture is not loaded yet.
PixelSize int Bytes per pixel used by the texture. If 3 then the texture is using 24bit, 8 bits per component RGB pixel format. If 4 then the texture is using 32-bit, 8 bits per component RGBA pixel format. This attribute is undefined/uninitialized if the texture is not "loaded" yet.

Methods

Method name Description
Load Loads image from a file, memory, or application-attached-resource into OpenGL texture object.
IsLoaded Returns true if the OpenGL texture object was successfully loaded. Otherwise returns false.
Clear If the texture is loaded then the Clear method releases underlying OpenGL texture object.
MakeCurrent The method internally calls OpenGL's glBindTexture function to make the texture current. Result of this method is undefined if the OpenGL texture object was not previously loaded sucessfully (the IsLoaded returns false).

Operators

The class has no public operators defined.

See Also

   


SolidKit Library Documentation

Personal tools