gzz-commits
[Top][All Lists]
Advanced

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

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


From: Matti Katila
Subject: [Gzz-commits] gzz/gfx/librenderables renderables.py
Date: Mon, 14 Oct 2002 06:01:44 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   02/10/14 06:01:44

Modified files:
        gfx/librenderables: renderables.py 

Log message:
        PaperQuad understands VertexProgram and explicit now.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.103&tr2=1.104&r1=text&r2=text

Patches:
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.103 
gzz/gfx/librenderables/renderables.py:1.104
*** gzz/gfx/librenderables/renderables.py:1.103 Thu Oct 10 10:41:05 2002
--- gzz/gfx/librenderables/renderables.py       Mon Oct 14 06:01:44 2002
***************
*** 310,319 ****
  {
      "Type" : "2",
      "Name": "PaperQuad",
!     "Data": "float x0, y0, x1, y1; Paper::Paper* paper; float scale;float 
dicefactor;",
      "Params" : """
            Paper paper, float x0, float y0, float x1, float y1,
!           float scale, float dicefactor
        """,
      "ParamCode" : """
            this->paper = paper;
--- 310,319 ----
  {
      "Type" : "2",
      "Name": "PaperQuad",
!     "Data": "float x0, y0, x1, y1; Paper::Paper* paper; float scale;float 
dicefactor; int flags;",
      "Params" : """
            Paper paper, float x0, float y0, float x1, float y1,
!           float scale, float dicefactor, int flags 
        """,
      "ParamCode" : """
            this->paper = paper;
***************
*** 323,328 ****
--- 323,329 ----
            this->y1 = y1;
            this->scale = scale;
            this->dicefactor = dicefactor;
+             this->flags = flags;
        """,
      "RenderCode" : """
            Coords &coords2inv = *coords2.getInverse();
***************
*** 409,416 ****
  
            for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); 
++it) {
  
!                 // XXX
!                 if (true) {
                      DBG(dbg_paperquad) << "Pass\\n";
                      GLERR
                      (*it).setUp_VP(&lightParam);
--- 410,416 ----
  
            for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); 
++it) {
  
!                 if (flags & VERTEX_PROGRAM) {
                      DBG(dbg_paperquad) << "Pass\\n";
                      GLERR
                      (*it).setUp_VP(&lightParam);
***************
*** 465,474 ****
  {
      "Type" : "3",
      "Name": "CulledPaperQuad",
!     "Data": "float x0, y0, x1, y1; Paper::Paper* paper; float scale;float 
dicefactor;",
      "Params" : """
            Paper paper, float x0, float y0, float x1, float y1,
!           float scale, float dicefactor
        """,
      "ParamCode" : """
            this->paper = paper;
--- 465,474 ----
  {
      "Type" : "3",
      "Name": "CulledPaperQuad",
!     "Data": "float x0, y0, x1, y1; Paper::Paper* paper; float scale;float 
dicefactor; int flags;",
      "Params" : """
            Paper paper, float x0, float y0, float x1, float y1,
!           float scale, float dicefactor, int flags
        """,
      "ParamCode" : """
            this->paper = paper;
***************
*** 478,483 ****
--- 478,484 ----
            this->y1 = y1;
            this->scale = scale;
            this->dicefactor = dicefactor;
+             this->flags = flags;
        """,
      "RenderCode" : """
            Coords &coords2inv = *coords2.getInverse();
***************
*** 593,600 ****
  
            for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); 
++it) {
  
!                 // XXX
!                 if (true) {
                    DBG(dbg_paperquad) << "Pass\\n";
                      (*it).setUp_VP(&lightParam);
  
--- 594,600 ----
  
            for(Paper::Paper::iterator it = paper->begin(); it != paper->end(); 
++it) {
  
!                 if (flags & VERTEX_PROGRAM) {
                    DBG(dbg_paperquad) << "Pass\\n";
                      (*it).setUp_VP(&lightParam);
  
***************
*** 1244,1249 ****
--- 1244,1252 ----
  
  headercode += """
  namespace Renderables {
+ 
+    const int VERTEX_PROGRAM = 0x0001;
+ 
  """
  
  for r in rs:
***************
*** 1337,1351 ****
  
  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;
+ 
+ 
      // ----  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);
!     }
!     public static CulledPaperQuad createCulledPaperQuad(Paper paper, 
!           float x0, float y0, float x1, float y1, float dicefactor, int 
flags) {
!       return createCulledPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor, 
flags);
      }
  
      public static gzz.vob.Vob createCallList(String s) {




reply via email to

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