Commit Graph

461 Commits

Author SHA1 Message Date
Robert Osfield
616a96343c From Neil Hughes, "Please find attached two files that I've amended to add the IDC_HAND cursor for the windows platform." 2009-04-22 11:20:19 +00:00
Robert Osfield
b6182a1239 From Peter Amstutz, "Here is a simple change to osgViewer::GraphicsWindowWin32 to add a flag to WindowData to specify that the graphics window should not install an event handler of its own, per this discussion thread:
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg23734.html

The change is source compatible with current osg code and will not affect current users, it simply adds an additional parameter to the GraphicsWindowWin32::WindowData struct constructor and defaults to the current behavior.

Attached are the files "include/osgViewer/api/Win32/GraphicsWindowWin32" and "src/osgViewer/GraphicsWindowWin32.cpp" with my changes, based on svn revision 10045.  In addition, I have provided an svn patch file with the same changes for your convenience.

I have discussed the matter with my supervisor, and agreed that my company makes no copyright claim over this extremely trivial change (or to put it another way, we assign copyright to the open scene graph community.)"
2009-04-22 11:12:03 +00:00
Robert Osfield
7bfca5e760 From Stephan Huber, "attached you'll find a small fix for PixelBufferCarbon preventing it to
be compiled for 64bit. This is the easiest solution for the old
deprecated xcode project."
2009-04-09 15:34:06 +00:00
Robert Osfield
3a5509b2f9 Converted tabs to four spaces 2009-04-09 15:33:28 +00:00
Robert Osfield
caee4f4d1b From Eric Sokolowsky, "
The osgViewer::CompositeViewer had partial support for Producer Camera
config files, but it was not working completely. Here is the completed
implementation. File: src/osgViewer/CompositeViewer.cpp.
"
2009-04-08 14:16:09 +00:00
Robert Osfield
b233174133 From Eric Sokolowsky,"libosgViewerd.so was not being built properly because it was being
linked with system libraries using LINK_INTERNAL instead of
LINK_EXTERNAL. This caused it to try to link with libXrandrd instead of
libXrandr, which failed. Attached is the fixed CMakeLists.txt."
2009-04-08 13:40:40 +00:00
Robert Osfield
69181e1697 From Eric Sokolowky, ""Running" was spelled "Ruinning", which is hardly the same." 2009-04-08 13:16:44 +00:00
Robert Osfield
39cecd2a72 From Philip Lowman, "Here's the promised cleanup of the OSG's CMakeLists.txt files for the src/ folder. I'll submit the others separately.
Also, there was also a small bug in osgDB's CMakeLists.txt that was causing an error when I tested with CMake 2.4.4.

IF(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
was changed to
IF(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX STREQUAL "quicktime")
"
2009-03-23 16:01:02 +00:00
Robert Osfield
998cfec137 Added View::removeEventHandler(..) method and added check into addEventHandler() to prevent handlers being added twice. 2009-03-11 14:18:30 +00:00
Robert Osfield
c3810e130b Converted tabs to four spaces 2009-03-11 10:34:29 +00:00
Robert Osfield
357d465d49 From Stephan Huber, "refactored the code and moved
some stuff out into DarwinUtils.h/.mm so both implementations can share
some of the code. There's even a bugfix for GraphicsWindowCarbon, which
fixes some issues with multiple windows on different screens."
2009-03-11 10:34:04 +00:00
Robert Osfield
5157f06bcd From Konstantin Matveyev, submitted by Valery Bickov:
"There is error in WoW shader, you can see it by this simple example:
osgviewer cessna.osg --wowvx-42 --clear-color 0,0,0

Clear color may be choosed any with at least one component equals to 0
or 1. In my case I see weird blinking between normal image and image
with depth map at right side on the screen."
2009-03-10 17:47:54 +00:00
Robert Osfield
0669107287 From Roland Smeenk, "While working on the Collada plugin I noticed that all geometry created by the dae reader result in slow path geometry.
Because there already exists the option to convert slow path geometry to the fast path by computing an internal fast path alternative, I added a new optimizer option that automatically does this. To check the results I also made some changes to the statistics gathering and rendering.

Somewhat unrelated, but also part of the optimizer I disabled removal of CameraView nodes during RemoveRedundantNodes optimization.
As discussed on the ML, CameraViews were removed from the scenegraph. This solves that issue.

Summary:
-Geometry::areFastPathsUsed now also looks at internalOptimizedGeometry
-Added Optimize option to make all slow path geometry compute their internal fast path alternative
-Added fast geometry counter to the statistics
-Disabled removel of CameraViews in optimizer
"
2009-03-10 14:15:59 +00:00
Robert Osfield
5059aa808b From Stephan Huber, support for Cocoa windowing under OSX. 2009-03-10 10:13:20 +00:00
Robert Osfield
7473b06275 Preliminary work on general purpose incremental compile support in osgViewer. 2009-03-08 12:00:36 +00:00
Robert Osfield
eef4801ba7 From Roland Smeenk, "Attached is a small bug fix for the redundant messages that are created in OSG applications on windows. GraphicsWindowWin32::setCursor is called every frame from the WM_NCHITTEST message. This will result in a call to ::SetCursor(_currentCursor) every frame, which again causes a WM_MOUSEMOVE to occur. The fix exits GraphicsWindowWin32::setCursor if the requested cursor already is the current cursor.
"
2009-02-27 11:11:06 +00:00
Robert Osfield
abe28296ee From Ralf Habacker, fix to memory leak in GraphicsWindowWin32.cpp. Merged from OSG-2.8 branch using svn command:
svn merge -r 9726:9727 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8
2009-02-09 21:42:45 +00:00
Robert Osfield
f3166c2d96 From Sherman Wilcox, added VS versioning information into libs 2009-02-05 14:55:17 +00:00
Robert Osfield
1153ea5feb Warnings fixes for VS. 2009-02-02 20:35:19 +00:00
Robert Osfield
965b7ddc72 Attempt to appease both FreeBSD CMAke 2.6.2 + Linux CMake 2.4.8 builds 2009-02-02 20:34:58 +00:00
Robert Osfield
e1bdee5338 Improved handling of stats projection size 2009-02-02 17:15:40 +00:00
Robert Osfield
2d55740b3e Refactored osg::TransferFunction1D to use an std::map internally which is kept in sync with the actual osg::Image that is passed to the GPU.
Added .osg support for osg::TransferFunction1D.

Updated wrappers
2009-02-02 14:43:27 +00:00
Robert Osfield
6fda032aa2 Rejigged the Xrandr include 2009-01-31 10:21:36 +00:00
Robert Osfield
7a7c64211c Fixed size of background of frame stats so that it's the correct width of the window 2009-01-30 12:09:06 +00:00
Robert Osfield
66d77e3ebd Fixed the sumation of the the unique number of primtivesets and vertices in the scene Stats collect 2009-01-29 14:41:18 +00:00
Robert Osfield
ef9987559e From Paul Melis, "1) Changes the order of the camera stats slightly, to be more in line with
the view stats
2) Uses a slightly smaller block for view statistics"
2009-01-28 13:45:04 +00:00
Robert Osfield
789c35381d Added check against existing of a valid Stats object in ViewerBase::renderinTraverls() to prevent crash.
Added default View Stats into src/osgViewer/View.cpp to enable stats to be collected for views
2009-01-28 10:06:15 +00:00
Robert Osfield
2b45fd1510 From Paul Melis, "Here is an updated osgViewer::StatsHandler. It has the following changes:
- The text and dark background rectangles are now correctly placed, and
slightly resized here and there.
- All counters (vertices, etc) now use a fixed formatting with 0 digits
precision, to prevent the text from being shown in scientific notation
when the number get large (e.g. 6.34344e+6). I tested with a scene
containing roughly 4 million vertices, to make sure its stats would
display correctly.

I also made slight changes to osgcompositeviewer (attached) to aid in
testing the stats display, specifically displaying of camera and view
names."
2009-01-28 09:31:43 +00:00
Robert Osfield
49fbc56587 From Paul Melis, removed redundent spacing. 2009-01-28 09:24:06 +00:00
Robert Osfield
29157f24d9 Refactored the view stats. 2009-01-27 13:23:20 +00:00
Robert Osfield
48f683ec3f Ported onscreen camera stats across to using thread safe stats collection 2009-01-26 21:23:09 +00:00
Robert Osfield
55a0381687 Moved the XRANDR include into LIB_PRIVATE_HEADERS to avoid FreeBSD build problem 2009-01-26 13:48:50 +00:00
Robert Osfield
1def3b3512 Fixed warnings reported on CDash 2009-01-09 15:09:39 +00:00
Robert Osfield
fa499dc55f From Andy Skinner, fixes for Solaris build 2009-01-09 12:17:40 +00:00
Robert Osfield
b1559ce696 Added handling of when a View isn't yet assigned to a Viewer to avoid associated crash 2009-01-07 14:49:04 +00:00
Robert Osfield
418dc34776 Fixed warnings 2009-01-07 11:24:47 +00:00
Robert Osfield
05cb054140 Added OPTIONAL into INCLUDE(FindPkgConfig) 2008-12-20 12:52:16 +00:00
Robert Osfield
ad01f19db8 Removed debug message 2008-12-19 18:02:18 +00:00
Robert Osfield
2cc53e2256 Moved main setSceneData methods in osgViewer::View::setSceneData() 2008-12-19 17:50:58 +00:00
Robert Osfield
502eced994 From Jean-Sebastein Guay, I recently had to reimplement screen capture functionality into our framework (which was broken since the switch from OSG 1.2 to 2.2 over a year and a half ago). I used the ScreenCaptureHandler which I had contributed right before OSG 2.6 shipped, bit I had to trigger the screen capture programatically instead of by a key press in some cases, so I added a convenience method to do that.
It's a minimal change, it just calls an already existing protected method. It was trivial to subclass the handler to do it in our code, but pushing the change into OSG makes sense as it's generally useful to have it in the handler itself.

I also noticed that the handle() method was overridden from osgGA::GUIEventHandler but wasn't marked virtual. It wasn't intended that subclasses not be able to override it in turn, so I've added the keyword.""
2008-12-19 17:15:10 +00:00
Robert Osfield
288e1853b9 Fixed warnings 2008-12-17 17:11:13 +00:00
Robert Osfield
8a6e04b84d Introduce NodeVisitor::className and libraryName() 2008-12-17 12:13:15 +00:00
Robert Osfield
3313327ab4 From Bob Kuehne, build fixes. 2008-12-16 19:49:09 +00:00
Robert Osfield
4511281f04 From Sukender and Robert Osfield, introduced GraphicsContext::ScreenSettings & WindowingSystemInterface::enumerateScreenSettings. 2008-12-16 15:08:04 +00:00
Robert Osfield
8e49efd496 From Tatsuhiro Nishioka, "I found a bug in GraphicsWindowCarbon.
GraphicsWindowCarbon::requestWarpPointer() places the mouse pointer in a (global?) display coordination, but it must be in a local window coordination. This problem is critical because the mouse cursor can go off a window especially when you place the window on the secondary screen.

Attached is the file to fix this problem.

I tested this modified file with the following situations (on FlightGear) and all works fine.
- two windows on two screens (each has one window).
- two windows on two screens (secondary screen has all windows).
- two windows on two screens (primary screen has all windows).

In all scenarios, warp requests (by right-click the mouse) successfully moves the mouse pointer to the center of the main window,
and it is what it's supposed to be in the flightgear."
2008-12-15 20:38:40 +00:00
Robert Osfield
315aeeb557 Where possible moved redundent C header includes from headers to source files 2008-12-12 18:47:30 +00:00
Robert Osfield
97cd954c01 Changed the libopenscenegraph-core to be part of libopenscenegraph, and
changed libopenscenegraph-examples to be part of openscenegraph-examples
2008-12-12 14:54:22 +00:00
Robert Osfield
946175385f From Ulrich Hertlein, Typo fixes + "optional parameter to RecordCameraPathHandler to control the frame rate for record/playback. Default is 25.0, the environment variable takes preference if set." 2008-12-12 13:41:39 +00:00
Robert Osfield
55fe4967ad From Mattias Helsing, "I have developed the earlier cpack example a bit. Perhaps you could
consider these initial cpack support scripts. It is hidden behind a
BUILD_PACKAGES option so won't affect the normal user. The submission
1) set the COMPONENT attribute on all cmake install commands.
COMPONENT names are according to
http://www.openscenegraph.org/projects/osg/wiki/Community/Packaging

2) provide cmake script and a template for creating CPack
configuration files. It will generate target for creating packages
with everything that gets "installed" (make package on unx, project
PACKAGE in MSVC) plus targets for generating one package per COMPONENT
(i.e. libopenscenegraph-core etc.).

I have temporariliy uploaded some examples to
http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing

If this submission makes it into svn we can develop it to generate
rpms, installers for windows and mac (I know at least J-S don't like
these but there may be others who do ;) and even DEBs (not sure if we
can make them "ubuntu-ready" but they eventually may - at least we
could put a deb on the website)"
2008-12-12 11:01:09 +00:00
Robert Osfield
5363736caa Refactored computeIntersections() float x,float y, const osg::NodePath& nodePath. 2008-12-10 11:12:37 +00:00