Commit Graph

5219 Commits

Author SHA1 Message Date
Robert Osfield
e9b3f06c1b Updated wrappers 2008-03-12 20:20:55 +00:00
Robert Osfield
1b9cefa10f Added extra constructors 2008-03-12 20:15:45 +00:00
Robert Osfield
db256b962c Added proper implementations of OpenGL 1.0 calls to OSG object representation methods in SceneGraphBuilder. 2008-03-12 20:15:28 +00:00
Robert Osfield
eb9f7428bc Fixed bug in output of ProxyLayer's MinLevel/MaxLevel 2008-03-12 15:28:26 +00:00
Robert Osfield
a26bdd9446 Added default implementations of new SceneGraphBuilder class 2008-03-11 13:29:12 +00:00
Robert Osfield
b2ead391b3 From Mathias Froehlich, "it appears to me that sun CC cannot use static functions from template
functions. The attached change is required to make it compile with sun CC."
2008-03-11 13:23:49 +00:00
Robert Osfield
af29bccf4f From Andreas Ekstrand and Lars Nilsson, fix for reading Texture Attribute file 2008-03-05 13:54:52 +00:00
Robert Osfield
5deac2ce3a Updated wrappers 2008-03-05 12:05:55 +00:00
Robert Osfield
66f1a6ceaa From Atr Trevs, added missinging initializers 2008-03-05 11:52:56 +00:00
Robert Osfield
6e89dc0d94 From Jean-Sebastien Guay, "I changed osgGA::StateSetManipulator to mirror the
osgViewer::StatsHandler and other handlers which allow you to change the
key(s) you would press to get them to do something. Pretty simple change
but useful in our context and possibly in others too."
2008-03-05 11:33:55 +00:00
Robert Osfield
bc406c8bf0 From Jean-Sebastien Guay, "
The problem can be reproduced by simply changing the osgpick example to
use a CompositeViewer with a single view initialized using
setUpViewAcrossAllScreens(). I have attached a modified osgpick.cpp so
you can test it out quickly (please don't check this file in though :-)
) The eventState is then incorrect and picking does not work. The only
changes are in CompositeViewer.cpp (eventTraversal() method), and fix
the problem for me.
"
2008-03-04 17:57:06 +00:00
Robert Osfield
9d0c950bb0 From Colin McDonald, "Attached is an updated to osgViewer::PixelBufferWin32.
The win32 pbuffer implementation returned an error unless both the
WGL_ARB_pbuffer and the WGL_ARB_render_texture functions were present.
This was too restrictive, as a pbuffer can usefully be created without
render-to-texture, e.g. for use with glReadPixels.  The osg 1.2/Producer
pbuffers worked without RTT, and osgUtil::RenderStage has all the code to
handle both RTT and non-RTT pbuffers, doing a read and copy in the
latter case.

With these changes I have successfully tested the osgprerender example
on a graphics card which supports RTT, and one which doesn't.  Plus
tested in my own application.

In order to aid diagnostics I have also added more function status
return checks, and associated error messages.  I have included the win32
error text in all error messages output.  And there were some errors
with multi-threaded handling of "bind to texture" and a temporary window
context which I have corrected.

These is one (pre-existing) problem with multi-threaded use of pbuffers
in osgViewer & osgprerender, which I have not been able to fix.  A win32
device context (HDC) can only be destroyed from the thread that created
it.  The pbuffers for pre-render cameras are created in
osgUtil::RenderStage::runCameraSetUp, from the draw thread.  But
closeImplementation is normally invoked from the destructor in the main
application thread.  With the additional error messages I have added,
osgprerender will now output a couple of warnings from
osgViewer::PixelBufferWin32::closeImplementation() at exit, after
running multi-threaded on windows.  I think that is a good thing, to
highlight the problem.  I looked into fixing it in osgViewer::Renderer &
osgUtil::RenderStage, but it was too involved for me.  My own
application requirements are only single-threaded.

Unrelated fix - an uninitialised variable in
osg::GraphicsThread::FlushDeletedGLObjectsOperation().
"
2008-03-04 16:39:44 +00:00
Robert Osfield
dd2b4ed83e From Wojciech Lewandowski, "Attached is modified osgShadow::ShadowMap. I changed following things:
1:
Shadow map camera sets ABSOLUTE_RF_INHERIT_VIEWPOINT refernce frame. 
 
2:
Light Direction  by matrix multiplications replaced with transform3x3 multiplication.
 
3:
I made DebugingHUD functional by adding special draw callback. Former version was simply drawing pale square. 
 
4:
I was tempted to make 4 th change but decided to not do it. Instead I put it whith #if VIEW_DEPNDENT_TEXGEN. If you decide you may let it go.
 
When objects are not centered at 0,0,0 coord but in some distant location (for example at surface of earth ellipsoid) shadow texgen suffers from inadequate precision of float matrices. I changed that by premultiplying Texgen matrix (using OSG double matrices) with inverse modelview and applying it later with ModelView identity matrix. This tweak may be appropriate for OverlayNode texgen as well.
 
I left former version because I suspect that this change will make osgShadow::ShadowMap view dependant. Currently texgen matrix remains the same no matter what View displays it. With my change it wuld be different for each view. This touches the subject of View Dependent Shadow Techniques that J-S asked recently."
2008-03-04 16:22:47 +00:00
Robert Osfield
23bc6c2fe5 Refactored the way that the camera settings are inhertied 2008-03-04 16:03:37 +00:00
Robert Osfield
1d18bc7f48 From Art Trevs, "in the current implementation of the FrameBufferObject
there is a bug. The header file do specify something
like  this:

FrameBufferAttachment(Texture3D* target, int zoffset,
int level = 0);

However in the .cpp file we have:

FrameBufferAttachment::FrameBufferAttachment(Texture3D*
target, int level, int zoffset)


Which means that the meaning of level and zoffset is
interchanged.

The file with the corrected line is attached. Should
go into src/osg/
"
2008-03-04 15:29:47 +00:00
Robert Osfield
712ca43219 From Philip Lowman, "A missing _WIN32_WINNT declaration causes MinGW compilation to fail when reaching FileNameUtils.cpp and the Windows 2000 function GetLongPathName() is called." 2008-03-04 15:10:22 +00:00
Robert Osfield
c4d07194a2 From Art Trevs, add support for saving external shader files.
From Robert Osfield, adding missing member variable initializes and Output::getShaderFileNameForOutput() implementation
2008-03-04 14:04:48 +00:00
Robert Osfield
f7c33bb2e8 Change the setViewAsLookAt method to use Vec3d rather than Vec3 for better precision 2008-03-04 11:53:09 +00:00
Robert Osfield
2db68f98a8 Changed the updateStateSet code so that it creates a new StateSet each update
rather than clear and reuse the existing one, this change fixes a threading
issue that occured when the viewer is in DrawThreadPerContext.
2008-03-04 11:52:21 +00:00
Robert Osfield
9dcab11267 Updated wrappers 2008-03-01 13:42:07 +00:00
Robert Osfield
dd9dc85d40 Disabled the resizing of Camera's with FBO's 2008-02-29 16:09:48 +00:00
Robert Osfield
aa43b3c8a6 Added Camera::g/setIntialDrawCallback and g/setFinalDrawCallback(), and added
screen snapshot example code to osghud.
2008-02-29 15:25:57 +00:00
Robert Osfield
ca513efc1d Added LODScaleHandler 2008-02-28 20:02:43 +00:00
Robert Osfield
1dfffc0494 Added OSG_EXPIRY_DELAY env var option. 2008-02-28 18:08:32 +00:00
Robert Osfield
e26579b0ec Moved the delete operations to before of the compile operations to ensure that
delete operations don't get pushed out by allocations
2008-02-28 17:59:44 +00:00
Robert Osfield
eb46608be4 From Wojciech Lewandowski and Robert Osfield, Support from LightPointNode::s/getPointSprite parameter. 2008-02-27 12:11:02 +00:00
Robert Osfield
3b4af26136 From Paul Martz, fixed get/set methods API 2008-02-27 11:43:58 +00:00
Robert Osfield
335eed204b Added debug message to track cache usage 2008-02-27 11:43:06 +00:00
Robert Osfield
fdb6b31452 From Melchior Franz, fixed handling of modified keys when entering/leaving window 2008-02-25 17:30:30 +00:00
Robert Osfield
a3a5af18b0 From Franz Melchior, "When switching virtual desktops or minimizing a window, keys
remain in pressed state after revealing, even if they are no
longer pressed on the keyboard. This can have bad effects,
especially if the stuck keys are modifier keys. One has to
press and release the stuck keys again to reset the wrong state.

The fix keeps track of all key presses and releases. On FocusOut
and UnmapNotify it releases all keys that are in pressed state,
and on KeymapNotify (following a FocusIn), it sets the currently
pressed keys again. To avoid confusion in the OSG-using application
normal keys are always reported released /before/ and pressed
/after/ modifier keys.

As current key states are returned as char[32] keymap by
XQueryKeymap and XKeymapEvent, this format is also used to
recognize modifier keys and for maintaining the current
internal key state. Functions to set/clear/query bits in
such a keymap are added.

The patch was extensively tested with osgkeyboard and
FlightGear under KDE and fvwm2. It was not tested on a
Xinerama setup or with multiple windows, but as _eventDisplay
is used throughout, there should be no problems. The patch also
makes the following changes:

- removes old and obsolete handling of modifier keys in ::adaptKey().
 This wasn't only unused, but also wrong (and for that reason commented
 out in revision 7066). The modifier states are actually handled
 in ./src/osgGA/EventQueue.cpp (EventQueue::keyPress/keyRelease).
- fixes some spelling"
2008-02-25 16:50:28 +00:00
Robert Osfield
3c2872a36a From Emmanuel Roche, "I'm joining two zip files to this mail for the modified sources and include files of osgIntrospection.
The modifications I made are very small but they are absolutely usefull to use osgIntrospection with visual studio 7.1 or 8 in debug modes.
This should also solve other minor common problems (converter memory leak, virtual destructor for PropertyInfo, etc...).

I choosed two function names : Reflection::uninitialize() and Type::reset(), this can of course be changed if someone has a better idea...

I made the changes against OSG 2.2.0 public release. I tested the result with VS 7.1, VS 7.1 SP1, VS 8.0 SP1 and AQTime 5.0 on Windows XP SP2... All 4 seem to agree : they detected memory leaks before and don't anymore.

Sorry I haven't take the time to test that on linux but the changes are so small I doubt there could be a problem... I let you check that on your side  :-).

I hope this will help making OSG an even more wonderfull library."
2008-02-25 16:26:30 +00:00
Robert Osfield
fb1b58b2e2 From Stephan Huber, "I missed a refactoring of the handling of modifier-keys, so they did not
work on OS X. Attached you'll find the missing implementation for OS X."
2008-02-25 16:05:53 +00:00
Robert Osfield
69d58d6f7c From Paul Martz, "This change adds "GL_NORMALIZE" and "GL_RESCALE_NORMAL" to .osg IO in place of the hex equivalents." 2008-02-25 15:09:56 +00:00
Robert Osfield
359f056c73 Updated wrappers 2008-02-25 15:08:45 +00:00
Robert Osfield
75b9a9c809 From Robert Osfield and Carlo Camporesi, took submission from Carlo for adding LoadingExternalReferenceMode to ProxyNode and extended it
to include a wider range of options, also completed implementation
2008-02-25 15:07:35 +00:00
Robert Osfield
55de8b03d9 From Wojciech Lewandowski, "----1----
Attached is a fixed version of OverlayNode.cpp. I fixed CustomPolytope::cut( osg::Plane ) method.  Bug was apparent in such scenario:
 
Let P1 be some random frustum polytope
Let P2 be the polytope that was created from P1 bounding box (P2 contains P1 entirely)
 
Then ignoring precision errors: P1.cut( P2 ) == P2.cut( P1 ) == P1.  But this condition was not always met. Cut failed when some of the polytope reference points happened to lie exactly on some intersecting planes in both P1 & P2  (plane distance was = 0).
 
I only use CustomPolytope for my shadowing stuff so I did not test how this affects rest of OverlayNode.cpp.
 
----2----
 
Also attached is a minor precision improvement for osg::Plane intersect method (double version). 
 
----3----
 
I have also one observation regarding osg::Plane - There are two intersect vertices methods (float and double flavour):
 
inline int intersect(const std::vector<Vec3>& vertices) const
inline int intersect(const std::vector<Vec3d>& vertices) const
 
I guess osg::Plane won't compile when someone changes default vec3 typedef to vec3d. Shouldn't the first method be changed to use vec3f explicitly ? Ie:
 
inline int intersect(const std::vector<Vec3f>& vertices) const"
2008-02-25 14:15:27 +00:00
Robert Osfield
adbc15b5a1 From Glenn Waldron, "As you may recall, we discussed adding ReaderWriter::readObject() overrides to all the image plugins in order to facilitate future archive support. Attached are the necessary modifications. I tested JPEG, but not all the others... the code is identical though. Note that the DDS plugin already contained the readObject() implementations." 2008-02-25 13:25:42 +00:00
Robert Osfield
847a384101 Updated wrappers 2008-02-25 13:16:36 +00:00
Robert Osfield
e869200b3d Refactored the mutex usage in osgText and freetype plugin to prevent multi-thread crash 2008-02-25 12:54:54 +00:00
Robert Osfield
3333ca2b46 From Mathias Froehlich, "I have extended the X11 pbuffer code to use either the complete set of glx 1.3
pbuffer functions or exactly ask for the extensions we need to call the
apropriate glx extension functions for and around pbuffers extensions.
The glx 1.3 version of this functios are prefered. If this is not pressent we
are looking for the glx extensions and check for them.
Prevously we just used some mix of the glx 1.3 functions or the extension
functions without making sure that this extension is present.
"
2008-02-22 18:38:30 +00:00
Robert Osfield
67f1503c7d Refactored osgTerrain so that the interface for setting up layer is more straight forward, and added support into GeometryTechnique for handling multiple layers 2008-02-22 11:52:23 +00:00
Robert Osfield
6516bf4910 Added TextureUnit entry to osg::TransferFunction and osgTerrain::Layer 2008-02-20 12:34:13 +00:00
Robert Osfield
c1a1f742c3 Removed erroneous ; 2008-02-19 16:02:03 +00:00
Robert Osfield
9c24dc7083 Changed the updating of the contextID so that the DisplaySetting::MaxNumberOfGrapicsContexts()
is updated on each new graphics context creation, in keeping with how osgProducer used to do things.
2008-02-19 12:26:19 +00:00
Robert Osfield
61223fa05f Refactor the rendering code to not use iterators, instead using indices as means of avoiding using < and += on STL iterators that have shown to be problematic under Windows 2008-02-19 11:30:39 +00:00
Robert Osfield
8e5c3363ef From Stephan Huber, "Attached you'll find some enhancements by Adrian Egli and me for the
carbon-implementation of GraphicsWindow.  Now you can use an AGLDrawable
in conjunction with osgViewer/osgCompositeViewer."

Changes from Robert Osfield, changed std::cout to osg::notify(osg::INFO)
2008-02-18 15:30:55 +00:00
Robert Osfield
e0e862e31a From Rene Molenaar, "Using commandline build system nmake on windows does not work.
This is caused by the OSG_MSVC_VERSIONED_DLL hack.
there are hard-coded paths to place the dll's in the bin /dir that normally would go
in the lib/config (release/debug) dirs. Nmake has different locations for the files (no config dir).
 
 fix: change the macro's in OsgMacroUtils.cmake for the IF(NOT MSVC_IDE) situation.
 Libs go in lib/, and DLLs and executables go in bin/
 To accopmplish this for MSVC_IDE the targets get a "../../bin" prefix,
 for nmake this should be "../bin" (because there are no config folders).

 This fix mimics the behaviour of the MSCV_IDE (visual studio) build system when building with nmake.
 
 Note:
 A change in the main CMakeLists.txt creates the needed plugin directory in the binary dir.
 
 see included files for the changes:
 r7885fix-v2/CMakeModules/OsgMacroUtils.cmake  
 r7885fix-v2/osgWrappers/CMakeLists.txt
 r7885fix-v2/CMakeLists.txt
 
 
The behaviour of visual studio projects (and other build systems) remain unchanged.  
Tested building and installing with nmake and visual studio 8 debug and release.
 "
2008-02-18 15:26:46 +00:00
Robert Osfield
49ef41b373 From Bob Kuehne, "Subject: obj material parse fix
this fix strips whitespace off externally referenced material files.
fixes a bug where the obj listed something like:

 mtllib  FR_PARIS_ESPACE_UNESCO_S.MTL

and then that caused failures in the load later:

 FindFileInPath() : trying /Users/rpk/Downloads/
FR_PARIS_ESPACE_UNESCO_S.MTL ...

this fix simply strips whitespace around that filename before passing
it on to the remainder of the loader."

Changes from Robert Osfield, change std::cout to osg::notify(osg::INFO)
2008-02-18 15:17:42 +00:00
Robert Osfield
e7e8d48980 From Thibault Genessay, "On Dec 16 you introduced a fix to remove internal use of ref_ptr<>'s.
It contained a bug that would cause freed memory to be written again.
Specifically, in FreeTypeLibrary::~FreeTypeLibrary(), calling
font->setImplementation(0); deletes the content pointed to by the
fontImplementation pointer, while the line the immediately follows
tries to access it.

My fix is to make the second instruction part of an else clause rather
than always executed. This way, the fontImplementation->_facade = 0
instruction is only executed when the font implementation is not set
to 0 before (although I have no idea what it is here for and if this
code path is ever followed, since I don't know the plugin's internals
very well).

Attached is the modified FreeTypeLibrary.cpp file."
2008-02-18 15:10:30 +00:00
Robert Osfield
4cf9b9a947 Updated wrappers 2008-02-18 15:02:01 +00:00
Robert Osfield
a97dc84228 Introduced typedef vec_type and value_type into LineSemgment class to allow easier
switching between double and float versions.
2008-02-18 14:51:05 +00:00
Robert Osfield
8b77cc4dac From Bob Kuehne, build fix for OSX/gcc 4.0.1 2008-02-18 14:14:08 +00:00
Robert Osfield
91e35599dc From Brede Johansen, "Here's a fix to the changes regarding the new dispose() function. The
last primary node inside a push-pop level would not get the dispose()
call.  This would result in information from some ancillary records,
like the matrix (transform), being lost.

Changes are made to the latest version in the repository.

Thanks to Terry for the help to find and fix the bug and test the changes."
2008-02-18 13:52:26 +00:00
Robert Osfield
046481ee6e From Bryan Thrall, "moved the prints to a higher notify level
(DEBUG_FP) so they are only printed at the most verbose level."
2008-02-18 13:47:38 +00:00
Robert Osfield
a87c98857c From Paul Martz, "Attached is a modification to OcclusionQueryNode. The copy constructor was failing to initialize all member variables. This change resolves the issue. Thanks to Doug McCorkle for testing and finding the bug." 2008-02-18 13:44:30 +00:00
Robert Osfield
45c6bbb577 Changed constructors to take const pointers 2008-02-15 14:09:44 +00:00
Robert Osfield
cb47e92c26 Updated wrappers 2008-01-29 20:45:51 +00:00
Robert Osfield
ae8713acde Reorganized the static vector used for buffering extensions to prevent an crash on exit. 2008-01-29 12:24:47 +00:00
Robert Osfield
f0087e821e From Mike Weiblen, "1) best practices suggest that values passed by-reference should be
initialized.
2) explanatory comments are handy when available as notify() messages."
2008-01-28 20:54:14 +00:00
Robert Osfield
6e0bbbbc6a From Roger James, "A small fix for compiling with OSG_USE_FLOAT_MATRIX" 2008-01-28 20:31:48 +00:00
Robert Osfield
051259760a Added explict casts to double to prevent VS compiler error 2008-01-28 19:42:16 +00:00
Robert Osfield
ed1e21a9bc From Glen Waldon, "This change patches ReaderWriterOSGA.cpp so that it passes along the ReaderWriter::Options to files loaded from inside the archive. Previously it was discarding them.
example:
osgviewer -O noLoadExternalReferenceFiles archive.osga"
2008-01-28 17:00:19 +00:00
Robert Osfield
b45e32afc9 From Stephan Huber, added support for double click event for OSX. 2008-01-28 16:38:39 +00:00
Robert Osfield
6224c99692 From Cedric Pinson, "default white behaviour : osgviewerd -e ogr yourFile
randomize color by feature: osgviewerd -e ogr -O UseRandomColorByFeature
yourFile"
2008-01-28 16:13:42 +00:00
Robert Osfield
54129105a4 Added projectorMatrix parameter support to *SphericalDisplay setup functions and .view, this allows one
to flip, rotate, or turn up side the position of the projector.  Note, projector at base of display is the default.
2008-01-28 15:41:42 +00:00
Robert Osfield
2db7fe500f Added include RenderLeaf to make sure #define's are defined correctly 2008-01-28 15:36:28 +00:00
Robert Osfield
53135ac8ac Removed duplicate declaration of DeleteHandlerPointer 2008-01-24 10:04:33 +00:00
Robert Osfield
4163f173a0 Added missing checks for null pointers 2008-01-22 10:28:48 +00:00
Robert Osfield
bae83fc69d From Drederic Bouvier, "I noticed the AC3D loader resets database path given as Options,
preventing users to put textures in another directory. This patch adds
the model path to the path list instead of replacing it."
2008-01-21 14:42:52 +00:00
Robert Osfield
a586d63687 From Cedric Pinson, "you can find as attachement a readerwriter for ogr files (.tab, .gml,
.shp ...) ogr is a part of gdal so i added the build of ogr plugin if
gdal is found. 

to test it
osgviewerd -e ogr file.tab
or
osgviewerd -e ogr file.gml
or
osgviewerd -e ogr file.shp
"
2008-01-21 12:01:55 +00:00
Robert Osfield
5c6869ccc9 Fixed Geometry::removePrimitiveSet method so that it no longer emits a warning when
removing 0 elements form an empty primtive set list.
2008-01-21 12:00:10 +00:00
Robert Osfield
fea3595b43 From Mike Weiblen, restructured GL2Extensions so that they now live in their own GL2Extensions.cpp file rather than in Program.cpp 2008-01-21 11:47:40 +00:00
Robert Osfield
ff090f59b9 Updated wrappers 2008-01-21 11:39:00 +00:00
Robert Osfield
74ca09d816 Fixed debugged code path and set the minimum number of display lists to retain in cache to the same amount as the number of textures 2008-01-21 11:37:55 +00:00
Robert Osfield
6d3a90219c Removed redundental vertex buffer object flush methods 2008-01-21 11:36:54 +00:00
Robert Osfield
76b6ef6368 Added thread safe debugging checking of allocation/deallocations 2008-01-19 18:26:41 +00:00
Robert Osfield
5e9c708582 Added use of ref_ptr<> throughout geometry setup code to prevent memory leaks 2008-01-19 18:25:45 +00:00
Robert Osfield
0a383d857c Added debugging messages to help monitor expiry of inactive children. Debug
messages current #if 0'd out, but added now for future tests when required.
2008-01-19 13:41:43 +00:00
Robert Osfield
d2aaa26c88 Disabled the default enabling of update traversal on osgTerrain::Terrain as this was preventing PagedLOD subgraphs from expiring inactive subgraphs 2008-01-19 13:31:12 +00:00
Robert Osfield
f1bd6a55af Updated wrappers 2008-01-18 21:29:00 +00:00
Robert Osfield
b91df6c867 Removed erroneous const in method parameter 2008-01-18 21:08:42 +00:00
Robert Osfield
1cfba8787a From Paul Martz, Hi Robert -- "as you and J-S and I have been discussing on osg-users, this submission changes the clamp mode for the fake white texture applied to non-textured geometry. CLAMP_TO_EDGE will keep the geometry a consistent color across the entire texture coordinate range." 2008-01-18 20:55:16 +00:00
Robert Osfield
574582f206 Added support for rendering skirts into osgTerrain::GeometryTechinque 2008-01-18 16:36:05 +00:00
Robert Osfield
bb7ba24f59 Commented out debug message 2008-01-17 22:26:29 +00:00
Robert Osfield
fc85978077 Added computation of skirt height for osgTerrain::Terrain height fields. 2008-01-17 22:25:41 +00:00
Robert Osfield
bc6c7fcece Added call to ClusterCullingCallback to determine if the Terrain node is culled
by cluster culling.
2008-01-17 17:10:12 +00:00
Robert Osfield
c855923d93 Added Node to Terrain serialization 2008-01-17 16:41:46 +00:00
Robert Osfield
efdc026114 Fixed the computation of terrain bounding volume so that it properly accounts for
elevation layers
2008-01-17 15:37:35 +00:00
Robert Osfield
ae33e4a459 Changed the Texture clamp mode to CLAMP_TO_EDGE 2008-01-16 15:05:04 +00:00
Robert Osfield
61a4eb94b9 Updated wrappers 2008-01-14 14:53:57 +00:00
Robert Osfield
828851c08a Refactor osgTerrain::ProxyLayer so that it is now a pure Proxy, defering implementations
to an Implementation rather than a subclass of ProxyLayer.  Updating the osgTerrain and GDAL plugins
to comply with this refactor.
2008-01-14 14:53:49 +00:00
Robert Osfield
4a08d8daaa Added geometry shader extension supported check to geometry shader parameter calls 2008-01-14 11:44:04 +00:00
Robert Osfield
276f439ff9 From Colin McDonald, "Multi-texturing fails with recent osg on older graphics cards, due to
use of parameter GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS which is only part
of the standard from 2.0 onwards.  I've updated src/osg/State.cpp, so
that it attempts to be more rigorous regarding OpenGL version and
extension checking."
2008-01-14 11:30:39 +00:00
Robert Osfield
fc149940f7 Updated wrappers 2008-01-14 11:07:30 +00:00
Robert Osfield
4b05e84d59 From Daniel Stien, "When removing a child from a osg::Group, childRemoved is called after the
node has already been erased from the node list, causing childRemoved to be
performed on the consecutive node.

Lines 180 and 182 are swapped in the attached Group.cpp.
"
2008-01-14 10:14:32 +00:00
Robert Osfield
2d407a8c0c From Adrian Egli, made the getHandled() functionality consistent with the rest of the osgGA::MatrixManipulators 2008-01-11 12:16:19 +00:00
Robert Osfield
9d010e14fe From Paul Martz, "his pretty much wraps up the OcclusionQueryNode work. I might make some additional modifications if testing reveals any issues, otherwise it's ready for 2.4." 2008-01-10 11:02:21 +00:00
Robert Osfield
a46eb79311 Indentation/bracket fixes and change of default size 2008-01-09 21:17:10 +00:00
Robert Osfield
2ea2872cfb Simplified the image reading/writing 2008-01-09 21:00:38 +00:00
Robert Osfield
dfa4060465 Adding missing files 2008-01-09 16:56:31 +00:00
Robert Osfield
803f70c2fb Added support for reading and writing osgTerrain objects 2008-01-09 16:35:55 +00:00
Robert Osfield
9bae59bd6e Added setting of UpdateVisitor's FrameStamp and TraversalNumber in updateTraversal() 2008-01-09 14:22:44 +00:00
Robert Osfield
11db24e6b3 From Colin McDonald, build fixes for Solaris. 2008-01-08 18:13:06 +00:00
Robert Osfield
6ca573dfd3 From Jean-Sebastien Guay, Warning fixes 2008-01-08 17:18:11 +00:00
Robert Osfield
d7d1b382b7 Added support for reading and writing the Terrain's Locator 2008-01-08 16:09:01 +00:00
Robert Osfield
dc79b6bb4d Added writing and reading of inlined HeightField 2008-01-08 15:20:02 +00:00
Robert Osfield
e73134d6fb Removed non standard and redundent /*EOF*/ 2008-01-08 14:38:58 +00:00
Robert Osfield
27714dd538 Updated wrappers 2008-01-08 14:37:09 +00:00
Robert Osfield
578f385760 From Mike Weiblen, support for geometry shaders, and osgeometryshaders example to demonstrate them. 2008-01-08 14:29:44 +00:00
Robert Osfield
c37e5eaf18 Added support for MinLevel and MaxLevel for ProxyLayer 2008-01-08 13:56:21 +00:00
Robert Osfield
ff565128af Introduced new osg::discardDeletedOpenGLObjects() methods, and usage of it in
GrpahicsContext::close() to handle cases where deletingOpenGLObjects is no possible,
such as when GraphicsWindowEmbedded is used.
2008-01-08 13:24:29 +00:00
Robert Osfield
f3448d3307 Removed debug info 2008-01-08 13:22:55 +00:00
Robert Osfield
74e5d44538 Reorganised the .osg support for osgTerrain NodeKit to make it more extensible 2008-01-08 13:10:59 +00:00
Robert Osfield
5832dadb68 From Glenn Waldron, "I found that osg::Sequence::setDuration(speed,reps) was not changing the animation speed factor as expected. The one-line fix (line 312) is attached" 2008-01-04 15:33:21 +00:00
Robert Osfield
4d042581a6 From Paul Martz, "Correction to size of reserved filed in .attr file, Spec says "149*4" bytes, not "149"" 2008-01-04 15:30:49 +00:00
Robert Osfield
ad5fcbccf6 Updated wrappers 2008-01-04 15:15:48 +00:00
Robert Osfield
35d9107d81 Added catch for handling cases where undefined settings for dislayNum and screenNum are used 2008-01-04 13:57:36 +00:00
Robert Osfield
8d5d543600 From Brede Johansen, support for contiuation records. 2008-01-04 11:26:21 +00:00
Robert Osfield
6231c3a5a4 From Paul Martz, completion of .ive and .osg support for OcclusionQueryNode 2008-01-04 11:14:11 +00:00
Robert Osfield
b222d4201c From Paul Martz, "The osgocclusionquery example contained some duplicate code that was also in the core OSG occlusion query code. This change removes the need for that." 2007-12-26 22:00:28 +00:00
Robert Osfield
532d573a06 Updated wrappers 2007-12-26 21:43:10 +00:00
Robert Osfield
2aca19a4e6 From David Callu, further work in support of shapefile support in VirtualPlanetBuilder 2007-12-26 21:39:29 +00:00
Robert Osfield
9d29cc53dc Suppressed reflection of problem templates/typedefs 2007-12-26 21:38:11 +00:00
Robert Osfield
92f7f4c3f5 Replaced values.h with float.h is avoid Windows compile issues 2007-12-25 21:11:27 +00:00
Robert Osfield
17b7f57814 Updated wrappers 2007-12-24 15:37:15 +00:00
Robert Osfield
5e89958623 Fom Brede Johansen, "I have added the OSGPL license to the OpenFlight source files" 2007-12-24 15:32:15 +00:00
Robert Osfield
93127866a8 From Sid Byce, fixes for compiling with gcc 4.3 2007-12-24 15:19:52 +00:00
Robert Osfield
7f30f0038f From Rafa Gaitan, "I have corrected some includes of the quicktime plugin
from Quicktime/Quicktime.h to QuickTime/QuickTime.h.
MacOsX filesystem is normally case insensitive, but in 
my case I changed that option and the quicktime headers
were not found. Now compiles fine and on case insesitive
file systems should work correctly too. "
2007-12-24 14:47:49 +00:00
Robert Osfield
e39bb04c62 From Jason Daly, "I'm still having a problem with SWING animations on sequences. Here's
the fix again, merged with this morning's svn (including the other
Sequence fixes from J-S)."
2007-12-24 14:45:31 +00:00
Robert Osfield
ce5388a8bc Convert osgText and freetype plugin across to keeping the font size as state that
is passed into the getGlyph and getKerning methods rather than a current state of the font itself.
2007-12-23 18:15:54 +00:00
Robert Osfield
f290b75bc9 Moved Font code across to using FontSizePair internally and on Font methods, but
still using original implemetations.
2007-12-23 13:45:37 +00:00
Robert Osfield
dea067050c Renamed osgText::Font::SizePair to osgText::FontSizePair in prep for use this more
widely within osgText/freetype plugin.

Added support for inserting loading models into --mt multithreaded implementation.
2007-12-23 13:18:40 +00:00
Robert Osfield
41b52b3d1f Updated wrappers 2007-12-21 17:26:19 +00:00
Robert Osfield
4c46475ca2 From Paul Martz, "added include<alogrithm> to prevent VS8 compile error" 2007-12-21 16:18:54 +00:00
Robert Osfield
39f4419183 Removed OperationArrayFunctor for wrappers to avoid compile errors assocaited with them 2007-12-21 15:54:14 +00:00
Robert Osfield
6b59b1739f Updated wrappers 2007-12-21 15:04:56 +00:00
Robert Osfield
b052e18f6e From Paul Martz, .osg support for OcclusionQueryNode 2007-12-21 14:49:49 +00:00
Robert Osfield
4889342c4a From Paul Martz, Introduced osg::OcclusionQueryNode with support for OpenGL occlusion query extension 2007-12-21 14:45:16 +00:00
Robert Osfield
5f7a2968ac From Bryan Thrall, "UFOManipulator ignores any attached CoordinateFrameCallback; the
attached files fix this (based on 2.2 release).
"
2007-12-21 14:21:21 +00:00
Robert Osfield
8733bb1799 From Mathias Froehlich, "Something to extend the texture subloading blacklist.
... we have problems with that on solaris."
2007-12-21 14:16:40 +00:00
Robert Osfield
9a41178439 From John Kelso,"Attached is the ive reader/writer for the 2.x version of the osg::Sequence
node. "
2007-12-21 14:13:40 +00:00
Robert Osfield
0f2959ce69 From Jeremy Moles, "Here is a implementation of setScreeResolution and
setScreenRefreshRate for systems support Xrandr. The include CMakeFile
makes this optional, and turns it OFF by default, in which case any
person trying to use these functions under Linux will be instructed to
build osgViewer w/ Xrandr support.
"
2007-12-21 13:32:13 +00:00
Robert Osfield
9ae1ffe13b From Jean-Sebastien Guay, "When using osg::Sequence you can stop the sequence by setting the mode
to STOP. Subsequently, you can restart it from the beginning by
setting the mode to START. This does not work as expected. The _now
time is not updated while the mode is STOP, which causes the items in
the sequence to flash by very quickly when the mode is set to START.

For example, if the mode was set to STOP and left that way for 30
seconds, and there are 10 items in the sequence, when the mode is set
to START all the items will flash by (in 3 loops) while the _now time
catches up with the real time, and then the sequence will go on at the
rate it should.

This is a simple fix for that, which updates the _now time regardless
of the mode the sequence is in."
2007-12-21 13:18:13 +00:00
Robert Osfield
cf1a30841a From David Callu, various classes in support of VirtualPlanetBuilder 2007-12-21 13:07:54 +00:00
Robert Osfield
2e62206117 From David Callue, added support for reading/writing Vec*dArray to .ive plugin 2007-12-21 12:36:40 +00:00
Robert Osfield
815121b0e8 Updated wrappers 2007-12-20 17:30:31 +00:00
Robert Osfield
2cab28c3b8 Added support for min to max level ranges for Layers in support of VirtualPlanetBuilder usage of this. 2007-12-20 15:51:13 +00:00
Robert Osfield
2c0842c7b7 Added an optional use of doubles for computing error metrics to help investigate precision issues seen in VPB when working with small segments of geographic data. 2007-12-20 15:50:07 +00:00
Robert Osfield
f8253ca4bd Reset the the _lineSpacing to 0.0f to fix the line spacing when word wrapping takes place 2007-12-20 15:40:14 +00:00
Robert Osfield
53be383843 From Wojciech Lewandowski, "By complete coincidence I just have read an old OSG submission mail related
to bugfixes in osg::Polytope.setToUnitFrustum and setToBoundingBox  It was
sent at beginning of december. I read it when purging my Thrash emails and
found it there this because it was wrongly classified as SPAM.

What stroke me in this email was the fact that there was once an error in
Polytope class. Since I adopted CustomPolytope (osgSim OverlayNode.cpp) for
my minimal shadow area computations I checked my code for this error. And I
found it in CustomPolytope::setToUnitFrustum method.
CustomPolytope::setToBoundingBox seemed OK.

So I went back to the origin and fixed this error in OverlayNode.cpp as
well. I have not tested it in OverlayNode though (I don't know how) so
please look at this carefully. But it seems to work fine with my shadow
calculations."
2007-12-20 14:40:28 +00:00
Robert Osfield
3ffe7de6a3 Reorder includes in an attempt to avoid compile problems under Cygwin. 2007-12-20 10:48:23 +00:00
Robert Osfield
9a2bc98d3a From Paul Obermeier, "Please find enclosed the following 2 bug fixes:
File osgShadow/Version.cpp, Line 25:

const char* osgShaodowGetLibraryName()

should be:

const char* osgShadowGetLibraryName()


File CMakeModules/OsgMacroUtils.cmake, Line 224:

SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})

should be:

SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")

Otherwise setting CMAKE_DEBUG_POSTFIX to an empty string instead of "d" in
the main CMakeLists.txt does not work under Linux.
"
2007-12-17 18:38:21 +00:00
Robert Osfield
49696d776a From Stephan Huber, "attached you'll find an updated carbon-implementation, which implements
the missing functionality for setWindowName and useCursor
"
2007-12-17 10:24:20 +00:00
Robert Osfield
e883663072 Updated wrappers 2007-12-17 10:22:41 +00:00
Robert Osfield
9507ee6c7d From Wojiech Leandowski, "I earlier wrote about my hassles with archives under Windows. I implemented
64 bit binary compatible OSGA archive reader/writer using mixed
stdio/iostream calls. But during this work I learned that it can be made in
much simpler way.

Attached is result of this new attempt. I hope its appropriate for inclusion
into OSG codebase. It was compiled and tested with latest SVN OSG, Windows
XP 32 bit and Windows Vista business 64 bit. OSG was built using VS 2005
Express SP1 for 32 bit environment and VS 2005 Std for 64 bit.
---
Solution description (there were two problems involved):
---
Problem 1: implicit conversions beetween file positions and 32 bit int. This
could be considered a MS compiler bug because this 32 bit int was
additionally implicitly converted to/from 64 bit. As far as I know compiler
is allowed to make only one implict conversion (but maybe this rule does not
refer to simple types).

Its actually possible to address OSGA files above 4 GiB range using 32 bit
windows iostreams. MS Iostreams in practice offer the same level of
functionality as stdio functions. There are functions fsetpos and fgetpos in
stdio lib which use 64 bit file pointers (fpos_t). These functions are
internally called by seekp( streampos ), seekg( streampos ), tellp(), and
tellg() methods. So its also possible to change and retrieve file postions
using iostream calls. But the problem lies in implicit handling of streampos
type.

streampos type is actually a template class used as seekp, seekg parameter
and returnd from tellp, tellg. Its capable of storing 64 bit file pointers.
But streampos can be also converted to/from simple type streamoff. It has
proper constructor and cast operator. In Win 32 environment streamoff is
defined as long (~32 bit int). So when seekp, and tellp arent used with
exact streampos objects but OSGA_Archive::pos_type complier makes implicit
casts to 32 bit int types loosing important bits of information.

So above problem could be easily handled by making conversion calls
explicit. My code defines 2 functions used to convert back and forth beetwen
64 bit OSGA_Archive::pos_type and std::streampos objects:

       OSGA_Archive::pos_type ARCHIVE_POS( const std::streampos & pos );
       std::streampos STREAM_POS( OSGA_Archive::pos_type & pos );

Rest of the OSGA implementation code was modified to call these conversions
explicitly with seekp, seekg, tellp, tellg.

---
Problem 2: seekp and seekg have two variants. Only one of these variants is
actually 64 bit proof.

When I solved my first problem and made use of explicit streampos conversion
functions, OSGA archive was able to read my example 11 GiB archive. But
there were still problems with write and append. I found that the reason for
this was pair of seekp( 0, std::ios_base::end ) and tellp() calls. It turned
out that use of seekp, seekg( offset, direction ) function variants was
setting file pos pointer to EOF when file was larger than 4GiB. But I
noticed that one arg seekp, seekg ( streampos ) versions worked correctly.
So the solution was to change OSGA write logic a little, and replace
seekp( offset, direction ) with seekp( absolute_pos ) calls.
I achieved this by modifing IndexBlock write method to record and restore
file pos after IndexBlock was written. This modification has the effect that
put pointer is generally kept at the end of file, so there is no need to
repostion to the end before writing the files. This allowed me to get rid of
those problematic seekp( 0, std::ios_base::end ) calls.

There was one place where I could not easily get rid of seekp( 0,
std::ios_base::end ). It was situation where existing OSGA was opened for
appending. I resolved this by computing file length by finding max position
from index block and file block endings. Then I replaced former seekp( 0,
std::ios_base::end ) with  seekp( STREAM_POS( found_file_length ).
---

Description of these changes may sound bit hacky but in practice these were
fairly simple and straightforward modifications. I hope they pass your
review. There is one complex preprocessor condition which I based on few
lines taken from boost positioning.hpp. Boost licence does allow such
reproduction. In case of problems this condition may be easily simplified to
windows only implementation.
"
2007-12-17 09:58:55 +00:00
Robert Osfield
3fcba1bc51 From Jean-Sebastien Guay, "Some clients at my new job noticed that picking did not work with the
osg::Capsule subclass of osg::Shape in an osg::ShapeDrawable. Other
shapes worked fine. So I have fixed this. Code attached.

My modification is in the PrimitiveShapeVisitor, and is based on the
DrawShapeVisitor - I added methods called createCylinderBody and
createHalfSphere, and used them in apply(Cylinder&) and
apply(Capsule&). In my testing they work fine, tested even with
transforms and moving around the scene.
"
2007-12-16 17:57:19 +00:00
Robert Osfield
6eaa273116 Added check to make set up a sequencegroup only happen when required. 2007-12-16 17:53:16 +00:00
Robert Osfield
1e996afe81 From Wojciech Lewandowski, "osgSim::BlinkSequence has sequenceGroup unitialized by default (=NULL ref_ptr). By looking at the code I figured out that unset sequenceGroup is completely correct and thus allowed.
But writing BlinkSequence with empty sequence group caused a crash when IVE was accessing baseTime from NULL address.
 
Atttached is a fix for this situation.
"
2007-12-16 17:46:57 +00:00
Robert Osfield
b76b85770f From Wojiech Lewandowski, "There was a bug in ShadowMap camera view matrix computation. View matrix was wrong when light was directional and shadowed scene was not centered at zero coord. I fixed that and also modified cast distance to much smaller value. With former range it was possible to generate shadows with lowest LODs. " 2007-12-16 17:41:46 +00:00
Robert Osfield
f1154f99bf Fixed HeightField coordinates set up 2007-12-16 17:33:05 +00:00
Robert Osfield
0cdc3e9506 Added intializers. 2007-12-16 17:01:40 +00:00
Robert Osfield
4a79644810 Added support for automatically setting the coordinate system of a shapefile by reading associate .prj file 2007-12-16 16:18:58 +00:00
Robert Osfield
e29423bba9 Removed used of ref_ptr<>'s internally to avoid ciricular calls on destruction. 2007-12-16 13:20:38 +00:00
Robert Osfield
becf6c22ea Added initilizers of variables to FreeTypeFont3D constructors.
Removed unused FreeTypeFontBase class
2007-12-16 12:36:52 +00:00
Robert Osfield
32e43cb789 Fixed handling of DISPLAY variable, and mapped the rest of Producer config settings 2007-12-15 17:16:11 +00:00
Robert Osfield
6d945df96d Commented out rendendent warnings 2007-12-15 17:15:19 +00:00
Robert Osfield
43611a6ff5 commented out rendudent warning 2007-12-15 17:15:05 +00:00
Robert Osfield
8b21b87d96 Added setting of ambient bias uniform 2007-12-15 15:22:00 +00:00
Robert Osfield
2ab66d9948 Tweaked the abmient lighting contribution so that the OpenGL vertex lighting has
the ambient light source switched off, and use the fragment shader to add this
contribution back in.
2007-12-15 15:17:51 +00:00
Robert Osfield
9f63b89e6a Refectored the loading of Locator out into its own separate file 2007-12-14 17:40:11 +00:00
Robert Osfield
f7e91fa28e Added Locator::s/getTransformScaledByResolution(bool) to assist with VPB integration 2007-12-13 17:51:43 +00:00
Robert Osfield
3bfa74222b Warning fixes 2007-12-13 16:06:02 +00:00
Robert Osfield
831dc38166 From Andy Skinner, build fixes for Solaris 2007-12-13 15:24:42 +00:00
Robert Osfield
492e01d244 Convert tabs to four spaces 2007-12-13 15:23:21 +00:00
Robert Osfield
0dc71306e7 Fixed memory leak 2007-12-13 14:26:03 +00:00
Robert Osfield
1fbb0a8674 Updated the shapefile attribute IO so that its more streamlined. 2007-12-13 14:16:51 +00:00
Robert Osfield
b6f32a3ed0 Added copy operator to ShapeAttribute to prevent problems when assigned them or use within a vector 2007-12-13 12:30:31 +00:00
Robert Osfield
6cca3b8f49 Added a osgViewer::setSceneData(ref_ptr<Node>) method. 2007-12-12 17:59:06 +00:00
Robert Osfield
213a370c25 Added new setFont(ref_ptr<>) variants to Text and Text3D 2007-12-12 17:48:20 +00:00
Robert Osfield
256391c3b4 From Serge Lages, introduce readRef*File() methods which pass back ref_ptr<> rather than C pointers. 2007-12-12 17:04:48 +00:00
Robert Osfield
88f3a864ac Updated copyright notices 2007-12-12 16:56:28 +00:00
Robert Osfield
6bb7935dea From Andy Skinner, build fixes for Solaris. 2007-12-12 16:55:13 +00:00
Robert Osfield
6eaace8f6e Added std:: infront of sort call 2007-12-12 11:57:03 +00:00
Robert Osfield
afdd141d73 Added std:: in front of find enties 2007-12-12 10:35:47 +00:00
Robert Osfield
33e3054fca From Serge Lages, "Here is a new modification to CMake adding an option (OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS) to specify if we want to generate or not the manifest files under VS8 for the plugins and the wrappers. It seems that the manifests are needed if we try to load dynamically a core OSG dll." 2007-12-12 09:48:39 +00:00
Robert Osfield
a0d70bbf03 From Cyril Brulebois, removed redundent typedef. 2007-12-11 17:19:40 +00:00
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