gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz-commits] gzz/gfx demo/calendarvobtest.py liblines/Lines.cxx


From: Tuomas Lukka
Subject: Re: [Gzz-commits] gzz/gfx demo/calendarvobtest.py liblines/Lines.cxx
Date: Sat, 2 Nov 2002 18:07:52 +0200
User-agent: Mutt/1.4i

> -                      0, GL_ALPHA, GL_FLOAT, line_image[level]);
> +         glTexImage1D(GL_TEXTURE_1D, 0,
> +                      GL_RGBA, //internal format - correct?
> +                      size, 0, GL_ALPHA, // 
> +                      GL_FLOAT, line_image[level]);

No, internal format should be alpha as well.

> -         glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
>       }
>       has_not_inited = false;
>      }
> @@ -79,18 +75,24 @@
>          if (dbg) cout <<" x: "<< a.x << ", "<< b.x 
>                     <<" y: "<< a.y << ", "<< b.y <<"\n";
>  
> +     glPushAttrib(GL_ENABLE_BIT);
> +       glDisable(GL_TEXTURE_2D);
> +       glEnable(GL_TEXTURE_1D);
> +       glEnable(GL_BLEND);
> +       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
> +
>       if (has_not_inited) init();
>  
> -     //glLineWidth(linewidth);
> -     glLineWidth(1);
>  
> -     glPushAttrib(GL_ENABLE_BIT);
> -     glEnable(GL_BLEND);
> -     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
> +     glBindTexture(GL_TEXTURE_1D, texName[0]);
> +       glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
> +         glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER,
> +                         GL_LINEAR);
> +         glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER,
> +                         GL_LINEAR_MIPMAP_LINEAR);

TexParameter *is* transported along the texture; it can be done when creating 
the texture.

OpenGL has unfortunately been designed little-by-little...

        Tuomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]