[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java,1.41,1.42
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-01-10 14:35:45
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24324/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Cleanup in Pencil. Pre-initialize of tesselator by drawing a surface during init. Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** View.java 10 Jan 2006 14:06:49 -0000 1.41 --- View.java 10 Jan 2006 14:35:37 -0000 1.42 *************** *** 417,420 **** --- 417,434 ---- gl.glEnable(GL.GL_COLOR_MATERIAL); gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE); + { + Vertex v1 = new Vertex(0, 0, 0); + Vertex v2 = new Vertex(0, 1, 0); + Vertex v3 = new Vertex(1, 1, 0); + Edge e1 = new Edge(v1, v2); + Edge e2 = new Edge(v2, v3); + Edge e3 = new Edge(v3, v1); + List edges = new LinkedList(); + edges.add(e1); + edges.add(e2); + edges.add(e3); + Surface s = new Surface(edges); + drawSurface(s); + } } *************** *** 1182,1186 **** //Contours contained in an even number of contours are filled glu.gluTessProperty(tess, GLU.GLU_TESS_WINDING_RULE, GLU.GLU_TESS_WINDING_ODD); ! //begining the polygon, we are not using userdata for now (hence the null) glu.gluTessBeginPolygon(tess, null); --- 1196,1200 ---- //Contours contained in an even number of contours are filled glu.gluTessProperty(tess, GLU.GLU_TESS_WINDING_RULE, GLU.GLU_TESS_WINDING_ODD); ! //begining the polygon, we are not using userdata for now (hence the null) glu.gluTessBeginPolygon(tess, null); *************** *** 1193,1198 **** --- 1207,1214 ---- } } + //drawing the outer contour drawContour(s, tess); + //drawing the inner conturs Set innerSurfaces = s.getHoles(); *************** *** 1204,1208 **** } } - glu.gluTessEndPolygon(tess); glu.gluDeleteTess(tess); --- 1220,1223 ---- |