public TextureUnitsGL3x() { // // Device.NumberOfTextureUnits is not initialized yet. // int numberOfTextureUnits; GL.GetInteger(GetPName.MaxCombinedTextureImageUnits, out numberOfTextureUnits); _textureUnits = new TextureUnit[numberOfTextureUnits]; for (int i = 0; i < numberOfTextureUnits; ++i) { TextureUnitGL3x textureUnit = new TextureUnitGL3x(i, this); _textureUnits[i] = textureUnit; } _dirtyTextureUnits = new List<ICleanable>(); _lastTextureUnit = (TextureUnitGL3x)_textureUnits[numberOfTextureUnits - 1]; }
public TextureUnitsGL3x() { // // Device.NumberOfTextureUnits is not initialized yet. // int numberOfTextureUnits; GL.GetInteger(GetPName.MaxCombinedTextureImageUnits, out numberOfTextureUnits); _textureUnits = new TextureUnit[numberOfTextureUnits]; for (int i = 0; i < numberOfTextureUnits; ++i) { TextureUnitGL3x textureUnit = new TextureUnitGL3x(i, this); _textureUnits[i] = textureUnit; } _dirtyTextureUnits = new List <ICleanable>(); _lastTextureUnit = (TextureUnitGL3x)_textureUnits[numberOfTextureUnits - 1]; }