gzz-commits
[Top][All Lists]
Advanced

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

Re: [Gzz-commits] gzz/gfx/librenderables renderables.py


From: Tuomas Lukka
Subject: Re: [Gzz-commits] gzz/gfx/librenderables renderables.py
Date: Mon, 14 Oct 2002 13:42:14 +0300
User-agent: Mutt/1.4i

>   public class GLRen extends GL {
>   
>       // ----  Shorthands.
>       public static PaperQuad createPaperQuad(Paper paper, 
>           float x0, float y0, float x1, float y1, float dicefactor) {
> !     return createPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor);
>       }
>   
>       public static CulledPaperQuad createCulledPaperQuad(Paper paper, 
>           float x0, float y0, float x1, float y1, float dicefactor) {
> !     return createCulledPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor);
>       }
>   
>       public static gzz.vob.Vob createCallList(String s) {
> --- 1340,1382 ----
>   
>   public class GLRen extends GL {
>   
> +     public static final int VERTEX_PROGRAM = 0x0001;
> + 
> + 

This constant should be prefixed by PAPERQUAD_USE_.

>       // ----  Shorthands.
>       public static PaperQuad createPaperQuad(Paper paper, 
>           float x0, float y0, float x1, float y1, float dicefactor) {
> ! 
> !             int flags = 0;
> !             if (GL.hasExtension("GL_NV_vertex_program1_1")) {
> !                flags |= VERTEX_PROGRAM;
> !             } else {
> !                flags &= ~VERTEX_PROGRAM;
> !             }
> !             
> !     return createPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor, flags);
> !     }
> !     public static PaperQuad createPaperQuad(Paper paper, 
> !         float x0, float y0, float x1, float y1, float dicefactor, int 
> flags) {
> !     return createPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor, flags);
>       }
>   
>       public static CulledPaperQuad createCulledPaperQuad(Paper paper, 
>           float x0, float y0, float x1, float y1, float dicefactor) {
> !             
> !             int flags = 0;
> ! 
> !             if (GL.hasExtension("GL_NV_vertex_program1_1")) {
> !                flags |= VERTEX_PROGRAM;
> !             } else {
> !                flags &= ~VERTEX_PROGRAM;
> !             }
> !             
> !     return createCulledPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor, 
> flags);

As mentioned on irc, this test should be done *once* in *one place* 
(GLRen.init(), 
which sets a static private boolean have_vp_1_1, which is then used for the 
flag.

Or even int default_paperquad_flags.

        Tuomas




reply via email to

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