$Id: History,v 1.187 2010/11/05 06:25:23 allison Exp $ ------------------------------------------------------------------- ========================================================= Geant4 - an Object-Oriented Toolkit for Simulation in HEP ========================================================= Category History file for visualization/OpenGL ---------------------------------------------- This file should be used by G4 developers and category coordinators to briefly summarize all major modifications introduced in the code and keep track of all category-tags. It DOES NOT substitute the CVS log-message one should put at every committal in the CVS repository ! ---------------------------------------------------------- * Reverse chronological order (last date on top), please * ---------------------------------------------------------- 5th November 2010 John Allison - G4OpenGLStoredSceneHandler, G4OpenGLViewerMessenger: o Introduced a display list limit to avoid memory exhaustion. o Introduced /vis/ogl/set/displayListLimit. 8th October 2010 Laurent Garnier - G4OpenGQtViewer.cc: o Add menu for changing text color, default color, background color o Toogle projection now call directly command instead of redefinding it 6th October 2010 John Allison (opengl-V09-03-08 with co-working tags...) - Co-working tags: interfaces-V09-03-12 + config-V09-03-08 - G4OpenGLStoredViewer.cc: o Added default colour and default text colour to list of parameters that trigger a kernel visit. 5th October 2010 John Allison - G4OpenGLStoredViewer.cc: Time-slices fade to background colour. 5th October 2010 Laurent Garnier - Change lots of shortcuts in Qt - Add 'google earth like' rotation 23th June 2010 Laurent Garnier - G4OpenGLImmediate/StoredQtViewer : Fix compilation warnings - G4OpenGLQtViewer : Add protection on Vis Tab without UI Qt 4th June 2010 Laurent Garnier (opengl-V09-03-07) - G4OpenGLImmediate/StoredQtViewer : Add protection against multiple repaint call. Add protection against resizeGl with bad values 3rd June 2010 John Allison (opengl-V09-03-06) - G4OpenGLImmediateSceneHandler: Re-instate // Make sure screen corresponds to graphical database... if (fpViewer) { fpViewer -> SetView (); fpViewer -> ClearView (); fpViewer -> DrawView (); } I was wrong - it *is* necessary. If not there, events are not refreshed. So this and similar changes below are all back to geant4-09-03, including glFlush, which is still a big performance penalty on Mac's Snow Leopard. 3rd June 2010 John Allison (opengl-V09-03-05) - Restored following files to geant4-09-03 in interests of stable behaviour: o G4OpenGLStoredSceneHandler.cc Restored code removed in opengl-V09-03-03: // Make sure screen corresponds to graphical database... if (fpViewer) { fpViewer -> SetView (); fpViewer -> ClearView (); fpViewer -> DrawView (); } o G4OpenGLStoredXViewer.cc: Restore to geant4-09-03. Restored code removed in opengl-V09-03-03: } else { // ADD TO AVOID KernelVisit=1 and nothing to display DrawDisplayLists (); FinishView (); - Note: G4OpenGLImmediateSceneHandler: Same code commented out. I think it's not necessary for immediate mode. 30th May 2010 John Allison (opengl-V09-03-04) - G4OpenGLSceneHandler: Added AddCompound(const G4VDigi&). 29th May 2010 John Allison (opengl-V09-03-03) - G4OpenGLImmediateSceneHandler.cc, G4OpenGLStoredSceneHandler.cc: Removed the following from ClearTransientStrore (was causing unnecessary drawing and flipping buffers?): // Make sure screen corresponds to graphical database... if (fpViewer) { fpViewer -> SetView (); fpViewer -> ClearView (); fpViewer -> DrawView (); } - G4OpenGLStoredXViewer.cc: Commented out as follows in DrawView (was causing extra buffer swap, thus showing bad picture; can't recall why it was introduced): } else { // ADD TO AVOID KernelVisit=1 and nothing to display //DrawDisplayLists (); ????????? (JA) //FinishView (); ????????? (JA) 26th May 2010 Laurent Garnier (opengl-V09-03-02) - G4OpenGLQtViewer : Some improvments with auto rotation mode. 20th May 2010 Laurent Garnier (opengl-V09-03-01) Co-working tag : intercoms-V09-03-01, interfaces-V09-03-02 - GNUMakefile, G4OpenGLQtViewer : Better inclusion of new tabs in UI part 11th May 2010 John Allison (opengl-V09-03-00) - G4OpenGLSceneHandler: o Use generic section and cutaway algorithm. o Follow change in generic section and cutaway interface. - G4OpenGLViewer.cc: o Use generic section and cutaway algorithm. o Fix compiler warning (*p++). o Replace strdup by local inline code. 29th April 2010 Laurent Garnier - G4OpenGLSceneHandler : Speed Improvment by drawing vector of markers instead one by one 27th April 2010 Laurent Garnier - G4OpenGLStoredXmViewer : remove viewer form list at destruction - G4OpenGLViewer : Fix a problem when printing in gl2ps 9th March 2010 Laurent Garnier - G4OpenGLViewer : Fix clipping when resizing non square size windows Remove error message when no scene present. - G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer : - Add some protections if viewer is in tab - fix some redraw probems when focus was outside frame - Add ShowView() and paintEvent() methods - DrawView method is now the same in Store and Immediate mode - G4OpenGLQtViewer : Add things for viewer in tabs 3rd March 2010 Laurent Garnier - G4OpenGLViewer : Add protection against null pointer scene 27th January 2010 Gabriele Cosmo - Fixed compilation warnings on G4OpenGLQtViewer and corrected compilation error when using Qt-3. 6th January 2010 Laurent Garnier (needs interfaces-V09-02-07 + laurent-QtUI_with_tabs_v1) - GNUMakefile : Add include for interfaces/basic - G4OpenGLQtWiewer : Integration into QtUI Tab 17th November 2009 John Allison (opengl-V09-02-10) - Tagged for vis tag. 17th November 2009 Gabriele Cosmo - Fixed problem in the generation of dependencies on Windows for some files, due to redefinition of min and max macros from windows.h in G4OpenGL.hh. - Fixed GNUmakefile. 3rd November 2009 John Allison (opengl-V09-02-09 coworks greps-V09-02-03) - Tagged for system testing. 3rd November 2009 Laurent Garnier - G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer : Protec Qt4 method introduce 13rd october 09 by ifdef 3rd November 2009 John Allison - G4OpenGLXmPanningCallbacks: Fixed pView compilation problem. 21 October 2009 Laurent Garnier - G4OpenGLQtViewer : Prepare to attach viewer In UI 21st October 2009 John Allison (opengl-V09-02-08 coworks greps-V09-02-02) - Added default AddCompound (const G4THitsMap&) methods. o Prevents warnings about hiding - calls G4VSceneHandler base class. 15 October 2009 Laurent Garnier - G4OpenGLViewer.cc : Fix a problem with printing. On mac OSX version > 10.5.7? or Ubuntu > 9.04? AND with user account configure in french (or canadian I believe), the decimal point character was defined by "," (see LC_NUMERIC). This cause a problem on reading eps files. Changed "," to "." 13 October 2009 Laurent Garnier - G4OpenGLImmediateQtViewer/StoredQtViewer : some cleaning - G4OpenGLImmediateQtViewer : Remove picking to true at initialisation - G4OpenGLQtViewer.cc : Fix a redraw problem on mac OS X 10.6 - G4OpenGLStoreQtViewer.cc,G4OpenGLImmediateQtViewer.cc : Fix width() and height() problem on mac OS X 10.6 29 September 2009 John Allison (opengl-V09-02-07) - Tagged. 18 August 2009 Laurent Garnier - G4OpenGLXmViewer : Fix a wrong initialization introduce by the new way of handling window size hints (January 2009) 29 July 2009, Laurent Garnier - G4OpenGLQtViewer : Ensure the GL frame size will be correct by setting a 0 size margin around 27 July 2009, Laurent Garnier - G4OpenGLStoredQtViewer : Remove picking to true at initialisation 20 May 2009, Laurent Garnier (opengl-V09-02-06) - Fixed compilation errors on WIN32-VC for WIN32 specific drivers. 18 May 2009, Joseph Perl (opengl-V09-02-05) - Correct G4OpenGLViewerMessenger.hh 14 May 2009, Laurent Garnier (opengl-V09-02-04) - G4OpenGLViewer : Add methods to manage print size and filename - G4OpenGLViewerMessenger : Added /vis/ogl/set/printSize - G4OpenGLViewerMessenger : Added /vis/ogl/set/printFilename - G4OpenGLQtViewer.cc,G4OpenGLXmMainMenuBarCallback.cc, renaming according to first point. 13 May 2009, Laurent Garnier - G4OpenGLStoredQtViewer.cc: Fix a second view redraw at ShowView() call - G4OpenGLQtViewer : Remove unuseful variables, renaming others - G4OpenGLViewer : Add method for resizing properly windows. Add methods to get window width, height and to know if size has changed - G4OpenGLQtViewer, G4OpenGLStoredQtViewer, G4OpenGLImmediateQtViewer, G4OpenGLXmViewer, G4XmWindowsHandlingCallback, G4OpenGLXViewer : Apply the previous changes. 6 May 2009, Laurent Garnier - G4OpenGLQtViewer.cc: Fix compilation warning and error with gcc4.4 28th April 2009, John Allison - G4OpenGLViewerMessenger.cc: Added return statement at end of every "if (command == ..." statement. (Because of test for OGLS, it is not elegant to use "if...else if...else" structure.) 28th April 2009, Laurent Garnier - G4OpenGLXViewer,G4OpenGLViewer : End of moving printEPS and associated functions from GLXViewer to GLViewer. - G4OpenGLXViewer : - Remove debug methods - Add check in SetView() method - G4OpenGLViewer : Add a glReadBuffer before glReadPixel in grabPixel method 8th April 2009, Laurent Garnier - G4OpenGLBitmapStore.hh : BugFix correction for windows (introduce 2nd February ?) - G4OpenGLViewer.hh : move methods in private - G4OpenGLXViewer.hh : Add debug methods - G4OpenGLImmediateXmViewer.cc, G4OpenGLStoredViewer.cc, G4OpenGLStoredXmViewer.cc, G4OpenGLStoredXViewer.cc, G4OpenGLViewer.cc : Add debug messages - G4OpenGLStoredXmViewer.cc,G4OpenGLStoredXViewer.cc, G4OpenGLStoredWin32Viewer.cc : - Add a DrawDisplay list in case of KernelVisit=1 and nothing new to display. - Add a flush at the end of the view. - G4OpenGLViewer.cc : - Improve the fix and resizing when X/Y size was even (lack of precision in a /2) - Set line/point size at a default size when printing. - G4OpenGLXmWindowsHandlingCallbacks.cc : print method rename in printEPS - G4OpenGLXViewer.cc : Lot of changes, try to debug it. Pb when printing in pixmap mode on some windows size 6th April 2009, Joseph Perl (opengl-V09-02-02, then opengl-V09-02-03) - New tag to clean up all of the cases of files that changed only in the cvs id. 24th March 2009, Laurent Garnier (opengl-V09-02-01) - G4OpenGLViewer : Add a fix and resizing when X/Y size was even (lack of precision in a /2) 18th March 2009 John Allison - G4OpenGLViewerMessenger.cc: printMode and transparency are available for all OGL windows (they were previously inadvertently hidden by an OGLS requirement). 16th March 2009, Laurent Garnier - G4OpenGLViewer : Add a check on max viewport dimensions when setting size. 4rd March 2009, Laurent Garnier - G4OpenGLQtViewer: - Suppress some warnings when saving file - Changing size is now allowed when saving (to save with better resolution than screen size) - G4OpenGLViewer: - Some renaming for print methods to be more clear about Vectored and non Vectored - Now using Gl2PS method to do PS (changes also in G4OpenGLXViewer and G4OpenGLQtViewer) - Suppress unuseful printX methods (heritated form XViewer) - Add methods to handle printVectored and NonVector cases - G4OpenGLViewerMessanger : Changes methods to get new G4OpenGLViewer methods to print 1st March 2009, Laurent Garnier - Remplacing glBitmap by GL_POINTS to draw marker : Speed improvment and gl2ps can now draw Markers. 16 February 2009, Laurent Garnier - Modifications in GNUMakefile for gl2ps. - G4OpenGLViewer,G4OpenGLViewerMessenger.cc,G4OpenGLXmMainMenubarCallbacks.cc ,G4OpenGLXmViewer.cc modified for gl2ps and some renaming "print" in "printVectoredEPS" 2nd February 2009 Laurent Garnier - Improve Anticipate headers declaration in all files - Factorize grabPixels function in G4OpenGLViewer - Begin of refactoring printEPS function 22th January 2009 Laurent Garnier - Fix bug in ratio and geometry on X/Xm/Qt/Win32 viewers 19th January 2009 Laurent Garnier - Change G4DEBUG definition by G4DEBUG_VIS_OGL 12th January 2009 John Allison - G4OpenGLViewer.cc: Pick up X and Y window size hints to define viewport. 2 December, Laurent Garnier - G4OpenGLImmediateXmViewer,G4OpenGLStoredXmViewer,G4OpenGLXmViewer G4OpenGLImmediateXViewer, G4OpenGLStoredXViewer, G4OpenGLXViewer, G4OpenGLXmWindowHandlingCallbacks, G4OpenGLImmediateQtViewer.cc, G4OpenGLStoredQtViewer, G4OpenGLQtViewer G4OpenGLImmediateWin32Viewer.cc, G4OpenGLStoredWin32Viewer, G4OpenGLWin32Viewer -> Replace WinSize by fWinSize and some improvments about size initialization - G4OpenGLQtViewer.hh : Suppress WinSize private variable - Now Could pass XString like 400x600-0+0 to viewers and set position and location. It will work for Qt, X, Win32 for the moment. 24 October, Laurent Garnier (opengl-V09-01-03) - Change GEANT4_QT_DEBUG flag by QTDEBUG - Suppress unuseful DEBUG messages 12th October Laurent Garnier - G4OpenGLQtExportDialog : improvments for Qt3" - G4OpenGLQtViewer,G4OpenGLImmediateQtViewer,G4OpenGLStoreQtViewer : Add the name on OpenGlQt viewers - G4OpenGLStoredQtViewer,G4OpenGLImmediateQt, G4OpenGLStoredQt : Change OGLSQT and OGLIQT by OGLSQt and OGLIQt 2 October Laurent Garnier - Fix a crash when there was no scene. 28 July Laurent Garnier - Fix a bug in XmRotation panel introduce in last commit by myself. 20th June 2008 Laurent Garnier - Correct some warnings - Move rotation code of Xm and Qt in G4OpenGLViewer::rotateScene. Same code in now shared 12th June 2008 Laurent Garnier - Emit signals when moving/rotate scene, in order to get them in external app 28th Mai 2008 Laurent Garnier - Add mouse wheel zoom commands 28th April 2008 Laurent Garnier - Add better moc control/compilation step in GNUmakefile - Fix a problem when launching QT VIS without QT UI (N02 for example) 28th April 2008 John Allison (opengl-V09-01-02) - G4OpenGLStoredSceneHandler: Tidied constructors of nested classes. 4th April 2008 John Allison (opengl-V09-01-01) - Fixed DBL_MAX problem in 2D drawing: o changed G4OPENGL_DBL_MAX to G4OPENGL_FLT_BIG. - Fix gcc-4.3.0 compiler warnings. 11th March 2008, Laurent Garnier - Resolve QT3 compilation errors 10th March 2008, Laurent Garnier - Add a dialog panel to make movies (Right button->Actions->Movie parameters) - Add ability to "auto rotate" volume launched with quick mouse move - Lots of improvments for Qt3 - Improvments on moving steps with shortcuts - Could now select between orthogonal/perspective view mode 1st February 2008 John Allison - G4OpenGLQtViewer.cc: Fix #ifdef QT protection. - G4OpenGLSceneHandler.cc: Small improvement to logic of setting GL_LIGHTING. 30th January 2008, Laurent Garnier - Add moving camera on left/right/up/down arrown, going forward/backward on SHIFT+up/down, zoom in with +/- keys - Add a context menu entry for projection perspective/orthographic - Fix some bugs on windows in export dialog 15th January 2008, Laurent Garnier - Fixed some layout problems on export dialog box - Some improvements on exports formats - Fix a bug in the help command : The clic callback on a item was not working on windows - Fix a crash at exit when launched on a MAC. - EPS export format is now ready for Qt3 - Add Vectoriel EPS export format - Fix an aspect ratio deformation when resize the widget - Fix a crash at launch with leopard - When selecting the "move" mouse action, this action was set even when mouse button was released. Fixed : Now we should clic to have the move action - GNUmakefile : Added a macro for moc file - Moc files : Suppression of all theses files. They are now autogenerated thanks to config/common.gmk 4th January 2008 John Allison (opengl-V09-01-00) - Implemented extended 2D interface. 30th November 2007 Laurent Garnier - Improvements for Qt3 - moc files : Adding other versions for QT_MOC_REVISION 28,58 and 59, but this is not the right solution.. 19th November 2007 Joseph Perl (for Laurent Garnier) (opengl-V09-00-04) - Added GEANT4_QT_DEBUG flag to more places 15th November 2007 John Allison (opengl-V09-00-03) - Re-introduced Qt files, now properly protected by cpp flags. - cpp flags also added to some other files not previously properly protected. 15 Nov 2007, Laurent Garnier - G4UIQt,G4Qt : Adding a GEANT4_QT_DEBUG flag to hide all debug messages - G4UIQt,G4Qt : Compilation improvements for Qt3 - G4UIQt,G4Qt : Minors corrections on G4UIQt helpWidget 14 Nov 2007, Laurent Garnier - G4OpenGLStoredQtViewer.cc : Correction of a bug with mouse move event in Qt4 - G4OpenGLQtExportDialog_moc.cc, G4OpenGLQtViewer.cc, G4OpenGLQtViewer_moc.cc : Adding protection for Qt version between 4.0 and 4.2 13th November 2007 John Allison (opengl-V09-00-02) - Removed Qt files from tag. File are still at head - need fixing. 13 Nov 2007, Laurent Garnier - G4UIQt,G4Qt : Moving all moc in one big file interface/G4UIQT_moc.cc, including Qt3 and Qt4 moc support 10th November 2007 John Allison (opengl-V09-00-01) - Moved WinSize_x, y to base class G4OpenGLViewer. - Minor improvement in guidance for /vis/ogl/printEPS. 09 Nov 2007, Laurent Garnier - G4UIQt,G4Qt : Change all include directive to be compatible with Qt3 08 Nov 2007, Laurent Garnier - moc_G4OpenGLQtExportDialog.cc move in G4OpenGLQtExportDialog_moc.cc - moc_G4OpenGLQtViewer.cc move to G4OpenGLQtViewer_moc.cc 27 Sept 2007, Laurent Garnier - Adding sur files for G4UIQt driver : - G4OpenGLImmediateQt.cc - G4OpenGLImmediateQtViewer.cc - G4OpenGLQtExportDialog.cc - G4OpenGLQtViewer.cc - G4OpenGLStoredQt.cc - G4OpenGLStoredQtViewer.cc - moc_G4OpenGLQtExportDialog.cc - moc_G4OpenGLQtViewer.cc 28th September 2007 lgarnier - first import of G4UI Qt files : Do not try to compil them 21st August 2007 John Allison (opengl-V09-00-00) - Removed redundant G4OpenGLXViewerMessenger. 25th May 2007 John Allison (opengl-V08-03-03) - G4OpenGLSceneHandler and G4OpenGLXViewerMessenger: Fixed gcc-4.1.2 compiler warnings. 25th May 2007 John Allison (opengl-V08-03-02) - G4OpenGLXViewer: Trapped glXMakeCurrent in Initialise function. 24th May 2007 John Allison (opengl-V08-03-01) - Fixes for SUN. 16th May 2007 John Allison (opengl-V08-03-00) - Fix compiler warnings on SLC4. - Bug fixes: o Correct path /vis/ogl/set/printMode. o Add SetView to pixmap screen dump ("/vis/ogl/set/printMode pixmap" and "/vis/ogl/printEPS"). 8th May 2007 John Allison (opengl-V08-02-06) - Moved vectored PostScript printing to G4OpenGLViewer. - /vis/ogl/printEPS should work for all viewers, including Win32. - Introduced /vis/ogl/set/printMode vectored|pixmap, currently only effective on X windows (and still somewhat buggy). 4th April 2007 John Allison (opengl-V08-02-05 - needs visman-V08-02-04) - Implemented picking for OGLSX ( as well as OGLIX). Hopefully works for OGL*Win32. Still doesn't work for OGL*Xm. 3rd April 2007 John Allison (opengl-V08-02-04 - needs visman-V08-02-03) - G4OpenGLStoredSceneHandler: o Re-organised display lists on a per-primitive basis, i.e., one display list per primitive. (This is so that, except for text, the colour - or, rather, intensity - can be brought out of the display list into the TOList (Transient Object List) and controlled for the Display-by-Time feature. Previously, if more than one primitive were drawn between BeginPrimitives and EndPrimitives, it would finish up all in one display list, colour commands included. Rationalises and fixes a rare bug in the Display-by-Time feature - see August 2006.) o Added AddPrimitive(const G4Polymarker&) so that it is treated as one primoitive to fit with the above re-organisation. - Implemented picking for OGLIX. 25th March 2007 John Allison (opengl-V08-02-03) - Fix compiler warnings. 8th February 2007 John Allison (opengl-V08-02-02) - Fixed Windows problem with DBL_MAX. (Introduced G4OPENGL_DBL_MAX.) - G4OpenGLXViewer.cc: Small bug fix in print(). (Context was switched .but not switched back. Not serious, because context was always set before normal drawing.) 9th January 2007 John Allison (opengl-V08-02-01) - Implemented bitmap markers for MarkerSizeType == screen. (The old polygon implementation remains for MarkerSizeType == world.) - Added G4OpenGLBitMapStore to assist the above. - G4OpenGLXViewer::CreateGLXContext: o Bug fix: Added missing break in colormap lookup routine. 5th January 2007 John Allison (opengl-V08-02-00) - G4OpenGLSceneHandler.cc: o Followed change of signature of GetLineWidth in visman-V08-02-00. o Minor efficiency improvements. 21st November 2006 John Allison (opengl-V08-01-09) - Fixed compiler warnings. 1st November 2006 John Allison (opengl-V08-01-08) - Replace /vis/oglx/set/printEPS by /vis/oglx/printEPS. The new command actually initiates a print, rather than set a flag for printing. 24th October 2006 John Allison (opengl-V08-01-07) - G4OpenGLStoredViewer.cc: Calculate light front horizon properly. - G4OpenGLViewerMessenger.cc: Make refresh depend on auto-refresh. 19th September 2006 John Allison (opengl-V08-01-06) - Added time origin for light front. - Added /vis/ogl/set/transparency. - G4OpenGLStoredViewer.cc: Bug fix in time range acceptance. 4th September 2006 John Allison (opengl-V08-01-05) - Implement cutaways. - Immediate mode: G4OpenGLImmediateSceneHandler.cc: Flush all primitives (see detector being drawn). - /vis/oglx/set/printEPS: change parameter default to true. 30th August 2006 John Allison (opengl-V08-01-04) - G4OpenGLSceneHandler: o Implemented line width. o Switched off back face culling when clipping so that the inside of volumes can be seen. o Added CreateSection/CutawayPolyhedron to exploit generic sectioning (DCUT) and cutaways. Currently not activated due to instabilities in BooleanProcessor. Local sectioning still active but broken (at least on Mac) due to apparent change in effect of clipping planes (polyhedron edges not reconstructed). o Rationalised calculation of marker size. - G4OpenGLStoredSceneHandler: o Fixed bug due to recursive calls of AddPrimitive (polymarkers -> markers). o Pick up time range from G4VisAttributes. - G4OpenGLViewer(Messenger): o Added position and colour to /vis/ogl/set/displayHeadTime. o Added /vis/ogl/set/displayLightFront. - G4OpenGLStoredViewer.cc: o Rationalised CompareForKernelVisit. (Local sectioning still active.) o Added position and colour to DisplayHeadTime. o Added DisplayLightFront. 16th August 2006 John Allison (opengl-V08-01-03) - Corrected Solaris compilation error. - Added /vis/ogl/set/fade and displayHeadTime. 14th August 2006 John Allison (opengl-V08-01-02) - Needs visman-V08-01-02. - G4OpenGLStored: Implemented display-by-time. Only available in stored mode at present. Only implemented for circle, square, polyline and polymarker at present, enough for currently available trajectory models. Time is communicated via G4AttValues. - Added G4OpenGLViewerMessenger. - Added /vis/ogl/set/startTime and endTime of displayed objects. - All factories: Instantiated G4OpenGLViewerMessenger. - G4OpenGLViewer: Added fStart/EndTime. - G4OpenGLXViewer.cc: Graceful recovery from unexpected tokens in spewPrimitiveEPS and spewSortedFeedback. 17th July John Allison (opengl-V08-01-01) - Added /vis/oglx/set/printEPS (prints eps file on every update). 3rd July 2006 John Allison (opengl-V08-01-00) - Elimination of redundant variable doublebuffer and implementation of FinishView in all viewers. 30th May 2006 Joseph Perl (opengl-V08-00-08) - G4OpenGLImmediateWin32Viewer: Removed tests on doublebuffer since that variable seems to have random behavior and should be assumed false for this viewer. 29th May 2006 Joseph Perl (opengl-V08-00-07) - G4OpenGLWin32Viewer, G4OpenGLImmediateWin32Viewer, G4OpenGLStoredWin32Viewer: Removed common FinishView and instead made separate FinishView for the two different versions of this viewer since each wants a different buffer swapping behaviour. 12th May 2006 John Allison (opengl-V08-00-06) - G4OpenGLWin32Viewer: Fixed buffer swapping behaviour. 28th April 2006 John Allison (opengl-V08-00-05 - needs visman-V08-00-14) - G4OpenGLStoredX/Xm/Win32Viewer.cc: Fixed buffer swapping problem when recomputing transients. 24th April 2006 John Allison (opengl-V08-00-04) - Fixed compilation problem on Windows. 19th April 2006 John Allison (opengl-V08-00-03) - G4OpenGLSceneHandler, G4OpenGLStoredSceneHandler and G4OpenGLImmediateSceneHandler: o Implemented Begin/EndPrimitives2D (needs visman-V08-00-12 and greps-V08-00-02). o Migrated to direct access to G4PhysicalVolumeModel. - G4OpenGLStoredX/Xm/Win32Viewer.cc: bug fix for conditional drawing of display lists in DrawView. 14th March 2006 John Allison (opengl-V08-00-02) - Refined display list building and re-drawing algorithm. o G4OpenGLStoredSceneHandler::EndModeling: Changed to GL_COMPILE_AND_EXECUTE. o Avoided unnecessary re-execution in DrawView (X, Xm and Win32). - G4OpenGLStoredSceneHandler::RequestPrimitives: Refined display list re-use algorithm. In test19 with global culling off, numbers of display lists used are: o 191 No re-use: o 73 Before this change: re-use except replicas (includes parameterised). o 33 After this change: re-use except parameterised and replicas in radius. 26th January 2006 John Allison (opengl-V08-00-01) - Coworks with visman-V08-00-04 (removed fModified). - Removed references to fModified. - Tidying: Removed unnecessary ClearView. - G4OpenGLSceneHandler.cc: Added some (commented out) code for possible future implementation of 2D drawing. - G4OpenGLXViewer.cc: Improved exception printing. 11th January 2006 John Allison (opengl-V08-00-00) - Improved efficiency: all DrawView's: o Don't call ClearView. o Set flag so SetView will not be called in ProcessView. o Leave background colour to ClearView. - Used dynamic_cast, no need for G4OpenGLViewerDataStore. - G4OpenGLXmViewerMessenger: Made a smart singleton; interrogates vis manager for current viewer. 24th November 2005 John Allison (opengl-V07-01-09) - Protected G4OpenGLXmViewerMessenger with #ifdef G4VIS_BUILD_OPENGLXM_DRIVER. 22nd November 2005 John Allison (opengl-V07-01-08) - Added G4OpenGLXmViewerMessenger. - Corrected text position. - Made depth test for polyhedron GL_LEQUAL (slightly dominant). 17th November 2005 Gabriele Cosmo - Fixed settings of background style for WIN32 viewers. 13th November 2005 John Allison (opengl-V07-01-07) - Implemented X-Window-style geometry hints in G4OpenGLXViewer. 13th October 2005 John Allison (opengl-V07-01-06) - Allowed any colour background. - Implemented non-uniform scaling. - Migration to . 29th September 2005 John Allison (opengl-V07-01-05) - Added G4OpenGLViewerDataStore to facilitate access of viewer data by scene handler. - Re-implemented transparency button in OpenGLXm. 13th September 2005 John Allison (opengl-V07-01-04 - needs visman-V07-01-02) - Implemented white background for all OGL viewers. - G4OpenGLSceneHandler.cc: o Fixed hidden line removal (bug introduced in opengl-V07-01-02). o Fixed treatment of triangular polygons for drawing of auxiliary/soft lines. o Corrected GetTextColour(text). o Corrected GetColour(polyhedron). 5th September 2005 John Allison (opengl-V07-01-03) - Bug fix: stored transparent objects were being lost. 2nd September 2005 John Allison (opengl-V07-01-02 - needs visman-V07-01-01) - Bug fix: edgeflags problem introduced with smooth shading in opengl-V07-01-00. - Implementation of a "better algorithm" for the rendering of transparent polyhedron objects. It renders all opaque objects first, then renders the transparent objects with the depth buffer in read-only mode (see OpenGL Programming Guide). It uses the new facility in G4VSceneHandler::ProcessScene for an optional second pass of the run-duration models in the scene. Note this algorithm is still only an approximation. It will still give the wrong blended colour if two transparent objects are rendered front first. For nested transparent objects, this is unfortunate, because G4PhysicalVolumeModel traverses Geant4's mother-daughter hierarchy in such a way that mothers come first. Also, there is no guaranteed relationship between the order of rendering and the depth of two transparent objects if they are at the same level or in different branches of the hierarchy. Still, the only error will be an incorrect colour - the objects will still give the appearance of transparency, so it's a pretty good algorithm. (An even better algorithm would be to attempt to render the facets in depth order, deepest first. But how do you calculate the depth - centre of area, deepest corner? One can still imagine pathalogical cases that would sometimes give the wrong colour. Also, for stored mode, the order is fixed in a display list so when the user rotates the view, one would lose the depth ordering. I think we have to accept that blending in OpenGL is only ever an approximation. For accurate blending, use RayTracer.) 28th August 2005 John Allison (opengl-V07-01-01) - Half-way implementation of rendering of transparent polyhedron objects. In this implementation, no account is taken of the order of rendering. Transparent objects are rendered with depth testing off so that objects behind can still be seen. But this means that opaque objects in front do not obscure them - and they jolly well should! A better algorithm is to render all opaque objects first, then render the transparent objects with the depth buffer in read-only mode (see OpenGL Programming Guide). This is going to take a little more thought - see opengl-V07-01-02. 20th July 2005 John Allison (opengl-V07-01-00) - Introduced smooth shading, taking advantage of hitherto un-noticed feature of HepPolyhedron::GetNextFacet that calculates the normals at each vertex so that curved surfaces are rendered more realistically (Gouraud shading). - G4OpenGLImmediateSceneHandler.cc: Removed unnecessary #include's. - G4OpenGLXmViewer.cc: Fixed to use window size hints. This changes the default window size. It used to be 400x400, hardcoded in G4OpenGLXmViewer.cc, but now it picks up the G4ViewParameters::GetWindowSizeHintX/Y, which defaults to 600x600. The user may change it on the command line, e.g: /vis/open OGLSXm 500 or /vis/viewer/create ! ! 500 30th May 2005 John Allison (opengl-V07-00-03) - Fixed compilation problem in OpenGL on SUN. (Replaced multimap by map of vectors in G4OpenGLFontBaseStore.) 4th May 2005 John Allison (opengl-V07-00-02) - Restored sequence Set/Clear/DrawView in ClearTransientStore. (It was taken out to prevent recursive calling, but that seems to be OK, and it is needed to implement refresh at end of event/run.) 22nd April 2005 John Allison (opengl-V07-00-01) - Rationalised work of opengl-V07-00-00. Functionality unchanged. o G4OpenGLViewer.hh: Created virtual void CreateFontLists(){}. o In all concrete viewers, added call to CreateFontLists(). o Moved font code for X to G4OpenGLXViewer::CreateFontLists(). o There is no longer a need to implement in the XmViewer, since it now inherits. Thus the font code now only appears once for X. o Awaiting implementation for WIN32. 17th April 2005 John Allison (opengl-V07-00-00) - Based on vis-V07-00-13. - Implemented text for X-Windows viewers. Uses glXUseXFont, which creates display lists for nominated fonts. Simple-minded scheme in which each viewer creates its own font display lists for a variety of sizes, which are accessed by the scene handler through a new class, G4OpenGLFontBaseStore. Affected methods: G4OpenGLXViewer::CreateMainWindow() G4OpenGLXmViewer::CreateMainWindow() G4OpenGLSceneHandler::AddPrimitive (const G4Text& text) 18th November 2004 John Allison (opengl-V06-02-07) - Removed redundant fLastVP from G4OpenGLStoredSceneHandler. 15th November 2004 Guy Barrand - G4OpenGLWin32Viewer::ShowView : glFlush was not sufficient to see trajectories (for example with N03). Correct so that ShowView do a FinishView that does : glFlush, wglSwapBuffer and empty the Windows message queue. 22nd September 2004 John Allison (opengl-V06-02-06) - doxygen output to tmp area. - Trap non-regular polyhedrons. 13th September 2004 Gabriele Cosmo (opengl-V06-02-05) - G4OpenGLTransform3D.cc: simplified implementation for GetMatrix() to allow for porting on CLHEP-1.9.X series. 23rd July 2004 John Allison - Draws auxiliary edges if required. - Added auxiliary edge button. 16th July 2004 John Allison (opengl-V06-02-04) - Refinements to hidden line, hidden surface removal. 14th July 2004 John Allison (opengl-V06-02-03) - Removed superfluous #include "G4VisManager.hh" from G4OpenGLXmViewer.cc. 13th July 2004 John Allison (opengl-V06-02-02) - Hidden line *and* hidden surface removal now works. 9th July 2004 John Allison (opengl-V06-02-01) - Fixed long-standing problem with hidden line removal. - Improved messages on failure to get visual. - Added GLX_STENCIL_SIZE explicit request to visual attributes - most systems provided by default anyway, so no effect. 1st July 2004 John Allison (opengl-V06-02-00) - Rationalised G4OpenGLSceneHandler ready for hidden line removal. - Bug fix in G4OpenGLXmPanningCallbacks.cc for dolly control. 18th June 2004 Gunter Folger (geant4-06-02) 9th June 2004 Gabriele Cosmo (vis-V06-01-03) 7th June 2004 Gabriele Cosmo (vis-V06-01-02) - GNUmakefile and disclaimer changes - see visualization/History. 9th April 2004 John Allison (vis-V06-01-01 + interfaces-V06-01-00) - Tagged OpenGL as below. Joint with interfaces-V06-01-00. 7th April 2004 Guy Barrand - visualization/OpenGL/* : use the G4OpenGL.hh file. - Added : visualization/OpenGL/include/G4OpenGL.hh to encapsulate the include of gl/gl.h and gl/glu.h that may be platform dependant. It permits to rm some #ifdef WIN32 spread in the code. It opens also the way to the usage of the Apple OpenGL on a Mac. 17th February 2004 John Allison (opengl-V06-00-00) - Fixed bug #581: wrong order of statements in G4OpenGLXViewer::~G4OpenGLXViewer (see bug report). 4th October 2003 Gabriele Cosmo (vis-V05-02-01) - GNUmakefile: o replaced "digits+hits" with "digits_hits". - Coworks with "geometry-V05-02-00" and "digits_hits-V05-02-00". 22nd September 2003 John Allison (vis-V05-02-00, greps-V05-02-00) - Cosmetic change to regularise names: o changed _Feedback3Dcolo to G4OpenGLXViewerFeedback3Dcolor. o changed _DepthIndex to G4OpenGLXViewerDepthIndex. 23rd June 2003 Guy Barrand (opengl-V05-01-02) - Commit a first implementation of G4OpenGLWin32Viewer. 10th June 2003 Gabriele Cosmo (opengl-V05-01-01) - More fixes for warnings in viewers classes. - Added inclusion of for WIN32 platforms when GL headers are included. 05th June 2003 Gabriele Cosmo (opengl-V05-01-00) - Fixes for porting compilation on WIN32: o G4OpenGLWin32Viewer[.hh.cc]: removed inclusion of . o G4OpenGLViewer.cc: replaced local variables near/far with pnear/pfar since declared 'obsolete' in WIN32 platforms. 27th November 2002 John Allison (vis-V04-01-08) - Improved algorithm of CompareForKernelVisit. 11th November 2002 John Allison (opengl-V04-01-02) - Corrected inclusion of G4OpenGLXViewer #ifdef X_DRIVER. - Added G4OpenGLSceneHandler::AddThis for trajectories and hits - simply call default but there as a marker and encourager. - Added tracking and digits+hits/hits to GNUmakefile. 16th October 2002 John Allison (opengl-V04-01-01) - Fix for WIN32. Now compiles but viewer not implemented. 24th June 2002 John Allison (opengl-V04-01-00) - Further cosmetic changes in G4OpenGLXViewer.cc for DEC compiler. 10th June 2002 John Allison (opengl-V04-00-03) - Cosmetic changes for SUN-CC in G4OpenGLXmConvenienceRoutines.cc. 6th June 2002 John Allison (opengl-V04-00-02) - Cosmetic changes for GNU compiler in G4OpenGLXViewer.cc. 23rd February 2002 John Allison (opengl-V04-00-01) - Changes to encourage compilation on Windows in preparation for implementation of G4OpenGLWin32Viewer. Removed spurious includes of glx.h, unistd.h and assert.h. 24th August 2001 John Allison (vis-V03-02-13) - Limited the printing of warnings in G4OpenGLSceneHandler::AddPrimitive (const G4Text& text). 14th August 2001 John Allison (vis-V03-02-11) - Improved KernelVisitDecision. - Fixed a few small bugs in multiple "stored" viewers, but see next item. - There's an outstanding bug in OpenGL Stored. If there is more than one viewer controlled by a scene handler, after a ClearStore on the scene handler, e.g., with /vis/scene/notifyHandlers, the first viewer to get refreshed should trigger the display list rebuild, but the second need not. However, when the second viewer's turn comes, the display lists are there, and are called, e.g., G4OpenGLStoredXViewer::DrawView calls G4OpenGLStoredViewer::DrawDisplayLists that calls glCallList, but nothing appears on the screen. To overcome this there is some temporary code in G4VViewer::NeedKernelVisit which marks *all* viewers to force a rebuild. To see the symptoms, comment out that temporary code and issue these commands: /vis/verbose c /control/verbose 2 /vis/scene/create /vis/scene/add/volume /vis/sceneHandler/create OGLSX /vis/viewer/create ! ! 1 /run/beamOn /vis/viewer/create ! ! 1 /vis/viewer/select viewer-0 /vis/viewer/viewpointThetaPhi 20 20 /vis/viewer/select viewer-1 /vis/viewer/viewpointThetaPhi 40 40 /vis/viewer/set/style surface /vis/viewer/refresh /vis/viewer/select viewer-0 /vis/viewer/refresh /vis/viewer/select viewer-1 /vis/viewer/set/style wireframe /vis/scene/notifyHandlers You may have to do this too: /vis/viewer/select viewer-0 /vis/scene/notifyHandlers One of the viewers is empty. Curious!! 9th August 2001 John Allison (vis-V03-02-10-00) - Implemented G4OpenGLStoredSceneHandler::ClearTransientStore() - Removed G4OpenGLSceneHandler::AddPrimitive (const G4Polymarker&) (it only invoked G4VSceneHandler::AddPrimitive (const G4Polymarker&) which is picked up by inheritance anyway. - Removed lots of unnecessary header files from G4OpenGLStoredSceneHandler.cc. - Corrected order of calling base class functions in G4OpenGLStoredSceneHandler::Begin/EndModeling. 24th July 2001 John Allison (vis-V03-02-06) - G4OpenGLSceneHandler::AddPrimitive (const G4Text&) handles transformation. 14th July 2001 John Allison (opengl-V03-02-00) - Fixed crash in optimised mode: added Initialise() to viewers so that windows are opened after viewers are fully constructed. 2nd April 2001 John Allison (opengl-V03-00-01 wrt vis-V03-00-09) - Tidied G4OpenGLXmViewer callback code. Removed superfluous header files. 7th March 2001 John Allison - Changed char* to const char* in many places and that gave problems in calls to Xt and Xm. Hope all's OK. Differences: cvs diff -r vis-V03-00-06 vis-V03-00-07 25th January 2001 John Allison (opengl-V03-00-00) - Implemented running re-calculation of up-vector in the case of "object rotation" (lights move with camera) to prevent "flipping" of view when camera passes through up-vector. Note that the default is "camera rotation" (lights do not move with camera, i.e., remain fixed relative to object) so the default is that this "flipping" can happen. To set "object rotation" (lights move with camera) use /vis/lights/move_with_camera true (soon to be /vis/viewer/set/lights move-with-camera) or click "Object" radio button on Rotation Panel in OpenGLXm mode. - Changed some objects to references for efficiency. E.g.: const G4Vector3D& vp = pView->fVP.GetViewpointDirection ().unit (); 22nd May 2000 John Allison (opengl-V01-01-00) - Fixed slow response of 2nd window of OpenGLXm. Worked around Mesa bug by sharing static visuals in G4OpenGLXViewer (Guy Barrand): static XVisualInfo* vi_single_buffer; static XVisualInfo* vi_double_buffer; - Removed ChooseVisual from G4OpenGLXmViewer.cc - done in base class G4OpenGLXViewer. - Protected double deletion of window in destructors of G4OpenGLXmViewer and G4OpenGLXViewer (Guy Barrand). - Changed requested bits per colour to r,g,b = 1,1,1 in G4OpenGLViewer.cc. - Corrected order of CreateMainWindow() and InitializeGLView() in X*Viewer constructors.