Beispiel #1
0
 /// <summary>
 /// Set up texture's content with 'glTexImage2D()'.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="internalFormat"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 /// <param name="format"></param>
 /// <param name="type"></param>
 /// <param name="dataProvider"></param>
 /// <param name="mipmapLevelCount"></param>
 /// <param name="border"></param>
 public TexImage2D(Target target, uint internalFormat, int width, int height, uint format, uint type, LeveledDataProvider dataProvider = null, int mipmapLevelCount = 1, bool border = false)
     : base((TextureTarget)target, internalFormat, mipmapLevelCount, border)
 {
     this.width  = width; this.height = height;
     this.format = format;
     this.type   = type;
     if (dataProvider == null)
     {
         this.dataProvider = new LeveledDataProvider();
     }
     else
     {
         this.dataProvider = dataProvider;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Set up texture's content with 'glTexImage1D()'.
 /// </summary>
 /// <param name="internalFormat"></param>
 /// <param name="width"></param>
 /// <param name="format"></param>
 /// <param name="type"></param>
 /// <param name="dataProvider"></param>
 /// <param name="mipmapLevelCount"></param>
 /// <param name="border"></param>
 public TexImage1D(uint internalFormat, int width, uint format, uint type, LeveledDataProvider dataProvider = null, int mipmapLevelCount = 1, int border = 0)
     : base(TextureTarget.Texture1D, internalFormat, mipmapLevelCount, border)
 {
     this.width  = width;
     this.format = format;
     this.type   = type;
     if (dataProvider == null)
     {
         this.dataProvider = new LeveledDataProvider();
     }
     else
     {
         this.dataProvider = dataProvider;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Set up texture's content with 'glTexImage1D()'.
 /// </summary>
 /// <param name="level"></param>
 /// <param name="internalformat"></param>
 /// <param name="width"></param>
 /// <param name="border"></param>
 /// <param name="format"></param>
 /// <param name="type"></param>
 /// <param name="dataProvider"></param>
 public TexImage1D(int level, uint internalformat, int width, int border, uint format, uint type, LeveledDataProvider dataProvider = null)
 {
     this.level  = level; this.internalFormat = internalformat;
     this.width  = width;
     this.border = border;
     this.format = format;
     this.type   = type;
     if (dataProvider == null)
     {
         this.dataProvider = new LeveledDataProvider();
     }
     else
     {
         this.dataProvider = dataProvider;
     }
 }
Beispiel #4
0
 /// <summary>
 /// Set up texture's content with 'glTexImage3D()'.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="level"></param>
 /// <param name="internalformat"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 /// <param name="depth"></param>
 /// <param name="border"></param>
 /// <param name="format"></param>
 /// <param name="type"></param>
 /// <param name="dataProvider"></param>
 public TexImage3D(Target target, int level, uint internalformat, int width, int height, int depth, int border, uint format, uint type, LeveledDataProvider dataProvider = null)
 {
     this.target = target;
     this.level  = level; this.internalFormat = internalformat;
     this.width  = width; this.height = height; this.depth = depth;
     this.border = border;
     this.format = format;
     this.type   = type;
     if (dataProvider == null)
     {
         this.dataProvider = new LeveledDataProvider();
     }
     else
     {
         this.dataProvider = dataProvider;
     }
 }