[Top][All Lists]
[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
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/10/01
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/10/01
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/10/01
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Tuomas J. Lukka, 2002/10/06
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Matti Katila, 2002/10/10
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Matti Katila, 2002/10/14
- Re: [Gzz-commits] gzz/gfx/librenderables renderables.py,
Tuomas Lukka <=
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Matti Katila, 2002/10/15
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/10/18
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/10/18
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Matti Katila, 2002/10/29
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Matti Katila, 2002/10/30