/[libvob]/libvob/org/nongnu/libvob/gl/SpecialPapers.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/gl/SpecialPapers.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tjl, Wed Jun 11 17:41:56 2003 UTC revision 1.5 by tjl, Wed Jun 25 18:02:20 2003 UTC
# Line 87  public class SpecialPapers { Line 87  public class SpecialPapers {
87          });          });
88          return p;          return p;
89      }      }
90    
91        static public GLRen.FixedPaperQuad selectionFixedPaperQuad() {
92            return selectionFixedPaperQuad(null);
93        }
94        static public GLRen.FixedPaperQuad selectionFixedPaperQuad(Color color) {
95            return GLRen.createFixedPaperQuad(selectionPaper(color), 0, 0, 1, 1, 0, 1, 1, 10, null, 1);
96        }
97    
98        static public Paper selectionPaper() {
99            return selectionPaper(null);
100        }
101        /** Create a paper that is able to show a "selection".
102         */
103        static public Paper selectionPaper(Color color) {
104            if(color == null) color = new Color(.6f, .5f, .7f);
105            Paper selectPaper = new Paper();
106            selectPaper.setNPasses(1);
107            Paper.Pass pas = selectPaper.getPass(0);
108            pas.setSetupcode(
109                "PushAttrib CURRENT_BIT ENABLE_BIT COLOR_BUFFER_BIT\n"+
110                "Disable TEXTURE_2D\n"+
111                "Disable DEPTH_TEST\n"+
112                "Disable STENCIL_TEST\n"+
113                "Color "+ColorUtil.colorGLString(color)+"\n"+
114                "Enable BLEND\n"+
115                "BlendFunc ONE  ONE_MINUS_SRC_COLOR\n"
116            );
117            pas.setTeardowncode(" PopAttrib\n");
118            return selectPaper;
119        }
120    
121  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26