Hi All, André Garneau has kindly beavered away on our behalf and developed a GrpahicsWindowWin32 implementation. A cvs update will get all the required changes, and finally a short absence the OSG examples should work once more on all platforms ;-)
André sent along some release notes that I'm including below. A couple of the points below are good topics for discussion as they reflect further extensions to the GraphicsContext/Window framework that I've put in place. Have fun! Robert. -- ============================= OSG Viewer component on Win32 ============================= This file contains the release notes for the Win32 implementation of the windowing interface supporting the new cross-platform OSG Viewer (osgViewer) component. -------- Contents -------- The following information is discussed in this document: 1. Purpose of this release 2. Implemented features (and planned ones) 3. Known issues and limitations 4. Build/installation notes 5. Usage & testing 6. Support ----------------------------------------- 1. Purpose of this release (and features) ----------------------------------------- This release is a snapshot of the current development taking place for the implementation of graphics window support on the Win32 platform. This release is alpha-level software (not all features implemented, not fully tested). The above disclaimer said, many usage contexts have been tested to ensure that the release is worthy of initial distribution to the OSG community. Should you encounter issues with it, please provide feedback and bug reports so we can resolve them. ------------------------------------------ 2. Implemented features (and planned ones) ------------------------------------------ This release contains the following features -------------------------------------------- * Support of rendering across multi-monitor setups (in this release, only monitors attached to the Windows desktop are supported) * Rendering can be done full-screen or in Windows with/without decorations * Full multi-threaded rendering support * Bug fixes for multi-threading issues discovered in the Core OSG library What this release does not implement yet (planned features) ----------------------------------------------------------- * Support for rendering in pbuffers * Shared graphic contexts (can be specified but is ignored) * v-sync programmatic support (still need to be configured at the driver control panel level) * Support for display devices not attached to the Windows desktop ------------------------------- 3. Known issues and limitations ------------------------------- Known issues ------------ * SEV2: When window decorations are turned on/off repeatedly, window content may stop refreshing * SEV2: Moving a rendering window from one display device to another display device may cause texturing to disappear * SEV3: Mouse support when going from one screen to another screen needs improvement (usability issue) * SEV4: When a window is moved, rendering is frozen (standard Windows-behavior). A workaround would be to dedicate a single-thread for all window event processing * SEV5: Display devices not attached to the desktop cannot be used. Workaround is to add them to the desktop until the features becomes available. The following OSG examples fail to execute because of missing features: * osgslice (port to the OSG Viewer implementation is not complete) * osgprerendercubemap (missing pbuffer support) * osgsimulation (missing pbuffer support) * osgtexture3d (to be defined - possibly a bug in the Win32 implementation) Current limitations (and possible extensions) --------------------------------------------- * Implementation is missing a number of useful graphic trait options : (needs to be discussed with Robert) - topMostWindow flag Forces rendering window to remain on top of other ones in all conditions (including the taskbar even if not fully covered) - fullScreen flag Indicates that specified resolution in the graphic traits is for the full-screen (on-the-fly resolution change for display devices) - refreshRate value Indicates at which frequency the display device should be driven - frameRate value Indicates the target frequency for frame update (ideally equal to refreshRate) The implementation will derive the vsync-divider from this. - hideCursor flag Indicates that the mouse pointer should be hidden when hovering above the rendering window --------------------------- 4. Build/installation notes --------------------------- The Win32 implementation is provided in the following files: applications osgviewer => osgviewer.cpp osgViewer include => GraphicsWindowWin32.h src => GraphicsWindowWin32.cpp VisualStudio icons => osg_icon.rc => osg.ico => producer.ico * These files must be added to the osgViewer core library project. * If not already done, the OSG example projects and applications must be updated to include the dependency on the osgViewer core project. * In addition to these files, it is strongly recommended to update the following files (which include multi-threading bug fixes). Failure to update these files will likely result in random crashes at rendering window-initialization time: osg/src FrameBufferObject.cpp GLExtensions.cpp Texture.cpp To test the correct operation of a new installation, try the following command from a command shell: osgcamera -1 -c cow.osg { to create a single screen view } osgcamera -2 -c cow.osg { to create a multi-screen view } -------------------- 5. Usage and testing -------------------- Usage ----- To setup the display devices, the new osgViewer component uses the term DISPLAY and SCREEN, following the X11 terminology. In the Windows world, there is only one Window Manager, so this translates to a system allowing only one X-11 type display. However, like X11, this display can have one or more SCREENS attached to it (what X11 calls screens, are known as display devices in the Windows terminology). When creating a screen configuration, use the Windows display ID as the screen number *MINUS 1*. To determine the display ID assigned by Windows: 1. Right-click on the Windows desktop 2. Select Properties... 3. Select Settings tab 4. The display ID will be present on the monitor icons. Alternatively press the Identify button to see them on each screen. Example ------- A four monitor setup would define the following graphic traits: Monitor 1: traits->displayNum = 0; traits->screenNum = 0; // first graphic card, first screen ... (other traits) Monitor 2: traits->displayNum = 0; traits->screenNum = 1; // first graphic card, second screen ... (other traits) Monitor 3: traits->displayNum = 0; traits->screenNum = 2; // second graphic card, first screen ... (other traits) Monitor 4: traits->displayNum = 0; traits->screenNum = 3; // second graphic card, second screen ... (other traits) The important thing to remember is that under Windows, the displayNum field must always be 0. Each screen ID goes from 0 to n-1 where n is the total number of screens present in the system. Testing ------- This release has been tested on an Athlon 4200+ X2 (dual core) based computer with an Nvidia 9700GT graphic card. Testing was performed on single and dual-head setups. No testing has been done on ATI-based configurations and multi-graphic card setups (3 or more screens), so testing feedback on these setups is welcomed. Performance assessments are still to be conducted, and should be easier once osgViewer statistics are available. ---------- 6. Support ---------- This work is my contribution to the OpenSceneGraph community. As a seasoned visual systems developer/consultant, I did my best to ensure that it can be useful in its first incarnation even if it may not be fully polished. With support from the community through active testing, feedback and bug reports, this implementation should mature quite rapidly. For feedback, suggestions or bug reports, please use the existing osg-users mailing list. Since I sometime queue messages from this list in my inbox for a few hours, you can also reach me directly, if more appropriate (or urgent), at my email address below. Andre Garneau ([EMAIL PROTECTED]) Visual System Consultant PIXDEV inc. 27 des Souverains Blainville (QC) J7C 5A9 CANADA _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/