/** * Builds the display list for a given display list index. * * @param gl Instance of GL2. * @param iGLDisplayListIndex Index of the display list. */ private void buildDisplayList(final GL2 gl, int iGLDisplayListIndex) { if (pdRealRootElement != null && pdCurrentRootElement != null) { gl.glNewList(iGLDisplayListIndex, GL2.GL_COMPILE); float fXCenter = viewFrustum.getWidth() / 2; float fYCenter = viewFrustum.getHeight() / 2; gl.glLoadIdentity(); upwardNavigationSlider.draw( gl, pickingManager, textureManager, uniqueID, iUpwardNavigationSliderID, iUpwardNavigationSliderButtonID, iUpwardNavigationSliderBodyID); float fCurrentSliderWidth = upwardNavigationSlider.getScaledWidth(gl); float fCurrentSliderHeight = upwardNavigationSlider.getScaledHeight(gl); controlBox.setRectangle( 0, 0, fCurrentSliderWidth * 2, fCurrentSliderHeight + fCurrentSliderWidth); LabelManager.get().setControlBox(controlBox); drawingController.draw(fXCenter, fYCenter, gl, new GLU()); gl.glEndList(); } else { renderSymbol(gl, EIconTextures.RADIAL_SYMBOL.getFileName(), 0.5f); } }
@Override public void display(GL2 gl) { if (isDisplayListDirty && !bIsAnimationActive) { buildDisplayList(gl, displayListIndex); isDisplayListDirty = false; } if (pdRealRootElement != null && pdCurrentRootElement != null) { if (upwardNavigationSlider.handleDragging(gl, glMouseListener, pixelGLConverter)) { updateHierarchyAccordingToNavigationSlider(); } // clipToFrustum(gl); // if (bIsAnimationActive) { float fXCenter = viewFrustum.getWidth() / 2; float fYCenter = viewFrustum.getHeight() / 2; gl.glLoadIdentity(); upwardNavigationSlider.draw( gl, pickingManager, textureManager, uniqueID, iUpwardNavigationSliderID, iUpwardNavigationSliderButtonID, iUpwardNavigationSliderBodyID); float fCurrentSliderWidth = upwardNavigationSlider.getScaledWidth(gl); float fCurrentSliderHeight = upwardNavigationSlider.getScaledHeight(gl); controlBox.setRectangle( 0, 0, fCurrentSliderWidth * 2, fCurrentSliderHeight + fCurrentSliderWidth); LabelManager.get().setControlBox(controlBox); drawingController.draw(fXCenter, fYCenter, gl, new GLU()); } else gl.glCallList(displayListIndex); } else { renderSymbol(gl, EIconTextures.RADIAL_SYMBOL.getFileName(), 0.5f); } if (!lazyMode) checkForHits(gl); }