Ejemplo n.º 1
0
        internal int GenerateMipmap(GenerateMipmapTarget target)
        {
            var result = _glGenerateMipmap(target);

            CheckForError();
            return(result);
        }
Ejemplo n.º 2
0
        public static void GenerateMipmap(GenerateMipmapTarget target)
        {
            GL.GenerateMipmap(target);

            if (enableErrorCheck)
            {
                LogErrors();
            }
        }
Ejemplo n.º 3
0
 public static void GenerateMipmap(GenerateMipmapTarget target)
 {
     if (GraphicsExtensions.UseArbFramebuffer)
     {
         GL.GenerateMipmap(target);
     }
     else
     {
         GL.Ext.GenerateMipmap(target);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 5
0
 public void GenerateMipmap(GenerateMipmapTarget target)
 {
     GL.GenerateMipmap(target);
 }
Ejemplo n.º 6
0
 public void GenerateMipmap(GenerateMipmapTarget target)
 {
     forwarding.GenerateMipmap(target);
     CheckGLError();
     GLCALLS++;
 }
Ejemplo n.º 7
0
 public static void GenerateMipmap(GenerateMipmapTarget target)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.GenerateMipmap(target);
   else
     GL.Ext.GenerateMipmap(target);
 }
Ejemplo n.º 8
0
 internal extern static void glGenerateMipmap(GenerateMipmapTarget target);
Ejemplo n.º 9
0
 public unsafe static void GenerateMipmap(GenerateMipmapTarget target)
 => glGenerateMipmap(target);
Ejemplo n.º 10
0
 internal extern static void GLGenerateMipmapExt(GenerateMipmapTarget target);
Ejemplo n.º 11
0
		public static void GenerateMipmap(GenerateMipmapTarget target)
		{
			glGenerateMipmap deleg = BaseGraphicsContext.Current.Loader.Get<glGenerateMipmap>();
			if (deleg != null)
				deleg(target);
		}