C# Class NewTOAPIA.GL.GLTextureUnit

The GPU may have multiple texture units. By definition there is at least one, and in many cases there will be multiple. When a texture is 'bound', it is bound to a specific texture unit. TextureUnit0, is the default texture unit. In order to access a texture from within GLSL code, the texture is referenced based on the TextureUnit that it is bound to. So, for example, a texture that is bound to TextureUnit3 would be accessed in a sampler2D using the ordinal value '3'. The property 'OrdinalForShaders' gives this value.
Inheritance: IBindable
Afficher le fichier Open project: Wiladams/NewTOAPIA Class Usage Examples

Méthodes publiques

Méthode Description
AssignTexture ( GLTexture2D aTexture ) : void
Bind ( ) : void
GetMaxTextureUnits ( GraphicsInterface gi ) : int
GetTextureUnit ( GraphicsInterface gi, TextureUnitID unitID ) : GLTextureUnit
Unbind ( ) : void

Private Methods

Méthode Description
GLTextureUnit ( GraphicsInterface gi, TextureUnitID unitID ) : System

Method Details

AssignTexture() public méthode

public AssignTexture ( GLTexture2D aTexture ) : void
aTexture GLTexture2D
Résultat void

Bind() public méthode

public Bind ( ) : void
Résultat void

GetMaxTextureUnits() public static méthode

public static GetMaxTextureUnits ( GraphicsInterface gi ) : int
gi GraphicsInterface
Résultat int

GetTextureUnit() public static méthode

public static GetTextureUnit ( GraphicsInterface gi, TextureUnitID unitID ) : GLTextureUnit
gi GraphicsInterface
unitID TextureUnitID
Résultat GLTextureUnit

Unbind() public méthode

public Unbind ( ) : void
Résultat void