Commit Graph

4933 Commits

Author SHA1 Message Date
Robert Osfield
4ab22a405b Updated wrappers 2007-12-11 17:01:53 +00:00
Robert Osfield
32e520d5a1 From Brede Johnansen, support for continuation records. 2007-12-11 16:42:10 +00:00
Robert Osfield
be5f709bdb From Mike Garrity, "There was an on again/off again thread on OSG users about
creating subclasses of osg::Array that referenced data
stored an application's internal data structures. I took
a stab at implementing that and ran into a couple of
downcasts in Geometry.cpp. Enclosed is my take at fixing
those along with a simple example of how to do this."
2007-12-11 15:55:02 +00:00
Robert Osfield
669e86145c Added missing copyright notices 2007-12-11 14:48:51 +00:00
Robert Osfield
f779c3a71a From Mathias Froehlich, "Attached is a change to the PBuffer initialsation code that checks for the GLX
version before issuing commands that require GLX-1.3.

This prevents a crash with open source drivers on linux.
"
2007-12-11 14:39:15 +00:00
Robert Osfield
8062406d54 From Roger James, "The changes are as follows:-
1. DAE object no longer held onto by plugin.
2. Filename to URI conversion now handled internally by plugin.
2. User can supply an external DAE object for use by the plugin.
3. User can supply a std:string object for the plugin to return the URI of
the document just processed.
4. User can supply a std::string to receive the unit name information from
the document just read in. (e.g. meters, inches, etc.)
5. User can supply a float to receive the metric conversion factor from the
document just read in.
6. User can supply an enum to receive the up axis orientation information
from the document just read in.
7. Material transparency can be both read and written.
8. User can supply an experimental GoogleMode option on output. The plugin
will try to emulate the way Sketchup specifies transparency (i.e. the
inverse of what it should be!). I am still struggling to get GE to
understand transparency, anyone know what it expects?
9. Rudimentary support for Collada effect parameters (newparam, setparam,
param) on input. Basic nVidia FX Composer dae documents can now be read.

"
2007-12-11 14:06:45 +00:00
Robert Osfield
3341c42873 Updated wrappers 2007-12-11 12:35:10 +00:00
Robert Osfield
640999dea6 From Tim More, "This submission tries to optimize redundant compilation of StateSets and Drawables
in the DatabasePager. The practical effects of these are to greatly reduce startup time
and the time to load an individual scenery tile in FlightGear.

- From my log message:

   Minimize the number of StateSets and drawables that are compiled by checking
   if they have already been compiled or will be elminated by the
   SharedStateManager.

   Move the sorting of the dataToCompile queue out of compileGLObjects
   into the man pager run function.

   Change the SharedStateManager to use maps instead of vectors."
2007-12-11 12:32:31 +00:00
Robert Osfield
42723fec8f From Joseph Steel, "he change is to initializeExtensionProcs() to
verify the version of the OpenGL implementation before attempting to get the
MaxTextureCoords parameter."
2007-12-11 11:57:32 +00:00
Robert Osfield
880682f138 From Mathias Froelich, "I have cleaned up the state set handling of the osg::ClipNode.
Previously the complete StateSet was cleared, even the non clipping releted
state attributes and modes in this stateset on a call to
setLocalSetateSetModes.
With this change only those modes/attributes are changed that need to be
changed. That is, if a clip plane is removed from the ClipNode, only this
assiciated mode is removed from the state set, instead of throwing away the
whole state set.

In this way we have less surprising results if the state set of a clip node is
used for more state than just the clip state.
"
2007-12-11 11:55:15 +00:00
Robert Osfield
298e07fc72 From Mathias Froechlich, "I have extended the StateSet api with a
StateSet::removeAssociatedModes(const StateAttribute*)

and a

StateSet::removeAssociatedTextureModes(unsigned, const StateAttribute*)

call. These funktions are just missing for a complete api IMO."
2007-12-11 11:42:02 +00:00
Robert Osfield
4e5ce63c85 From Per Fahlberg, "Attached is a fix allowing removal of shaders from a program after it is
first compiled. It will also allow new shaders to be attached after the
program is first compiled."
2007-12-11 11:21:13 +00:00
Robert Osfield
62bba8e52b From Sherman Wilcox, "In ESRIShapeParser.cpp, wasn't closing the file handle. Added:
if(fd)
   {
     close(fd);
     fd = 0;
   }


to the constructor."
2007-12-10 20:56:26 +00:00
Robert Osfield
aa24c273c7 Updated wrappers 2007-12-10 20:35:50 +00:00
Robert Osfield
c43606e3fe From Richard Schmidt, fix on ordering to be standard OpenGL way. 2007-12-10 20:33:22 +00:00
Robert Osfield
c5704586f9 From Richard Schmidt, "attached you will find a set of small fixes and features.
CullVisitor/SceneView:

*Feature: This version supports multiple clearnodes in the graph, one per renderstage.

 

Text:

*Feature: Performance Enhancement when calling SetBackdropColor

 

Material:

*Fix: OpenGL calls are now made according to the OpenGL Standard

"
2007-12-10 20:30:05 +00:00
Robert Osfield
9d260213f7 From Ulrich Hertlein, "attached are some fixes and tweaks I made to the .obj loader:
- Material class contained both 'shininess' and 'Ns' member variables
- 'Ns' and 'Ni' are initialized to 0 ('Ni' is unused at the moment)
- only 'Ns' was read from .mtl file but 'shininess' was used for osg::Material
- 'illum' was read from .mtl file but never used; it is now used as follows
-- illum==0 -> no osg::Material created/attached therefore no lighting
-- illum==1 -> osg::Material specular is set to black
-- illum==2 (default) -> specular read from .mtl file is used
- 'map_Kd' and 'map_Ks' may contain additional arguments (e.g. '-s 1 1 1'),
these are now skipped over and the texture filename is properly extracted
"
2007-12-10 20:27:06 +00:00
Robert Osfield
d0cc647986 From David Callu, IO support for Text3D 2007-12-10 19:51:33 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
1dcb6cc4fd Updated wrappers 2007-12-10 16:21:13 +00:00
Robert Osfield
f69a48e552 From David Callu, added support of 3D text to osgText and associated plugins. 2007-12-10 15:15:56 +00:00
Robert Osfield
9b56dbe83a From David Callu, added support for automatically reading associate dbase files 2007-12-10 12:45:16 +00:00
Robert Osfield
13ff9f28d5 Char char[] to char* with new allocation. 2007-12-10 12:00:09 +00:00
Robert Osfield
695df58bc9 Refactored record allocation to fix build errors under Windows. 2007-12-10 11:34:00 +00:00
Robert Osfield
0c4648e027 Added include<string.h> to fix compile errors under gcc 4.3 2007-12-10 10:16:13 +00:00
Robert Osfield
8648cd12ea From Gustavo Wagner, fixed bugs in reading M records from shapefile 2007-12-09 16:38:33 +00:00
Robert Osfield
e2ad20a887 From Gino van den Bergen, "I've added the following features to the OSG VRML plugin:
* Support for Box, Sphere, Cone, and Cylinder. These nodes are converted
to osg::Geometry conform the VRML97 spec.
* Backface culling is enabled/disabled according to the "solid" flag for
geometries that are converted from IndexFaceSets.
* PROTO instances can now be used for "appearance" and "geometry" fields
in a Shape node.

The file ReaderWriterVRML2.cpp is adapted for the latest stable public
release:

http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.2.0

The changes where needed for being able to read VRML file which are
output by VMD (http://www.ks.uiuc.edu/Research/vmd/). A sample VRML file
is enclosed in this submission.

The plugin has been tested against a number of VRML samples that include
texturing. The texturing is found to be VRML97 compliant for all added
geometry nodes.
"
2007-12-09 16:29:18 +00:00
Robert Osfield
457d3fd7e4 Removed redundent OpenFlightOptimizer 2007-12-09 16:23:19 +00:00
Robert Osfield
df2f9f5f7c From Ralf Karn, fixed "invalid enumerant" warning on TEXTURE_2D_ARRAY_EXT initialization 2007-12-09 16:14:07 +00:00
Robert Osfield
6ff9810be1 From Mihai Radu, "After someone asked for a fix for non-textured object appearing black
with the shader for textured objects. This works very well in cases
where there could be a mix of textured and non-textured objects in the
scene, and it makes the initialization more robust.
The idea is from PSSM, to add a 1pixel texture to the main rendering  as
to provide white for any objects missing textures."
2007-12-09 16:06:14 +00:00
Robert Osfield
2be3992a2f Updated wrappers 2007-12-09 16:01:29 +00:00
Robert Osfield
78c1fd4844 From David Callu, added DBase attribute support for shapefiles 2007-12-09 15:43:49 +00:00
Robert Osfield
5e6bab7de1 Updated wrappers 2007-12-09 14:54:02 +00:00
Robert Osfield
a45d7fdee4 From Aderian Egli, changed the window dimension clamping code to work independantly for width and height. 2007-12-09 12:19:06 +00:00
Robert Osfield
a0c2349438 From Mario Guimaraes, "Currently, in the StateSet::merge method, the rhs state attributes and
modes are not merged into the lhs state when the rhs is PROTECTED. The
changes I'm providing here address this problem."
2007-12-08 17:10:07 +00:00
Robert Osfield
fb65fc5e0a From Serge Lages, "Hi Robert,
You were right about the CMAKE_MODULE_LINKER_FLAGS option for CMake, so here is a modification allowing to not generate the manifest files for the plugins making them a lot more easy to redistribute. I have also made the same modification to the wrappers as they are also put into the osgPlugin folder when generated.
"
2007-12-08 17:04:52 +00:00
Robert Osfield
2d4ef642e6 from Paul Matz, "Understood. Well, I think it's reasonable to assume that the non-env var
case is the more tested case, and therefore it is correct to set
_supportsVertexBufferObjects to the same value as _fastPath. So here's a
change that does the same thing for the env var case."
2007-12-08 17:00:38 +00:00
Robert Osfield
f2d59416aa From Jeremy Moles, Anders Backman and Robert Osfield,
both Jeremy and Anders added static build support as an option, but one was
for Unix and one for Windowsm, but the two mods were also inconsitent in naming
and implementation.  I have had a bash at merging them both, but don't know yet
if these changes will work yet on either configuration... user testing will tell...
2007-12-08 16:52:27 +00:00
Robert Osfield
65bef96a6e From Peter Hrenka, "Due to popular demand I would like to submit this
enhanced version of PolytopeIntersector.


New features of PolytopeIntersector :

* Dimension mask: The user may specify the dimensions of the
   primitives to be tested. Checking polytope-triangle and
   polytope-quad intersections is rather slow so this can
   be turned off.
* Reference plane: The resulting intersections are sorted
   by the distance to this plane.

New memebers of PolytopeIntersector::Intersection :

* distance: Distance of localIntersectionPoint to the reference plane
* maxDistance: Maximum distance of all intersectionPoints to the
   reference plane.
* intersectionPoints: The points intersecting the planes of the polytope
   or points completely inside the polytope.
* localIntersectionPoint: arithmetic mean of all intersection points
* primitiveIndex: Index of the primitive that intersected


I added some more output to the example osgkeyboardmouse."
2007-12-08 16:37:05 +00:00
Robert Osfield
e7fbacc3b6 From Daniel Larimer, "There was a error with QTUtils.h when compiling on HFS case-sensitive
file system.  The #include<Quicktime/Quicktime.h> line needs to be
replaced with #include<QuickTime/QuickTime.h"
2007-12-08 15:32:16 +00:00
Robert Osfield
5fe9da12c9 From Neil Hughes, "Please find attached a replacement for the 3DS pluggin's ReaderWriter3DS.cpp file. This contains a minor fix (one line added) to ensure that the OSG Material structure is given the name of the material definition within a loaded 3DS file.
"
2007-12-08 15:27:29 +00:00
Robert Osfield
cdb9a0baec From Donald Cipperly, Fixed memory leak in computeIntersections 2007-12-08 15:08:32 +00:00
Robert Osfield
13e8af6305 From Robert Osfield and Richard Schmidt, made fixes inspired by an original submission from Richard which
highlighted problems with Light, ClipPlane and Hint usage in osg::State's usage of cloneType
and reassignment of target/num in StateSet/these StateAttributes.
2007-12-08 13:29:31 +00:00
Robert Osfield
ede9b4ff6b From David Callu, added IO_FluidProgram implementation. 2007-12-08 12:12:05 +00:00
Robert Osfield
71f71f18b6 Added an #include<assert.h> to avoid compile problems on some systems. 2007-12-07 13:42:14 +00:00
Robert Osfield
ab7043ea45 From Tony Horrobin, "Attached is a small fix for the openflight loader with regard to road
segment and construction records.

It just uses the id field to set the name of the osg node as with other
types."
2007-12-07 13:28:02 +00:00
Robert Osfield
4c217b0d1c From Paul Martz, minor typo fixes in notify messages 2007-12-07 13:19:53 +00:00
Robert Osfield
5906e0861c From Farshid Lashkari, "The bmp writer crashes in certain cases. It happens when the computed
size of the image data is greater than the actual image size. This
causes the memcpy call to go out of the array bounds. I modified the
code so that it copies the data during the iteration, instead of
memcpy'ing. This fixes the problems i was having.

If you are curious, the writer was crashing when trying to write an
RGB image that was 2050 x 1280. You might be able to reproduce it by
allocating an empty image of that size and writing it to a file."
2007-12-06 17:44:56 +00:00
Robert Osfield
c07598dc39 From Hautio Jari, "Current version of GraphicsWindowWin32 allows resize to zero height
window. This breaks rendering in for example MFC SDI applications and in
MFC MDI applications if user resizes the window so that client area has
zero height. Current safeguard for minimized window:

LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT
uMsg, WPARAM wParam, LPARAM lParam )
...
       /////////////////
       case WM_MOVE    :
       case WM_SIZE    :
       /////////////////
...
               if (clientRect.bottom==0 && clientRect.right==0)
...

does not cover this situation. In these situations clientRect.bottom = 0
and clientRect.right > 0.

Quick fix to this is relax condition:
               if (clientRect.bottom==0 || clientRect.right==0)

Modified file is attached.

Tested with osgviewerMFC from 2.2.0 release (Windows XP sp2)

Before fix:
 - execute from command line osgviewerMFC.exe cow.osg.
 - the cow is rendered nicely.
 - resize window to zero height by dragging from bottom border upwards.
 - resize window back to original height
 - just blue screen, no cow

After fix:
 - execute from command line osgviewerMFC.exe cow.osg.
 - the cow is rendered nicely.
 - resize window to zero height by dragging from bottom border upwards.
 - resize window back to original height
 - the cow is where it is supposed to be.
"
2007-12-06 17:41:20 +00:00
Robert Osfield
b7881943d4 From Serge Lages, "Here are some modifications to the DatabasePager, with the possibility to :
- Get or set the target number of PagedLOD children to remove per frame.
- Get or set the minimum number of inactive PagedLOD to keep.

Corresponding environment variables have been added too.
The default values reproduce the previous DatabasePager behavior."
2007-12-06 17:31:00 +00:00
Robert Osfield
6c09a22957 From Cedric Pinson, fixes for toggle fullscreen on gnome desktop 2007-12-06 17:28:29 +00:00
Robert Osfield
49db32ca3f From Mathias Froehlich, "Add missing includes. Fails on hp-ux." 2007-12-06 17:03:47 +00:00
Robert Osfield
6e095c4e60 From Wojiech Leandowski, fixed the hardwiring of archive extensions to 4 charaters 2007-12-06 16:50:43 +00:00
Robert Osfield
8954309c07 Fixed crash in cfg by rearranging the code blocks so the codes that use the graphics context are only called when a graphics context is successfully aquired. 2007-12-06 10:04:25 +00:00
Robert Osfield
abe647fdaa From Ulrich Hertlein, added osgViewer dependency for OSX build 2007-12-06 09:22:41 +00:00
Robert Osfield
9fbec36508 Changed WIN32 guard to _WIN32_IMPLEMENTATION to attempt to avoid Win32 build error 2007-12-05 18:32:15 +00:00
Robert Osfield
0bfdc78f52 Removed debugging line. 2007-12-05 11:29:58 +00:00
Robert Osfield
b164c5e7a6 From Cedric Pinson, first cut at Producer .cfg camera configuration file support. 2007-12-05 11:23:27 +00:00
Robert Osfield
1b1c5bbdd1 Added support for new double Vec*Array classes in various functors. 2007-12-04 14:46:46 +00:00
Robert Osfield
8a4caa0a59 Added optional double support via new Vec3dArray support in osg::Geometry.
To enable double usage set the option string "double" i.e.

  osgviewer myshapefile.shf -O "double"
2007-12-04 14:46:08 +00:00
Robert Osfield
2e821b77a2 Added support for double Vec*Array objects 2007-12-04 14:44:49 +00:00
Robert Osfield
a909a62b85 Added double Vec*Array support 2007-12-04 14:44:21 +00:00
Robert Osfield
da9b845558 Added a check against the makeCurrent() return type to make sure that OpenGL
calls are only made if the makeCurrent() is successful.
2007-11-21 10:18:10 +00:00
Robert Osfield
592d0dfc5b Added support for filename only setup of CompositeLayer on reading/writing. 2007-11-13 17:03:36 +00:00
Robert Osfield
94c57ecff5 From Colin Dunlop, added missing header (note from Robert Osfield, this submission was extracted from an inline submission so may be prone to errors). 2007-11-08 10:30:23 +00:00
Robert Osfield
043ed14ba9 From Colin Dunlop, add live video stream support 2007-11-06 12:07:23 +00:00
Robert Osfield
2e2ddba49e Added support for setting volume in xine plugin, manual adjustment of volume
in osgmove example, and clamping to 0 to 1.0 range in quicktime plugin
2007-11-04 16:08:05 +00:00
Robert Osfield
6f47d924d6 Changed the include definition so that it works under Cygwin. 2007-11-04 15:21:48 +00:00
Robert Osfield
6ad176042c Fixed bug in addSlave 2007-11-03 10:32:18 +00:00
Robert Osfield
b7a26ae56a Changed the spherical display intensity map set up to use colours rather than
a second texture unit.
2007-10-31 12:55:59 +00:00
Robert Osfield
316b36fab7 Added getColor method to allow easy reading of individual pixels. 2007-10-31 12:55:15 +00:00
Robert Osfield
c761efb371 Fixed wrap mode for panoramic display. 2007-10-31 11:06:33 +00:00
Robert Osfield
072cd1df8f Changed debug message from NOTICE to INFO. 2007-10-30 14:17:34 +00:00
Robert Osfield
3dced3445f Fixed the capitilization of the osgdb_osgfx plugin 2007-10-25 09:00:25 +00:00
Robert Osfield
8b46a624c2 Fixed errors is setup of VBO/EBO's. 2007-10-19 09:58:11 +00:00
Robert Osfield
cc2a0290a4 Fix for setting scene data after slaves have been added. 2007-10-19 08:42:44 +00:00
Robert Osfield
60052a0488 Fixed getOrCreateVertexBufferObject(). 2007-10-19 08:39:07 +00:00
Robert Osfield
aaceb957bc Removed redundent X11/Intrinsic include 2007-10-17 19:01:18 +00:00
Robert Osfield
791035c4e6 Added flv to accepted list video format for the quicktime and xine-lib plugins 2007-10-16 19:04:10 +00:00
Robert Osfield
ef4198dff5 Added flv to accepted list of formats 2007-10-16 19:03:43 +00:00
Robert Osfield
57f961ff2e Added flv to the list of accepted movie types 2007-10-16 19:01:25 +00:00
Robert Osfield
a5f37a23e2 From Andy Skinner, build fixes for Solaris. 2007-10-05 09:10:04 +00:00
Robert Osfield
b62716d679 Added asView() method to GUIActionAdapter to help out with .NET wrappers. Updated wrappers 2007-10-04 11:20:18 +00:00
Robert Osfield
a7c67fe287 From Trajce Nikolov, added support for extract a region for geospatial imagery 2007-10-04 08:54:41 +00:00
Robert Osfield
cf5f000ea1 From Panagiotis Papadakos, "Setting the maximum height of osgText doen't seem to work. If the text is
big enough, it exceeds the height that I gave as input to
setMaximumHeight. So check if cursor is out of -_maximumHeight."
2007-10-03 23:03:13 +00:00
Robert Osfield
38542c3986 Removed double return error 2007-10-03 19:54:30 +00:00
Robert Osfield
b3ecb8f38f From Mahai Radu, improvements to handling of spotlights 2007-10-03 12:48:23 +00:00
Robert Osfield
c40f395e22 Refactored the plugin and library naming to fix Cygwin plugin loaded issues. 2007-10-03 12:04:47 +00:00
Robert Osfield
e928efc7a4 From Alberto Luaces, build fix for Cygwin. 2007-10-03 10:36:59 +00:00
Robert Osfield
90eaf41007 Added return 0 to fix warning 2007-10-03 08:34:51 +00:00
Robert Osfield
f0da77042a Updated wrappers 2007-10-02 21:45:55 +00:00
Robert Osfield
1dc06b4553 From Mihair Radu, "Most of the additions are small utility methods:
- set the resolution of the shadow map; it calls dirty() to
re-initialize at next update
- keep a list of Shader objects to use instead of the default ones, if
the list is empty, the default shaders are used
- explicitly create the Uniform variables, so that subsequent additions
that require more Uniforms can put them in a central place
- set a Light or LightSource to use explicitly for shadow casting,
allows multiple lights in the scene, with one casting shadows

There are two additions that do not ( yet ) function correctly, but in
the present usage they do not interfere with the regular usage of the
techique:
- support for using spotlights, it's using Light.spotCutoff to determine
if it's a spot-light and not point-light,
   there is an error in the setup of either the shadow camera or the
texgen, most likely due to the direction of the spotlight, since the
position is being used just like in point or directional lights.
- creation of a debugHUD
   the hud is created properly, ( the example included shows it ), but
it displays only white, there has been some discussion of displaying the
shadow map, but I could not find it, the addition of a simple fragment
shader with the appropriate color transform should get this going."
2007-10-02 21:45:09 +00:00
Robert Osfield
3b3776df85 Updated wrappers 2007-10-02 21:28:27 +00:00
Robert Osfield
55d5a4d28a Introduced a OSG_PLUGIN_PREFIX variable into CMake build system with it set to
"" for all platforms except Cygwin where its set to "cygwin_" and Mingw where
it is set to "mingw_".  Updated osgDB::Registry to look for these for the plugins.
Updated the osgintrospection example to search for these names as well.
2007-10-02 21:26:22 +00:00
Robert Osfield
caeed02f52 Merged the threading set up and rendering code from Viewer and CompositeViewer
into ViewerBase to allow CompositeViewer to inherit the same theading models
previously just supported by osgViewer::Viewer
2007-10-02 21:23:58 +00:00
Robert Osfield
ce79b7efd5 Added a #ifdef 0 code block to test setting of the StateSetManipulator's DataVariance to DYNAMIC
to solve a threading issue relating to mixing of StateSetManipulator and
DrawThreadPerContext.
2007-10-02 20:55:33 +00:00
Robert Osfield
e3e4f6614c Removed redundent malloc. 2007-10-01 15:11:54 +00:00
Robert Osfield
65e3591ed2 From David Callu, various fixes for window inheritance 2007-10-01 11:02:02 +00:00
Robert Osfield
65ac804b7d Changed requestWarpPointer to use _eventDislay to avoid crash in osghanglide example due
to async usage.
2007-10-01 09:41:05 +00:00
Robert Osfield
7086aeeebc Removed log2 and replaced the places where is was used with a new Image::computeNumberOfMipmapLevels method. 2007-10-01 08:50:58 +00:00