GenerateMipmap() public static method

public static GenerateMipmap ( MipmapTarget target ) : void
target MipmapTarget
return void
Ejemplo n.º 1
0
 /// <summary>
 /// resources(bitmap etc.) can be disposed  after this initialization.
 /// </summary>
 public void Initialize()
 {
     if (!this.initialized)
     {
         //GL.ActiveTexture(GL.GL_TEXTURE0);
         OpenGL.GetDelegateFor <OpenGL.glActiveTexture>()(this.ActiveTexture);
         OpenGL.GenTextures(1, id);
         OpenGL.BindTexture(this.Target, id[0]);
         this.SamplerBuilder.Bind(this.ActiveTexture - OpenGL.GL_TEXTURE0, this.Target);
         this.ImageBuilder.Build(this.Target);
         OpenGL.GenerateMipmap((MipmapTarget)((uint)this.Target));// TODO: does this work?
         //this.SamplerBuilder.Unbind(OpenGL.GL_TEXTURE0 - OpenGL.GL_TEXTURE0, this.Target);
         OpenGL.BindTexture(this.Target, 0);
         this.initialized = true;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// resources(bitmap etc.) can be disposed  after this initialization.
 /// </summary>
 public void Initialize()
 {
     if (!this.initialized)
     {
         if (activeTexture == null)
         {
             activeTexture = OpenGL.GetDelegateFor <OpenGL.glActiveTexture>();
         }
         activeTexture(this.ActiveTextureIndex + OpenGL.GL_TEXTURE0);
         OpenGL.GenTextures(1, id);
         TextureTarget target = this.Target;
         OpenGL.BindTexture(target, id[0]);
         this.Sampler.Bind(this.ActiveTextureIndex, target);
         this.ImageFiller.Fill();
         OpenGL.GenerateMipmap((MipmapTarget)((uint)target));// TODO: does this work?
         //this.SamplerBuilder.Unbind(OpenGL.GL_TEXTURE0 - OpenGL.GL_TEXTURE0, this.Target);
         OpenGL.BindTexture(this.Target, 0);
         this.initialized = true;
     }
 }