[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view Display.java, 1.52, 1.53
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-11-12 19:20:20
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13200/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: tried to fix selecting problem with instance Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Display.java 12 Nov 2007 14:17:05 -0000 1.52 --- Display.java 12 Nov 2007 19:20:18 -0000 1.53 *************** *** 94,99 **** private static Map<Geometric, Integer> displayLists = new HashMap<Geometric, Integer>(); - private static Map<Geometric, Integer> displayListsSelecting = - new HashMap<Geometric, Integer>(); private static final boolean USEDL = true; --- 94,97 ---- *************** *** 831,870 **** private static void drawInstance(Space space, boolean inside) { translateToCoordinatesystem(space); ! if (USEDL) { Space work = space.getProto(); ! if (selecting) { ! Integer index = displayListsSelecting.get(work); ! if (index != null) { ! gl.glCallList(index); ! gl.glPopMatrix(); ! return; ! } else { ! index = gl.glGenLists(1); ! displayListsSelecting.put(work, index); ! gl.glNewList(index, GL.GL_COMPILE_AND_EXECUTE); ! } } else { ! Integer index = displayLists.get(work); ! if (index != null) { ! gl.glCallList(index); ! gl.glPopMatrix(); ! return; ! } else { ! index = gl.glGenLists(1); ! displayLists.put(work, index); ! gl.glNewList(index, GL.GL_COMPILE_AND_EXECUTE); ! } } } ! ! if (selecting() && active == space.getOwner()) { push(space); } drawSpace(space.getProto(), inside || active == space.getProto()); ! if (selecting() && active == space.getOwner()) { pop(); } ! if (USEDL) { //will only reach here if a displaylist are being generated gl.glEndList(); --- 829,858 ---- private static void drawInstance(Space space, boolean inside) { translateToCoordinatesystem(space); ! if (USEDL && inside) { Space work = space.getProto(); ! Integer index = displayLists.get(work); ! if (index != null) { ! gl.glCallList(index); ! gl.glPopMatrix(); ! return; } else { ! index = gl.glGenLists(1); ! displayLists.put(work, index); ! gl.glNewList(index, GL.GL_COMPILE_AND_EXECUTE); } } ! boolean selActivated = false; ! if (selecting() && active == space.getProto()) { push(space); + selActivated = true; + selecting = false; } drawSpace(space.getProto(), inside || active == space.getProto()); ! if (selActivated) { ! selecting = true; pop(); } ! if (USEDL && inside) { //will only reach here if a displaylist are being generated gl.glEndList(); |