Example #1
0
        internal int GenerateMipmap(GenerateMipmapTarget target)
        {
            var result = _glGenerateMipmap(target);

            CheckForError();
            return(result);
        }
Example #2
0
        public static void GenerateMipmap(GenerateMipmapTarget target)
        {
            GL.GenerateMipmap(target);

            if (enableErrorCheck)
            {
                LogErrors();
            }
        }
Example #3
0
 public static void GenerateMipmap(GenerateMipmapTarget target)
 {
     if (GraphicsExtensions.UseArbFramebuffer)
     {
         GL.GenerateMipmap(target);
     }
     else
     {
         GL.Ext.GenerateMipmap(target);
     }
 }
Example #4
0
        private void SetTextureOptions(TextureTarget target, LoadOptions options)
        {
            if (options.mipmaps)
            {
                GenerateMipmapTarget mipTarget = GenerateMipmapTarget.Texture2D;
                if (target == TextureTarget.TextureCubeMap)
                {
                    mipTarget = GenerateMipmapTarget.TextureCubeMap;
                }
                GL.GenerateMipmap(mipTarget);
            }
            else
            {
                GL.TexParameter(target, TextureParameterName.TextureBaseLevel, 0);
                GL.TexParameter(target, TextureParameterName.TextureMaxLevel, 0);
            }

            if (options.repeat)
            {
                GL.TexParameter(target, TextureParameterName.TextureWrapS, (int)TextureWrapMode.MirroredRepeat);
                GL.TexParameter(target, TextureParameterName.TextureWrapT, (int)TextureWrapMode.MirroredRepeat);
                if (target == TextureTarget.TextureCubeMap)
                {
                    GL.TexParameter(target, TextureParameterName.TextureWrapR, (int)TextureWrapMode.MirroredRepeat);
                }
            }
            else
            {
                GL.TexParameter(target, TextureParameterName.TextureWrapS, (int)TextureWrapMode.ClampToEdge);
                GL.TexParameter(target, TextureParameterName.TextureWrapT, (int)TextureWrapMode.ClampToEdge);
                if (target == TextureTarget.TextureCubeMap)
                {
                    GL.TexParameter(target, TextureParameterName.TextureWrapR, (int)TextureWrapMode.ClampToEdge);
                }
            }

            if (options.interpolation)
            {
                GL.TexParameter(target, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
                GL.TexParameter(target, TextureParameterName.TextureMagFilter, (int)TextureMinFilter.Linear);
            }
            else
            {
                GL.TexParameter(target, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Nearest);
                GL.TexParameter(target, TextureParameterName.TextureMagFilter, (int)TextureMinFilter.Nearest);
            }
        }
 public void GenerateMipmap(GenerateMipmapTarget target)
 {
     GL.GenerateMipmap(target);
 }
 public void GenerateMipmap(GenerateMipmapTarget target)
 {
     forwarding.GenerateMipmap(target);
     CheckGLError();
     GLCALLS++;
 }
Example #7
0
 public static void GenerateMipmap(GenerateMipmapTarget target)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.GenerateMipmap(target);
   else
     GL.Ext.GenerateMipmap(target);
 }
Example #8
0
 internal extern static void glGenerateMipmap(GenerateMipmapTarget target);
Example #9
0
 public unsafe static void GenerateMipmap(GenerateMipmapTarget target)
 => glGenerateMipmap(target);
Example #10
0
 internal extern static void GLGenerateMipmapExt(GenerateMipmapTarget target);
Example #11
0
		public static void GenerateMipmap(GenerateMipmapTarget target)
		{
			glGenerateMipmap deleg = BaseGraphicsContext.Current.Loader.Get<glGenerateMipmap>();
			if (deleg != null)
				deleg(target);
		}