Commit Graph

8766 Commits

Author SHA1 Message Date
Robert Osfield
3b192f5119 Added checked from the ARG version of glDraw*Instanced(). 2009-01-08 11:19:21 +00:00
Robert Osfield
8418e3cb40 Removed inappropriate file 2009-01-08 11:18:54 +00:00
Robert Osfield
95ebf1fe71 From Andy Skinner, "I added a const_cast for a call to atomic_cas_ptr, which takes a void* and has been given a const void* const." 2009-01-08 11:16:56 +00:00
Robert Osfield
5275c11d06 From Blasius Czink, "It seems there is no atomic_xor_uint_nv(). I
attached a changed version of the Atomic header where a mutex fallback
is used for "xor" on solaris."
2009-01-08 11:15:14 +00:00
Robert Osfield
46eeac4514 Moved supression of VS warning C4706 from the include/osg/Export header into the CMake options list. Added suppression of C4127 as well. 2009-01-08 10:34:05 +00:00
Robert Osfield
fb75c50714 Fixed assingment operator 2009-01-07 15:35:28 +00:00
Robert Osfield
4add5f6fd1 Added supression VS warning "C4706: assignment within conditional expression" thanks gets spat out even for perfectly valid if ((variable=expression)) {} usage. 2009-01-07 15:33:24 +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
536384457a Updated wrappers 2009-01-07 13:16:38 +00:00
Robert Osfield
6bf59ffae9 Fixed warnings 2009-01-07 12:27:45 +00:00
Robert Osfield
418dc34776 Fixed warnings 2009-01-07 11:24:47 +00:00
Robert Osfield
98bd058317 Fixed warnings 2009-01-07 10:32:59 +00:00
Robert Osfield
85c510ba27 Added a protected = operator 2009-01-07 09:49:49 +00:00
Robert Osfield
8745ec7d69 Removed the usage of assert to prevent associated compile warnings and to clean up code 2009-01-06 19:09:50 +00:00
Robert Osfield
5bf69c9cbb Updated path to reflect where the new button images are located. 2009-01-06 19:08:34 +00:00
Robert Osfield
1d599c0572 From Don Leich, "Here are a couple of fixes for the file examples/osgviewerQT/QOSGWidget.cpp to
address some OS X issues.  Most of these fixes were previously submitted by Julian Scheid.  However, this patch however should not break the example for non-OS X builds and has been tested on 64-bit Linux as well as Mac OS X 10.5.

o  The value returned by QWidget::winId() is not usable as input for
WindowData under OS X the way it is for both Windows and Unix.  Julian's fix
for this uses the Carbon API.  Since the fix for X11 in unknown, it is now
assumed that OSG has been built with OSG_WINDOWING_SYSTEM='Carbon' for this
example to work at all when running under OS X.

o  The CompositeViewer version would hang on exit with the original timer start
argument.  Changing the argument value to match the non-composite version
seemed to cure the hanging.

o  Julian's patch altered the setGeometry position to 30/30 in order to see any
window decorations.  I did not have this problem, but left his changes intact.

o  The non-composite viewer needed it's camera initialization defered until
after the ViewerQOSG's Qt base class had been initialized.  Otherwise, the view
did not cover the entire window.
"
2009-01-06 16:45:35 +00:00
Robert Osfield
dee703a6f3 From Ewe Woesnner, "the Inventor loader crashes when a texture could not be loaded.
Please find attached a small fix which solves this issue."
2009-01-06 16:35:38 +00:00
Robert Osfield
ec457e34c3 From Sergey Leontyev, "Some minor(but important) bug fixes for osgWidget:
1. In WindowManager.cpp childRemoved method the second parameter "end" is misleading and

should be named "numChildren" instead. It represents how many children to remove.  As a result, the method was implemented incorrectly and failed to remove UI objects. So I fixed it.

 

replaced this:

 

void WindowManager::childRemoved(unsigned int start, unsigned int end) {
    while(start < end) {
        Window* window = getByIndex(start);

        if(!window) continue;

        if(_remove(window)) {
            window->_index = -1;

            window->unmanaged(this);
        }

        start++;
    }
}

 

with this:

void WindowManager::childRemoved(unsigned int start, unsigned int numChildren) {
 for (unsigned int i = start; i < start+numChildren; i++)
 {
  Window* window = getByIndex(i);

  if(!window) continue;

  if(_remove(window)) {
   window->_index = -1;

   window->unmanaged(this);
  }
 }
}

 

2. in Input.cpp

 

The cursor in Input did not get positioned correctly, probably as a left over from the TOP LEFT origin system which is now BOTTOM LEFT.

in method positioned()

replaced this:

    _cursor->setOrigin(x + xoffset + 1.0f, y - _cursor->getHeight() + 1.0f);

 

with this:

    _cursor->setOrigin(x + xoffset + 1.0f, y + 1.0f);

 

Now it is placed correctly.

 "
2009-01-06 16:16:03 +00:00
Robert Osfield
5a6a3f1edd Updated wrappers 2009-01-06 15:41:29 +00:00
Robert Osfield
af7bb82175 From Paul Martz, example demonstating new draw instanced primitive funcitonality. 2009-01-06 15:11:54 +00:00
Robert Osfield
4f3b1baee4 Added support for primitive instancing 2009-01-06 14:55:49 +00:00
Robert Osfield
9bd7fa7e6e From Jean-Sebastien Guay, changed VS aggressive warnings setting to just /W4. 2009-01-05 18:07:31 +00:00
Robert Osfield
3ddafa1078 From Don Leich, build fix for OSX. 2009-01-05 17:52:41 +00:00
Robert Osfield
20cb9625ea From Jason Beverage, "I thought about the issue I was having with the CURL plugin automatically trying to download all filenames with URL's rather than passing the full URL to the plugin. It turns out the solution was pretty simple.
I've made a small change to Registry.cpp that puts the CURL logic AFTER the URL has been passed to the plugin rather than assuming all URL's need to be downloaded by the CURL plugin.  This way, plugins can have first crack at the URL's, and if they don't handle it the previous CURL behavior kicks in."
2009-01-05 17:35:26 +00:00
Robert Osfield
910927145e From Paul Martz, added --points option for forcing points rendering of polygonal models 2009-01-05 17:06:09 +00:00
Robert Osfield
85fffc2e76 From Roland Smeenk, "Attached you will find an improved Collada plugin to properly support camera's.
A Collada camera will be added to the scenegraph as osg::CameraView. This allows the user to create a set of predefined camera viewpoints. I also added a new MatrixManipulator to osgGA called CameraViewSwitchManipulator and added usage of this to the osgviewer example. This manipulator allows switching between the predefined camera viewpoints. The current design limition I ran into is that a MatrixManipulator only manipulates the ViewMatrix, but for this particular  manipulator I also want to update the projectionMatrix of the camera when switching to a new viewpoint. This is not implemented because I don't know what would be the best way to design it. Any ideas?
 
Furthermore Collada also supports orthographic camera's, where an osg::CameraView only supports a perspective camera. Would it be useful to create a CameraView with customizable optics for this?"
2009-01-05 16:53:29 +00:00
Robert Osfield
1a600c1178 Updated wrappers 2009-01-05 12:21:58 +00:00
Robert Osfield
375253ae8a From Paul Martz, Correction to Timer method comment. 2009-01-05 11:58:08 +00:00
Robert Osfield
c8752d6c18 From Cedric Pinson, added non const getText() method 2009-01-05 11:31:38 +00:00
Robert Osfield
cedffd3adb Introduced osgVolume::Layer and Locator classes mirrroring similar classes in osgTerrain. 2009-01-05 11:26:26 +00:00
Robert Osfield
788bead9fe Change the aggressive warning level under VS to /W3 2009-01-05 10:13:04 +00:00
Robert Osfield
4f91d9769e Fixed warning 2008-12-24 11:05:22 +00:00
Robert Osfield
1697eb526d Fixed warnings 2008-12-24 10:30:21 +00:00
Robert Osfield
a9602c6906 Made aggressive warnings the default. 2008-12-22 21:17:03 +00:00
Robert Osfield
c0b696ba52 Fixed warnings 2008-12-22 21:16:40 +00:00
Robert Osfield
21b633e73b Build fix 2008-12-22 18:30:52 +00:00
Robert Osfield
0d5194bfd4 From Paul Martz, "Typing "osgconv" alone displays the --help family of options, as it should, but it also displays info about --formats and --plugins, which seems out of place because no other options are mentioned here.
The code changes osgconv so that "osgconv --help" displays help info about --formats and --plugins, plus it also displays documentation for --format and --plugin, which were previously missing."
2008-12-22 08:26:16 +00:00
Robert Osfield
f4c26f9cc8 Changed VolumeTile::setImage(Image*) to setImage(uint i, Image*) to allow multiple images to be attached to single tile 2008-12-21 20:42:29 +00:00
Robert Osfield
adced97dcd From Mattias Helsing, "Replace the IF(POLICY CMP0008) with an absolute version check for
cmake > 2.6.0.
The POLICY keyword is only valid starting with cmake-2.4.7 so using it
broke cmake 2.4.5/6 support."
2008-12-21 20:24:56 +00:00
Robert Osfield
adb7a49c10 Renamed osgVolume::Brick to osgVolume::VolumeTile 2008-12-20 20:55:21 +00:00
Robert Osfield
f0270f934e Changed the scale from 0.03 to 0.0254 as the Q3 bsp files are in inches. 2008-12-20 20:30:08 +00:00
Robert Osfield
28ca8277f8 From Jason Daly, "'ve been busy working on the Source engine plugins. There are several contributions in this submission:
osgDB/FileUtils.cpp:
Needed this extra code to allow a true case-insensitive search.  This is because the HL2 map and model files are often sloppy with case.  For example, the file might look for materials/models/alyx/alyx_sheet.vtf, but the file is actually in materials/Models/Alyx/alyx_sheet.vtf.  In case-insensitive mode, the new code recursively disassembles the path and checks each path element without regard to case.  In case-sensitive mode, the code behaves exactly as it used to.  The new code is also mostly skipped on Windows because of the case-insensitive file system.  Previously, I did all of this with custom search code in the .bsp plugin, but this allows the user to tailor the search using OSGFILEPATH.  There are some instructions in the plugins' README files about this.

osgPlugins/mdl:
This is a new plug-in for Half-Life 2 models (as opposed to maps).  This allows you to load Source models individually, as well as allowing the .bsp plugin to load models (props) that are embedded into maps.  Mdl files can contain simple object (crates, barrels, bottles), as well as fully articulated characters with skeletal animations.  Currently, it can load the simple objects.  It can also load the characters, but it can't load the skeletons or animations.

osgPlugins/bsp:
This contains all of the changes needed to load props along with the basic map geometry.  There are also
several bugs fixed.

osgPlugins/vtf:
This is the loader for Valve's texture format.  Previously, we had agreed to put this in with the bsp plugin, but I didn't think of the .mdl plugin at that time.  It's conceivable that a user might want to load models individually (not as part of a map), so the vtf reader does have to be separate.  I also fixed a rather significant bug.

I tested all of this code on RHEL 5.2 (32-bit), and Fedora 9 (64-bit).  I'll be testing on Windows soon.

I also attached a simple .mdl file, along with it's associated files and textures.  Just extract the tarball into it's own directory, set your OSGFILEPATH to point at that directory, and load the model like this:

 osgviewer models/props_junk/gascan001a.mdl"
2008-12-20 13:35:49 +00:00
Robert Osfield
05cb054140 Added OPTIONAL into INCLUDE(FindPkgConfig) 2008-12-20 12:52:16 +00:00
Robert Osfield
03285f5fe1 Updated ChangeLog for 2.7.8 dev release 2008-12-19 19:04:45 +00:00
Robert Osfield
ddc221ecc7 Added osgversion into dynamic build path 2008-12-19 18:37:23 +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
de53ed75f4 Updated wrappers 2008-12-19 17:15:56 +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
767096631a Fixed warning 2008-12-19 16:59:10 +00:00