Fixes for build system on OSX 10.8 #5

Closed
wants to merge 10,000 commits into from

5 participants

@peabody124

I have some patches that fix the cmake build for combinations of desktop and cross compiling android from an OSX 10.8 system.

@osg-training-guest osg-training-guest Added setting of the sampleDensityWhenMovingProperty at the same time…
… as when setting the sampleDensityProperty
68ebdc3
@osg-training-guest osg-training-guest Added screen capture handler to present3D, with the PrtScn button use…
…d for a single frame capture and 'm' for continuous frame capture.

The --screenshot filename command line option can be used to configure the name of the screen capture.
e2ea969
@osg-training-guest osg-training-guest From Stephan Huber, "A recent commit
(openscenegraph@41e23f4)
for GraphicWindowsIOS.mm broke the compilation for OpenGL ES 1.x as
GL_DEPTH_COMPONENT32_OES is not defined for 1.x. I added a #define-guard."
2439f5a
@osg-training-guest osg-training-guest Replaced the use of PrtScrn with 'm' for taking screenshots, replaced…
… the use of 'm' with 'M' for taking movies.
3817c8a
@osg-training-guest osg-training-guest Add check to filter out the return of FILE_NOT_FOUND from archive res…
…ults to prevent these from prematurely exiting the Registry::read(..) method

bofore it loads plugins to try and load requested file.
bb3ab91
@osg-training-guest osg-training-guest Added removeFromObjectCache method. 8b66426
@osg-training-guest osg-training-guest Improved handling of resetting of the EventQueue::startTick(). 2490f4d
@osg-training-guest osg-training-guest Improved the handling of setStartTick() being called mid app, such as…
… when idirectly called when doing a Viewer::setSceneData().

Improved the setting the the initial event state.
4787961
@osg-training-guest osg-training-guest Implement presentation update feature that reloads the presentation o…
…n pressing 'u'.
3b9b4bd
@osg-training-guest osg-training-guest Added a check against OSX 10.6 to enable better selection of when to …
…provide custom cosf etc. definition.

This change has been introduced to address recurcsion problems in 10.7 in the ac3d plugin.
02598a3
@osg-training-guest osg-training-guest Added handling of osgGA::GUIEventAdapter::getMouseYOrientation() in t…
…he orientation of mouse y position.

Added updating of properties on both mouse move/drag and keydown.
7bad6ca
@osg-training-guest osg-training-guest Enabled blending for the iso surface rendering to enable fade in/fade…
… out of volume.
6cae958
@osg-training-guest osg-training-guest Updated built in volume shaders to honour the osg::Matierial setting d8580ae
@osg-training-guest osg-training-guest Added .get() to fix build 341e813
@osg-training-guest osg-training-guest Fixed indentation 8c03084
@osg-training-guest osg-training-guest From Trajce Nikolov, "Here is extended version of the osgforest examp…
…le - technique with geometry shader added, was doing it for a project so I thought might be useful to update the example as well

"
ca05fc0
@osg-training-guest osg-training-guest Added prelimanary support for parallel split shadow maps into ViewDep…
…endentShadowMap.
00becee
@osg-training-guest osg-training-guest From Jean-Sebastien Guay, fix for handling texture unit >= 8 and nega…
…tive LigthNum.
b417d85
@osg-training-guest osg-training-guest To fix problems in tight bound computation of the shadow map made the…
… ComputeLightSpaceBounds usage always used when the

CastShadowMask is active.  Changed the ComputeLightSpaceBounds to use just VIEW_FRUSTUM_CULLING.
f23372f
@osg-training-guest osg-training-guest Fixed build under Tiny Core. 12f77cd
@osg-training-guest osg-training-guest Created new PerlinNoise class from the Noise.h+Noise.cpp code in the …
…osgshaders example.
360abe1
@osg-training-guest osg-training-guest Moved osgshaders example across to use the new osgUtil::PerlinNoise e…
…xample
ce202f2
@osg-training-guest osg-training-guest Added --num-sm and --parallel-split and --cascaded command line optio…
…ns to set the appriopriate ViewDependentShadowMap settings.
56df38d
@osg-training-guest osg-training-guest Moved the createSpotLightImage function into include/osg/ImageUtils c1b6f4f
@osg-training-guest osg-training-guest Removed inappropriate static usage 31744b0
@osg-training-guest osg-training-guest Added handling of an empty filename when writing out an image file. 5d19bfd
@osg-training-guest osg-training-guest From Ulrich Hertlein, typo fixes bc9ce6a
@osg-training-guest osg-training-guest From Brad Christiansen, "Attached are some small changes to the Image…
…Stream interface and the DirectShow and FFMPEG plugins to provide the current time being displayed in the image stream.

I don’t have access to an OSX or Linux dev machine to make the changes required to the quick time plugin. This plugin will just default to returning 0."
ed24d27
@osg-training-guest osg-training-guest From Ulrich Hertlein, "attached is a patch for osgPlugins/mdl/MDLRead…
…er.cpp that improves its functionality on

Unix filesystems.  It also includes code cleanups/refactoring."
9f44908
@osg-training-guest osg-training-guest From James Turner, "Testing FlightGear with Cocoa osgViewer, encounte…
…red some problems with hiding / re-showing the cursor. Attached version fixes this, by tracking the current cursor value, and ensuring we don't nest calls to [NSCursor hide] or [NSCursor unhide]."
6ca3ac0
@osg-training-guest osg-training-guest From Glenn Waldron, "Attached is a change to ClusterCullingCallback t…
…o make it work properly under an RTT camera with an INHERIT_VIEWPOINT reference frame."
2a0a5c3
@osg-training-guest osg-training-guest From Brad Christiansen, "I have added an implementation for set/getVo…
…lume in the direct show plug-in."
814f903
@osg-training-guest osg-training-guest From Aurelien Albert, "I made a modification in the Dragger class :
You can now set a "intersection mask" and it will be used when looking for intersections.

So you can now easily "hide" some objects from manipulators."
feb473b
@osg-training-guest osg-training-guest Gunnar Holm, "After upgrading from 2.8.3 to 3.0.1 we experienced a lo…
…ck in the Mutex

functionality when using Terrain::setVerticalScale. This was caused by
the following call sequence resulting in a lockup:

void Terrain::setVerticalScale(float scale)
  CALLS    dirtyRegisteredTiles();


void Terrain::dirtyRegisteredTiles(int dirtyMask)
 SETS LOCK    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
 and CALLS (on every tile)   setDirtyMask(dirtyMask);


void TerrainTile::setDirtyMask(int dirtyMask)
 CALLS _terrain->updateTerrainTileOnNextFrame(this);


void Terrain::updateTerrainTileOnNextFrame(TerrainTile* terrainTile)
 SETS LOCK   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
******* PROBLEM - since lock has already been set! ********


The suggested fix submitted changes from using Mutex to ReentrantMutex.
"
f017d90
@osg-training-guest osg-training-guest From Paul Martz and David Glenn,
"From David Glenn and Paul Martz. This change adds support for the NO_COLOR bit in the Vertex records' flags field. If NO_COLOR is set, and PACKED_COLOR is not set, the code will now properly default to using the face color at those vertices. See the osg-users thread "Open Flight characteristic not reflected in the current OSG" for more info."

and

"In consultation with David Glenn, it appears we needed to change a second file to correct how OpenFlight handles transparency when vertices have NO_COLOR. "
111c101
@osg-training-guest osg-training-guest From Chris Denham, Implementation of write functions in CURL plugin d63490b
@osg-training-guest osg-training-guest From Farshid Lashkari, "Attached is a simple fix to osg::Sequence tha…
…t allows it to load properly with the serializer formats (osgt/osgb). The problem was that the internal _nrepsRemain member was not being initialized properly if the number of repeats was equal to the default value of -1. When the number of repeats is explicitly set using setNumRepeats(), _nrepsRemain is set to the same value. However, in the constructor of osg::Sequence, it was not being initialized to the same value as _nreps. This fix simply changes the initial value of _nrepsRemain to the same as _nreps."
db37b09
@osg-training-guest osg-training-guest Fixed the return value of SlideEventHandler::selectLayer() so that th…
…e 'n' now works correctly.
95459e8
@osg-training-guest osg-training-guest From Alberto Luacus, "The ffmpeg plugin fails to compile with the upc…
…oming libav 0.8 because

the required header mathematics.h is not being included explicitly.

I have just included it, and verified that this also works with current
version 0.7, since the header is also available there."
729febf
@osg-training-guest osg-training-guest Changed float QuicktimeImageStream::getCurrentTime() to double Quickt…
…imeImageStream::getCurrentTime() to keep it consistent with

the type of the virtual function ImageStream::getCurrentTime(), and with this fixing a compile and runtime error.

Changed time variables all to use doubles rather than float to be consist with the change to getCurrentTime().
4dde02d
@osg-training-guest osg-training-guest Refactored the click_to_run implementation to avoid bug associated wi…
…th running the first click_to_run entry in a layer when

subsequent click to run's are called.
21df3a7
@osg-training-guest osg-training-guest Added support for using GL_UNPACK_ROW_LENGTH in conjunction with text…
…ure's + osg::Image via new RowLength

parameter in osg::Image.  To support this Image::setData(..) now has a new optional rowLength parameter which
defaults to 0, which provides the original behaviour, Image::setRowLength(int) and int Image::getRowLength() are also provided.

With the introduction of RowLength support in osg::Image it is now possible to create a sub image where
the t size of the image are smaller than the row length, useful for when you have a large image on the CPU
and which to use a small portion of it on the GPU.  However, when these sub images are created the data
within the image is no longer contiguous so data access can no longer assume that all the data is in
one block.  The new method Image::isDataContiguous() enables the user to check whether the data is contiguous,
and if not one can either access the data row by row using Image::data(column,row,image) accessor, or use the
new Image::DataIterator for stepping through each block on memory assocatied with the image.

To support the possibility of non contiguous osg::Image usage of image objects has had to be updated to
check DataContiguous and handle the case or use access via the DataIerator or by row by row.  To achieve
this a relatively large number of files has had to be modified, in particular the texture classes and
image plugins that doing writing.
bc27ad4
@osg-training-guest osg-training-guest Fixed compile error a1b8e9f
@osg-training-guest osg-training-guest From Paul Martz, Added ViewerBase::s/getEndBarrierOperation(..) metho…
…d to allow user control of how viewers are sync'd.
84aa777
@osg-training-guest osg-training-guest Moved setEndBarrierOperation(..) implementation into .cpp and added s…
…upport for stoppig and starting threading if required.
6af38c5
@osg-training-guest osg-training-guest Chris Denham, fixed type of parameters to ensure they are longs where…
… appropriate.
15f851a
@osg-training-guest osg-training-guest From Paulk Martz, "Looks like the ClipNode::setReferenceFrame comment…
… block came from LightSource. Fixing the comment block to refer to ClipNode instead of light source."
398b50a
@osg-training-guest osg-training-guest Fixed indentation and spaces at ends of lines. 973880a
@osg-training-guest osg-training-guest From Tobias Ottenweller, "this is a fix for the problem where all inp…
…ut freezes for a quarter second when calling requestWarpPointer under Mac OS X (described here: http://forum.openscenegraph.org/viewtopic.php?t=3933 ).

I used the latest version available via subversion.

My fix is using some API only available on 10.4 and later. I used some preprocessor statements to gain compatibility with 10.3 and earlier using (now) deprecated API.

Only tested on OS X Lion (10.7). Please do some testing as well since I'm fairly new to OpenSceneGraph. Someone should also test the code for 10.3 and earlier."
5a51fba
@osg-training-guest osg-training-guest Made the cursor state protected. ea276e7
@osg-training-guest osg-training-guest Changed the KeyEventToggleTexturing to 'e' to avoid conflict with 't'…
… used for transparency.
053955b
@osg-training-guest osg-training-guest From Luc Frauciel, "Ati FirePro is as much crippled as other Ati driv…
…ers.

This patch add "FirePro" to the black list of renderers in State.cpp / initializeExtensionProcs

It allows to avoid an OpenGL error on Viewer initialization.
Tested on FirePro  M7740 / Windows7 x64  Driver 8.85.7.2"
ae7351a
@osg-training-guest osg-training-guest From J.P. Delport, "GraphicsWindowX11 typo, I believe X/Y's should ma…
…tch."
79df4f3
@osg-training-guest osg-training-guest From J.P. Delport, "this fall-through had me scratching my head for a…
… while...

It made InteractiveImageHandler eat keypresses outside its image."
e09e534
@osg-training-guest osg-training-guest From J.P. Delport, "when switching from windowed mode to fullscreen (…
…with the 'f' key) in X11, no RESIZE event is generated. This confuses handlers that perform some processing on the RESIZE event, e.g. the InteractiveImageHandler.

To reproduce the problem I attach a minimally modified osgviewer that just prints resize events. You can check what's printed in the console when you go fullscreen and windowed a few times.

The attached version of GraphicsWindowX11 fixes the problem for me, but I'm not sure this is the right approach. Maybe you can see a fix for the problem clearer.

The only place where the RESIZE event is generated in GraphicsWindowX11 is in CheckEvents and it then depends on the ConfigureNotify message. For some reason, either ConfigureNotify is not sent when going fullscreen or the traits already reflect the latest window size."
ffcc8b2
@osg-training-guest osg-training-guest Quietend down debug message 4327a41
@osg-training-guest osg-training-guest From Stephan Huber, "a recent submission added a 10.6-feature to Grap…
…hicsWindowCocoa. I added

some ifdefs around, so it compiles again with 10.5 SDK"
871143d
@osg-training-guest osg-training-guest From Kristofer Tingdahl, Added missing core OSG libraries. 6145263
@osg-training-guest osg-training-guest Added support for Scale1DDragger, Scale2DDragger and TranslatePlaneDr…
…agger to --dragger command line option
5166c88
@osg-training-guest osg-training-guest Improved the handling of osgManipulator::Constraint, DraggerCallbacks…
… and Command so that they now use a Visitor Pattern

 to ensure the correct methods on constraints and callbaks are called for each Command.  Also fixed the handling of
Constraints when applied to composite Draggers.
ab62d8e
@osg-training-guest osg-training-guest Added DraggerTransformCallback::HandleCommandMask to DraggerTransform…
…Callback to allow applications to select which

commands they want the dragger callback to respond to why updating the transform.
c487f66
@osg-training-guest osg-training-guest Added example usage of teh new DraggerTransforCallback's HandleComman…
…dMask which is tied to the TabPlaneDragger example.
89dce51
@osg-training-guest osg-training-guest Renamed selection to transform to make it clear to understand what is…
… being done.
1d0aaa1
@osg-training-guest osg-training-guest From Luc Frauciel, "FBX plugin was locked on version 2012.1 of FBX SD…
…K which is not available anymore on Autodesk website.

This patch allows version of FBX >= 2012.1, which includes current one : 2012.2
"
f6ab9d7
@osg-training-guest osg-training-guest From Colin McDonald, "I have an application with multiple windows. Th…
…ey share GL objects

between the contexts, using the GraphicsContext::Traits sharedContext
and setting the same contextID.

When one of these shared contexts is closed, GraphicsContext::close
deletes all GLObjects for that contextID, regardless of the fact that
they are shared.  This means that all of the other contexts sharing the
objects have to recompile them.

The attached tweak makes GraphicsContext::close a bit less brutal for
shared contexts.  I have also changed a misleading diagnostic message.
"
42be567
@osg-training-guest osg-training-guest From Terry Welsh, improved support for handling archives 424d92f
@osg-training-guest osg-training-guest Improved handling of archives a9d0dbd
@osg-training-guest osg-training-guest From Stephan Huber, "attached you'll find a first version of multi-to…
…uch-support for OS X (>=

10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.

The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.

After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).

I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.

While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.

Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.

There's even a small example video here: http://vimeo.com/31611842"
4d7b33e
@osg-training-guest osg-training-guest From Stephan Huber, "attached you'll find a first version of multi-to…
…uch-support for OS X (>=

10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.

The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.

After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).

I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.

While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.

Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.

There's even a small example video here: http://vimeo.com/31611842"
64be859
@osg-training-guest osg-training-guest From Alexander Sinditskiy, "looks like GlyphGeometries _glyphGeometri…
…es; should be removed because Glyph3D have the same named local variable."
20a8c8c
@osg-training-guest osg-training-guest Fixed silly compiler warning that was being produced in error. b0f9a5e
@osg-training-guest osg-training-guest From Brad Christiansen, "The attached files add the ability to contro…
…l when a paged child becomes eligible for expiry based on time and/or elapsed frames.

I found that some of the items that had been paged in were being expired on the first frame that they were not visible (as the cache was full). This resulted in excessive paging every time the view was moved. With the following changes I could only allow children to be expired if they had not been used for e.g. 30 seconds or 60 frames."
bba046c
@osg-training-guest osg-training-guest Fixed indendation and line endings fce0cae
@osg-training-guest osg-training-guest From Jan Peciva, "attaching improved StatsVisitor. Changes:
- apply() and reset() methods made virtual to allow overriding
- added apply(StateSet&) to make more easier to gather StateAttribute
statistics in user-derived classes
"
1bd2ddb
@osg-training-guest osg-training-guest From Jason Beverage, "Attached is a patch to the SVG plugin to use ca…
…iro_surface_destroy

instead of free.  This was causing a crash on Windows.
"
33cc3e0
@osg-training-guest osg-training-guest From Paul Palumbo, "This change seems to fix a problem reading 32-bit…
… Floating point tiff images. Without this fix, I'm only getting half my image displayed in "osgviewer --image"."
ff2031c
@osg-training-guest osg-training-guest From Robert Milharcic, "In attached file I implemented LOAD_IMMEDIATE…
…LY mode for new osg ProxyNode wrapper. Current version of proxynode loading uses DatabasePager for both modes(DEFER_LOADING_TO_DATABASE_PAGER and LOAD_IMMEDIATELY).

Immediate loading of external references begins after ProxyNode has been deserialized in ProxyNodeFinishedObjectReadCallback."
b2ee38a
@osg-training-guest osg-training-guest From Cory Riddell, "I've been using the dot plugin and found that our…
… application which sets

the global locale was generating bad dot files. Specifically, the node
numbers had comma separators in them (like 1,234 rather than 1234).

The attached file simply forces the stringstreams used to build up the
dot file to use the "C" locale."
0aabbc6
@osg-training-guest osg-training-guest From Mathias Froehlich, "The attached change to the default font make…
…s the baseline correctly working

and makes the glyphs aspect ratio match their 12x8 bitmaps.
I am not exactly sure about osgTexts current internals but it matches the
changes that happened lately to the txf font.
"
63af93c
@osg-training-guest osg-training-guest From Mathias Froehlich, "Attached is a change to the stats handler so…
… that the aspect ratio of the

viewer stats coordinates always stay about 1:1 to the pixels.
This helps for more readable stats with very wide windows for example."
f21e891
@osg-training-guest osg-training-guest From Mathias Froehlich, "In Optimizer.cpp a nodes update callback is …
…checked twice and the cull

callback is checked never for the decision of a node being redundant.
The change replaces one of the update callback tests with a cull callback
test."
c94d9cd
@osg-training-guest osg-training-guest From Sukender, "I just fixed using UTF8 paths in JP2 readerwriter und…
…er Windows. Jpeg2000 plugin could not handle UTF8 paths as it was using an Japser open() function which seems to be based on the standard fopen(). The fix simply opens the file beforehand and only gives a FILE* to the Jasper lib (and then closes the file, of course).

"
9de6159
@osg-training-guest osg-training-guest From Rudolf Wiedemann, "the file attached fixes the incomplete implem…
…entation of "osg::DefaultUserDataContainer"'s copy constructor.

Copying user objects was missing."

Note from Robert Osfield, in submission changed
    _objectList.push_back((*itr)->clone(copyop));
to
    _objectList.push_back(copyop(*itr));
7c23fc6
@osg-training-guest osg-training-guest From Tamer Fahmy, Fix for bug when scrolling down and using render on…
… demand.

"Currently issuing a mouse scroll DOWN event would stop updating
animations in progress.

The fix consists of changing the line
 us.requestContinuousUpdate( false );
to:
 us.requestContinuousUpdate( isAnimating() || _thrown );

in OrbitManipulator::handleMouseWheel() as has been done for the
GUIEventAdapter::SCROLL_UP case a couple of lines earlier or in
src/osgGA/FirstPersonManipulator.cpp."
5f2a687
@osg-training-guest osg-training-guest From Wojciech Lewandowski, "This is a one line modification of StatsH…
…andler.cpp to work correctly while dumping states to console when ViewerStats getEarliesFrameNumber() and getLatestFrameNumber() return zeroes. If that happened in current version, printing loop was iterating between 0 and 0xFFFF FFFF indices and that was hanging our system.

"
bc21f57
@osg-training-guest osg-training-guest From Lionel Lagarde, "The setNormal method of osg::Billboard has side…
… effects (it calls updateCache and update the normal to Z rotation matrix). When cloning billboards, copying the normal vector is not enough. In the correction, the copy constructor calls setNormal to update the internal members."
5e899d1
@osg-training-guest osg-training-guest From David Fries, "Of the two ways to use the Tessellator object, only
retessellatePolygons was applying the winding and boundary option.
Moved the gluTessProperty calls into beginTessellation().

There's a comment typo fix, removing an unused VertexPointList
typedef, and allocates one _tobj instead of one per tesellation.
Protections were added to check that _tobj was allocated in the few
remaining places it wasn't being checked.

---
On a side note, I would like to avoid the 'new Vec3d' in
Tessellator::addVertex for each call to
gluTessVertex(tess, location, data).
The RedBook leaves it ambiguous if the location pointer must
remain valid after gluTessVertex or not.
http://www.opengl.org/sdk/docs/man/xhtml/gluTessVertex.xml
says that changing location is not safe, so being conservative, I'll
leave it as is, even though the Mesa GLU library copies the data not
the pointer, so it is currently safe."
75ddf94
@osg-training-guest osg-training-guest From Marius Kintel, "GraphicsWindowQt::WindowData no longer requires …
…the parent widget of a graphics window to be of type GLWidget."
0b40660
@osg-training-guest osg-training-guest From Nico Kruithof, "I found that Collada wasn't found correctly with…
… visual studio 2010."
8a562b7
@osg-training-guest osg-training-guest From Johannes Baeuerle, "The first problem is wrong value of the bloc…
…k size of etc1 textures in the getCompressedSize call in Texture.cpp. With the current block size of 16 the target application crashes with a GL_INVALID_VALUE. The reason is that the calculated size passed to OpenGL does not match the size of the passed data(data pointer,texture width,texture height,spec of etc1).

With a block size of 8 in the getCompressedSize call this error dissapears."
4920378
@osg-training-guest osg-training-guest From Alexander Irion, "Added missing format GL_ALPHA to Image::comput…
…eFormatDataType()."
1074cbc
@osg-training-guest osg-training-guest Fixed build issues when compile with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_…
…CONVERSION set to OFF.
6971354
@osg-training-guest osg-training-guest From Claus Scheiblauer, "in GraphicsWindowQt.cpp the GLWidget::keyRel…
…easeEvent was implemented slightly different to the GLWidget::keyPressEvent, which caused the cursor keys values to be not correctly mapped from an QKeyEvent value to an osg key value when releasing a cursor key."
4b1ad09
@osg-training-guest osg-training-guest From Leandro Motto Barros,
"I've made a few changes to osgUtil::PolytopeIntersector so that it
actually uses double precision floating point numbers everywhere (as
long as OSG_USE_FLOAT_PLANE is not defined).

I needed double precision intersections in a project I am working on.
These changes fixed the problems I was having -- this is all testing I
have done.

Notice that I have changed
osgUtil::PolytopeIntersector::Intersection's members to use doubles
(osg::Vec3d, instead of osg::Vec3). I could have added #ifdef's there
too, but I think it is better to not change the types of stuff in the
public interface depending on some preprocessor definition.

The modified files are attached. A diff also follows, for those who like it."

With the following changes from Robert Osfield:

"I've just reviewed your changes and have just tweaked them a little to
streamline them.  What I have done in the PolytopeIntersector header
is add:

       typedef osg::Plane::Vec3_type Vec3_type;

And then use this typedef in the definition of the vertices rather
then Vec3d as you did.  Next changes were to PolytopeInteresector.cpp
where to the PolytopeIntersectorUtils defintions of the Vec3_type, and
value_type which now simply read:

   typedef osg::Plane::Vec3_type Vec3_type;
   typedef Vec3_type::value_type value_type;

This way I was able to complete avoid any if def's and have essential
the same implementation as you achieved.  Changes now checked into
svn/trunk."
260d656
@osg-training-guest osg-training-guest From Paul Martz, "This change clarifies the description for OSG_GL_VE…
…RTEX_ARRAY_FUNCS_AVAILABLE."
4ccd66b
@osg-training-guest osg-training-guest From Hartmut Seichter, "attached a revised CMakeLists.txt file for An…
…droid that avoids the problems with a ARM gcc bug that appears in the NDK. It only overrides the optimization level for one file. As it resides only in the cfg parser this should not have side effects on performance."
870ad22
@osg-training-guest osg-training-guest From Thorsten Brehm, "attached update changes OSG's src/osgDB/Registr…
…y.cpp, so it doesn't (accidentally) resolve relative paths against the current working directory when searching for resources. So far, such paths were always resolved against the cwd first.

I guess the previous behaviour of giving the cwd precedence over any path configured in the "database path list" (osgDB::Options) wasn't intentional. Otherwise, if it was intentional after all, it'd be good to add another feature instead, to make this configurable - e.g. a flag in osgDB::Options to disable this, if an application doesn't want the cwd being considered.
"

Note from Robert Osfield, this submission will change the default behaviour of searching for files so can potentially break existing applications as it
won't search the current working direction unless it's included in the DataFilePathList entry in the Options or Registy.  I'll add a follow
up submission to add back in this feature.
917b022
@osg-training-guest osg-training-guest From Chris Denham, "This is a submission to fix a problem with use of…
… mode GL_RESCALE_NORMAL for geometries below a scaling transform which is not equal in X, Y & Z components. In this case, the 'slow' method of mode GL_NORMALIZE should be used to perform the normalization.

I have attached a correction to daeRTransforms.cpp based on trunk at [12892] which corrects this problem.

This is the changed section:

Code:
       if (scale.x() == scale.y() && scale.y() == scale.z())
       {
           // This mode may be quicker than GL_NORMALIZE, but ONLY works if x, y & z components of scale are the same.
           ss->setMode(GL_RESCALE_NORMAL, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
       }
       else
       {
           // This mode may be slower than GL_RESCALE_NORMAL, but does work if x, y & z components of scale are not the same.
           ss->setMode(GL_NORMALIZE, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
       }"
61afab4
@osg-training-guest osg-training-guest Added back in support for checking the current working directory by d…
…efault, but now do the check

after the Options and Registry DataFilePathLists have been checked, which will allow users to better control
over where files are searched for.
049e1ca
@osg-training-guest osg-training-guest From Filip Arlet,"I ran into problem with osg::Text _BASE_LINE alignm…
…ent. It didn't account line spacing. Btw. same problem in 3D text

Changed _offset from: -_characterHeight*(_lineCount-1)
to: -_characterHeight*(1.0 + _lineSpacing)*(_lineCount-1)"
20044cb
osg-training-guest and others added some commits Mar 9, 2012
@osg-training-guest osg-training-guest From Chuck Seberino, "Attached are modified versions of RotateCylinde…
…rDragger and Projector files that clean up the use of _onCylinder / isProjectionOnCylinder().

I have also made changes to the RotateCylinderDragger to provide a cylinder ring with a thickness.   It is totally optional, but IMHO makes the default behavior work better than a solid cylinder (which typically obscures the geometry you are trying to drag).  Gives it a bit more to grab, especially in the case where eyepoint and cylinder axis are near parallel.
"
7d03033
@osg-training-guest osg-training-guest Updated ChangeLog and AUTHORS file for 3.1.1 dev release a021872
Cedric Pinson Changed osgAnimation::StackedTransform::update(t). It can now be used…
… for custom usage
3252dbf
@osg-training-guest osg-training-guest Moved static initializers into global scope to prevent problems with …
…using exit().
577cbf0
@osg-training-guest osg-training-guest From Wang Rui, "I'd like to submit a slightly modified version of the…
… ViewDependentShadowMap. It includes two fixes: one is in ComputeLightSpaceBounds::update(), which changes the statement "if (v.z()<0.0f)" to "if (v.z()<-1.0f)" as clipping space coordinates should be transformed to [-1, 1] and should not be discarded unless they go beyond the range; the other is in ViewDependentShadowMap::computeShadowCameraSettings(), in which I changed the line:

viewMatrix.makeLookAt(frustum.center+positionedLight.lightDir*zMin, frustum.center, lightUp);
to
viewMatrix.makeLookAt(frustum.center+positionedLight.lightDir*zMin, frustum.center+positionedLight.lightDir*zMax, lightUp);

The reason I've done such a change is that for huge scenes like a city on the earth, the values of frustum.center can be extremely large, but zMin may be very small (e.g., when model depth in light coords equals the model radius by chance) in some cases so the result of (eye - center) might jiggle while moving around the shadow scene and thus make the shadow map suddenly disappear some time. The small change here also considers the effect of zMax to avoid such problems.

"
7e4b748
@osg-training-guest osg-training-guest Fixed the order of setting of CenterMode d34777c
@osg-training-guest osg-training-guest From Lukasz Izdebski, Added StencilTwoSided support to ive plugin d19ed8e
@osg-training-guest osg-training-guest Replaced && with & to address error in handling bitmask 55a7433
@osg-training-guest osg-training-guest Removed inappropriate warning d0d5842
@osg-training-guest osg-training-guest Updated version number 316b95a
@osg-training-guest osg-training-guest Added Traits::getContextVersion(uint,uint) ef527b4
@osg-training-guest osg-training-guest From David Callu, "just a typo fix that break the compilation under w…
…indows"
2ca41c0
@osg-training-guest osg-training-guest For all OSG_GL*_FEATURE #defines changed 1's to true and 0's to false. 1984792
@osg-training-guest osg-training-guest Ran script to remove trailing spaces and tabs 6dca6b9
@osg-training-guest osg-training-guest From Erik den Dekker, "
IF(${CMAKE_OSX_SYSROOT} STREQUAL "/Developer/SDKs/MacOSX10.7.sdk")
...

            ELSEIF(${CMAKE_OSX_SYSROOT} STREQUAL "/Developer/SDKs/MacOSX10.5.sdk" OR ${CMAKE_OSX_SYSROOT} STREQUAL "/Developer/SDKs/MacOSX10.6.sdk")

...

ELSEIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
...

            ELSE()

...

            ENDIF()


Which is fragile because XCode could be installed into another directory than /Developer. (In case XCode is not installed into the /Developer directory CMake can automatically resolve the path via command line utility ${CMAKE_XCODE_SELECT} --print-path)

This issue bites me currently because the latest XCode (Version 4.3.1 - 4E1019) installed through the Mac App Store is per default installed in "/Applications/Xcode.app/Contents/Developer" and hence the 10.7 SDK in "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"

Searching the web to find the proper way to determine the version of the Platform SDK programmatically, I found no standard way. I came up with 2 options myself:

1) Parse the path string to extract the version number

2) Read a value from the SDKSettings.plist found in the root of each SDK  (e.g., "defaults read ${CMAKE_OSX_ROOT}/SDKSettings.plist CanonicalName" gives "macosx10.7")

I implemented the last option and verified that at least the following Mac OS SDKs (10.3.9, 10.4, 10.5, 10.6, 10.7) support this method. It also looks reasonably future proof. An additional benefit of this method is that it also seems to be compatible with iOS and iOS Simulator SDKs (at least for version 5.1, but I assume this also applies to older versions). This is interesting because the CMake infrastructure to build OSG for iOS currently still contains similar hard-coded paths and even requires you to manually change the cmake file to build for another iOS SDK version. In the near future I hope to address these issues, but I haven't been able to try this yet."
671e255
@osg-training-guest osg-training-guest As per Ulrich Hertlrein's suggestion, changed APPLE_PLATFORM_SDK_CANO…
…NICAL_NAME to OSG_OSX_SDK_NAME.
0e5c1d4
@osg-training-guest osg-training-guest From Ulrich Hertlein, "as discussed on osg-users there is an issue wi…
…th clang++ on OS X and iOS that results in

the following error:

Users/stephan/Documents/Projekte/cefix/cefix/ios/../../libs/ios/include/OpenThreads/Atomic:244:48:
error: cannot initialize a parameter of type 'void *' with an lvalue of
type 'const void *const'
   return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew);

This can be solved by a cast to '(void*)ptrOld'.  This should be benign since both
'ptrOld' and 'ptrNew' are only read and the cast is in fact in place for all other
implementations as well.

On OS X the cast compiles cleanly on both g++ (i686-apple-darwin11-llvm-g++-4.2 (GCC)
4.2.1) and clang++ (Apple clang version 3.1 (tags/Apple/clang-318.0.54)).
"
1e8b6f7
@osg-training-guest osg-training-guest From Luc Frauciel, "I've encoutered a nasty group of dae which are in…
…compatible with dae plugins (and probably collada schema ) in 4 different ways :

1)  they use direct link to texture

-> this is already handle by current plugin : OK

2)  they defined colors with only 3 color components

->  it leads to a crash when trying to acces to the fourth component
 I fixed that

3)  they contain empty primitive lists

-> reading is ok, but osgviewer crashes when trying to display the geometries
The reason is that osg assume that  DrawElementsare never empty (blunt acces to DrawElements.front() in PrimitiveSet.cpp)
I corrected this (on the plugin side), but I wonder :
Is it the responsability of plugins to create non empty DrawElements, or of osg core not to crash when they occur ?
If the responsability is on the osg core side, I can submit a patch to PrimitiveSet.cpp regarding that aspect.

4)  they use a material binding scheme not supported by the plugin

->I've implemented a mechanism to handle this binding scheme

You will also find in the patch an example of these evil dae and comments on the offending elements.
They seems to be produced by ComputaMaps (www.computamaps.com)
They load well in Google Earth
"
4bc50c1
@osg-training-guest osg-training-guest Fixed potential memory leak 7820cf6
@osg-training-guest osg-training-guest Updated ChangeLog and AUTHORS for 3.1.2 dev release ec35eae
@osg-training-guest osg-training-guest Removed trailing spaces d595793
@osg-training-guest osg-training-guest Added int packing parameter to Image::readPixels(..) 32f31fb
@osg-training-guest osg-training-guest From David Callu, "Here an update of osg::Uniform :
- add non square matrix
- add double
- add all uniform type available in OpenGL 4.2
- backward compatibility for Matrixd to set/get an float uniform matrix
- update of IVE / Wrapper ReadWriter

implementation of AtomicCounterBuffer based on BufferIndexBinding

add example that use AtomicCounterBuffer and show rendering order of fragments,
original idea from geeks3d.com."
ef9d865
@osg-training-guest osg-training-guest From Magnus Kessler, "remove unecessary conversion from float in doub…
…le precision method"
e7ff818
@osg-training-guest osg-training-guest From Cedric Pinson, "I Updated the ply plugin to support alpha color …
…in files. Plus I updated it to use by default an alpha of 1.0 instead of 0 when no alpha is specified.

Last changes is to divide byte color by 255.0 instead of 256.0."
a7e5fc0
@osg-training-guest osg-training-guest From Magnus Kessler, typo and documentation fixes 24c9ed8
@osg-training-guest osg-training-guest Added check to avoid accessing pointer past the end of the string. 347556e
@osg-training-guest osg-training-guest Updated ChangeLog for dev release cc274a6
@osg-training-guest osg-training-guest Update AUTHORS for release 1c80385
@osg-training-guest osg-training-guest From Wang Rui, "I'd like to submit the changes that will put ObjectPr…
…operty and ObjectMark variables into the InputStream/OutputStream class instead of static ones. This should avoid the threading problem and won't repeatedly reallocate memory for the properties. Some of the wrappers will be slightly modified to use the property variable stored in the InputStream/OutputStream as well."
e61ac98
@osg-training-guest osg-training-guest From Ulrich Hertlein, Fix for MatrixTemplate compile errors f06ca66
@osg-training-guest osg-training-guest From Martin Naylor, "Please find attached a fix for the STD library(t…
…ested under Windowsx64

VS2008) when atomiccounter is found but not used."
efb5793
@osg-training-guest osg-training-guest Updated version number 306fb01
@osg-training-guest osg-training-guest From Martin Naylor, "I have been experiencing a crash in the example …
…osgtexture2D.

Not sure why my system seems to be so sensitive to these problems.

But attached is a fix which seems to stabilise the example.
Note: it only seems to crash intermittently when spinning the object with
your mouse.

So I assume this is a threading issue because of the data variance missing
in some of the text node setups in the example.
"
c94e318
@osg-training-guest osg-training-guest From Mathias Froehlich, "Attached is a change to the slow path geomet…
…ry dispatch tables that allows the

use of 3 component float color vectors."
c796bb6
@osg-training-guest osg-training-guest Refactored the handling of GLES adaptations of the 1,2,3,4 internal f…
…ormats and added handling of GL_RGB8_OES and GL_RGBA8_OES.
c222d66
@osg-training-guest osg-training-guest From Jorge Izquierdo Ciges, "Mostly small changes to add more compile…
… options, and shared linking (still testing that capability, but this enables on a compile basis if the user wants). Robert, when you give the Ok I'll update/rewrite the Android section in the old/new wiki you'll say where is better. Mostly to be clear for the future users what options can configure and what are their purpose."
a9c305c
@osg-training-guest osg-training-guest Added missing getUniformBlocks implmentation fd81262
@osg-training-guest osg-training-guest From David Callu, "Here the fix for Matrix{2,3,4}x{2,3,4}{fd} defined…
… in Uniform header.

My previous patch for Atomic Counter Uniform provide new template implementation
of Matrix{2,3,4}x{2,3,4}{fd}. This new implementation use Column-Major Matrix.
Original code define matrix as Row-Major matrix like other Matrix in OSG, and
my matrix implementation break compatibility with previous code.
For example osg_normalMatrix define in osg::State report by Roland Hill.
Thanks to Paul Martz to spot me when the bug appear."
7c5f085
@osg-training-guest osg-training-guest Fixed build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT set to OFF. 7e1b9dc
@osg-training-guest osg-training-guest Changed #ifdef __IPHONE_4_0 to #if defined(__IPHONE_4_0) to fix error…
… that Clang compile warning highlighted
49f3fb0
@osg-training-guest osg-training-guest Restructed how the GL_SAMPLER_* #define's are placed to avoid build p…
…roblems under GLES.
56d3939
@osg-training-guest osg-training-guest From John Kaniarz, "Here is an example of using tessellation shaders …
…in osg. With permission from the author, I adapted it from this tutorial:


http://prideout.net/blog/?p=48"
3377be8
@osg-training-guest osg-training-guest Ran dos2unx on file 87acf4b
@osg-training-guest osg-training-guest From John Kaniarz, "Here's a patch to add new extensions for tessella…
…tion shaders to the GLSL

plugin." "I went with .tctrl and .teval for the shader extensions."
d28cb25
@osg-training-guest osg-training-guest From Mathias Froehlich,"Attached is a change to the ac3d model loader…
… as of rev 11498, that uses

indexed draws instead of plain array draws to save some amount of main memory.
Draw performance does not change with the nvidia binary blob as well as with
the open source drivers."
bd2bc68
@osg-training-guest osg-training-guest From Christophe Herreman, Added viewer.setCameraManipulator( keyswitc…
…hManipulator.get() ) to fix problem with master Camera not being updated
b8e6ad1
@osg-training-guest osg-training-guest Added using base_class::set to the Matrix*Template class to enable th…
…e set() method from the base class to be used.
1f9afc4
@osg-training-guest osg-training-guest Fixed for including cmath before osg/Math. f15e43c
@osg-training-guest osg-training-guest Removed trailing spaces fb0ab1f
@osg-training-guest osg-training-guest Removed -ftree-vectorize from OSX 10.7 build to avoid warning when bu…
…ilding with clang.
81bab2d
@osg-training-guest osg-training-guest From Jaap Gas, added missing break, and missing removeDraggerCallback. 06124ea
@osg-training-guest osg-training-guest From Jaap Glas, "Added a default parameter to the following construct…
…or in TabPlaneDragger

  and TabPlaneDragger.cpp:

TabPlaneDragger(float handleScaleFactor=20.0f);

The reason for this is that the default OSG tab sizes are way bigger than
those we used in our application so far. And since handleScaleFactor_
is already a (constant) class member, I see no objection against making
it user defined."
9e4f691
@osg-training-guest osg-training-guest Added Dragger::get/setActivationMouseButtonMask(uint). a89e325
@osg-training-guest osg-training-guest From Wang Rui, "A very small but maybe fatal problem was found when I…
… saved models with shader and uniforms (with new double types support) to osgb format and tried to read it again. The application will crash here. And the serializer file should be slightly changed to fix it. Please replace the original file in osgWrappers/serializers/osg/Uniform.cpp."
157f714
@osg-training-guest osg-training-guest Added typdef for Win32 d0bfef7
@osg-training-guest osg-training-guest Added --fps support 03bad02
@osg-training-guest osg-training-guest Added osg::ImageSequence support into osgPresentation::SlideShowConst…
…ructor and the associated <image> tag in .p3d.
013e768
@osg-training-guest osg-training-guest Added ImageStream support to <image> and <stereo_image> tags in .p3d 8649495
@osg-training-guest osg-training-guest Added support for setting the <image> paging_mode property to PRE_LOA…
…D_ALL_IMAGES, PAGE_AND_RETAIN_IMAGES or PAGE_AND_DICARD_IMAGE for osg::ImageStream,

with PAGE_AND_DICARD_IMAGE set as the default.
273962f
@osg-training-guest osg-training-guest Commented out the disabling of use of PBO's in ImageStream, and disab…
…led the use ClientStoreHint in Present3D.
a3aa00d
@osg-training-guest osg-training-guest Enabled 6 ImageThreads in the ImagePager 58dd06c
@osg-training-guest osg-training-guest Added FileNameComparator to sort the filenames in an ImageSequence in…
…to alphanumerical order so that it can handle the numerical ordering found in screenshot numbered sets of files
687e6f4
@osg-training-guest osg-training-guest Moved the frame() event into the event traversal after then events an…
…d their state have been accumulated.
cc8c903
@osg-training-guest osg-training-guest Fixed spelling of FileNameComparator 54e72d1
@osg-training-guest osg-training-guest Restructed the way that the global notify variables are initialized t…
…o avoid problems with multi-threaded initialization of these variables.
8ac07df
@osg-training-guest osg-training-guest Refactored the way that the static Scene cache is managed by moving a…
…ll the functionality into a SceneSingleton
8d81ea5
@osg-training-guest osg-training-guest From Riccardo Corsi, introduced CameraManipulator::updateCamera() met…
…hod that allows more Camera properties to be controlled by the CameraManipulator.
b68652c
@osg-training-guest osg-training-guest Changed updateCamera(Camera*) to updateCamera(Camera&) to make it cle…
…ar that a valid Camera object should be passed in.
09d3456
@osg-training-guest osg-training-guest Moved mask settings into ShadowSettings c4136a8
@osg-training-guest osg-training-guest Changed settings of masks to use ShadowSettings. 8a05aec
@osg-training-guest osg-training-guest Enabled the use the getReceivesShadowTraversalMask(). 25ade98
@osg-training-guest osg-training-guest Replaced use of now deprecated methods. 1e87941
@osg-training-guest osg-training-guest Fixed parameter default value to avoid warning 7dae866
@osg-training-guest osg-training-guest Fixed indentation 1900920
@osg-training-guest osg-training-guest Introduced Texture::Extensions::s/getPreferGenerateMipmapSGISForPower…
…OfTwo() flag that defaults to false for Radeon, true elsewhere.

This is used to workaround mipmapping bugs with ATI/AMD cards.
9b2e542
@osg-training-guest osg-training-guest Fixed build aed1adf
@osg-training-guest osg-training-guest Added FireGL to prefernce list for use glGenerateMipMap 9e3645b
@osg-training-guest osg-training-guest Removed the erronous creation of a local ShadowSettings object 33765ce
@osg-training-guest osg-training-guest Introduced --near-far-mode into osgshadow and ShadowSettings::setComp…
…uteNearFarModeOverride(..) to allow user control of how the cull traversal is optimized for computing the depth range of the shadow map.
34779a2
@osg-training-guest osg-training-guest Added a mutex to protect the removal and addition of Uniform and Prog…
…ram to StateSet to avoid parents being invalidated when multi-threading.
7cee00d
@osg-training-guest osg-training-guest Added ShadowSettings::s/getMaximumShadowMapDistance(double) property,…
… usage of these property in ViewDependentShadowMap,

and setting of it with --max-shadow-distance <double> in the osgshadow example.
c078223
@osg-training-guest osg-training-guest Added check against the Camera NodeMask to decide whether it's approp…
…riate to test for events on that camera.
be0fd40
@osg-training-guest osg-training-guest Fixed typo 86be5be
@peabody124 peabody124 Fix build for OSX 3730f4f
@peabody124 peabody124 Wrap the APPLE flags in APPLE AND NOT ANDROID so that building for An…
…droid still works under Apple.
40a09d9
@peabody124 peabody124 Reenable 3ds support for Android 3a4a35f
@peabody124 peabody124 Fix typecast in lib3ds_io to use (uint8_t) instead of uint8_t( ... ) cb521d6
@peabody124 peabody124 For Android when search for gdal use HINTS to it doesn't pick up anyt…
…hing installed on the system first if the 3rdparty package is present. I'm not sure why this isn't necessary for the other packages.
3e5e986
@peabody124 peabody124 Do not set the DARWIN_IMAGEIO flag when compiling for Android on and …
…Apple. This allows the jpeg plugin to register for .jpg files.
12dfb2b
@mathieu

Hi, you should zip your changed files and send them to the osg-submission mailing list for proper review but Robert OSFIELD.

Since this is still only a mirror original rules apply : http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol

Sooner or later this repo will take over subversion orinal repository

@openscenegraph openscenegraph pushed a commit that referenced this pull request Jul 21, 2014
@osg-training-guest osg-training-guest From Jaap Gas, "I want to submit a bugfix for a crash occurring in os…
…gText/Glyph.cpp if

the scene tree contains (large) 2D textures from images with STRIDE.

============================================================================
#0  0x00007fffe8ea4350 in __memmove_ssse3 () from /lib64/libc.so.6
#1  0x00007fffe52ced76 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#2  0x00007fffe52d8e86 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#3  0x00007fffe53dd8be in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#4  0x00007fffe53c2643 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#5  0x00007fffe53c7fdd in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#6  0x00007fffe53cbabf in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#7  0x00007fffe53cc1fa in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#8  0x00007ffff30092fd in osgText::GlyphTexture::apply (this=0x1bb8cf0, state=
    ...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/src/osgText/Glyph.cpp:234
#9  0x00007ffff56c30b6 in osg::State::applyAttributeOnTexUnit (this=0x125f180,
    unit=0, attribute=0x1bb8cf0, as=...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:1713
#10 0x00007ffff56c2f3f in osg::State::applyTextureAttribute (this=0x125f180,
    unit=0, attribute=0x1bb8cf0)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:411
#11 0x00007ffff30204da in osgText::Text::drawTextWithBackdrop (this=0x1baed70,
    state=..., colorMultiplier=...)
==============================================================================

The crash disappears if I either (1) disable the use of images with stride
in the (public) osgGeo-library, or (2) add the following bugfix to Glyph.cpp.
This combination gives me the confidence that I understand where this problem
originates from, without trying to understand the full OpenGL details.

===============================================================================
@@ -221,7 +223,12 @@
             imageData[i] = 0;
         }

+        glPixelStorei(GL_UNPACK_ALIGNMENT,1);

+        #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
+        glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth());
+        #endif
+
         // allocate the texture memory.
         glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA,
                 getTextureWidth(), getTextureHeight(), 0,
================================================================================

I have copied (and adapted) the added lines above from the same source file,
where they were used in front of a similar call to glTexSubImage2D(.) around
line 515.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14372 16af8721-9629-0410-8352-f15c8da7e697
4907078
@openscenegraph openscenegraph pushed a commit that referenced this pull request Jul 21, 2014
@osg-training-guest osg-training-guest I want to submit a bugfix for a crash occurring in osgText/Glyph.cpp if
the scene tree contains (large) 2D textures from images with STRIDE.

============================================================================
#0  0x00007fffe8ea4350 in __memmove_ssse3 () from /lib64/libc.so.6
#1  0x00007fffe52ced76 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#2  0x00007fffe52d8e86 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#3  0x00007fffe53dd8be in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#4  0x00007fffe53c2643 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#5  0x00007fffe53c7fdd in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#6  0x00007fffe53cbabf in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#7  0x00007fffe53cc1fa in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#8  0x00007ffff30092fd in osgText::GlyphTexture::apply (this=0x1bb8cf0, state=
    ...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/src/osgText/Glyph.cpp:234
#9  0x00007ffff56c30b6 in osg::State::applyAttributeOnTexUnit (this=0x125f180,
    unit=0, attribute=0x1bb8cf0, as=...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:1713
#10 0x00007ffff56c2f3f in osg::State::applyTextureAttribute (this=0x125f180,
    unit=0, attribute=0x1bb8cf0)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:411
#11 0x00007ffff30204da in osgText::Text::drawTextWithBackdrop (this=0x1baed70,
    state=..., colorMultiplier=...)
==============================================================================

The crash disappears if I either (1) disable the use of images with stride
in the (public) osgGeo-library, or (2) add the following bugfix to Glyph.cpp.
This combination gives me the confidence that I understand where this problem
originates from, without trying to understand the full OpenGL details.

===============================================================================
@@ -221,7 +223,12 @@
             imageData[i] = 0;
         }

+        glPixelStorei(GL_UNPACK_ALIGNMENT,1);

+        #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
+        glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth());
+        #endif
+
         // allocate the texture memory.
         glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA,
                 getTextureWidth(), getTextureHeight(), 0,
================================================================================

I have copied (and adapted) the added lines above from the same source file,
where they were used in front of a similar call to glTexSubImage2D(.) around
line 515."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14371 16af8721-9629-0410-8352-f15c8da7e697
a2a99ca
@openscenegraph openscenegraph pushed a commit that referenced this pull request May 18, 2016
@robertosfield robertosfield I want to submit a bugfix for a crash occurring in osgText/Glyph.cpp if
the scene tree contains (large) 2D textures from images with STRIDE.

============================================================================
#0  0x00007fffe8ea4350 in __memmove_ssse3 () from /lib64/libc.so.6
#1  0x00007fffe52ced76 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#2  0x00007fffe52d8e86 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#3  0x00007fffe53dd8be in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#4  0x00007fffe53c2643 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#5  0x00007fffe53c7fdd in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#6  0x00007fffe53cbabf in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#7  0x00007fffe53cc1fa in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#8  0x00007ffff30092fd in osgText::GlyphTexture::apply (this=0x1bb8cf0, state=
    ...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/src/osgText/Glyph.cpp:234
#9  0x00007ffff56c30b6 in osg::State::applyAttributeOnTexUnit (this=0x125f180,
    unit=0, attribute=0x1bb8cf0, as=...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:1713
#10 0x00007ffff56c2f3f in osg::State::applyTextureAttribute (this=0x125f180,
    unit=0, attribute=0x1bb8cf0)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:411
#11 0x00007ffff30204da in osgText::Text::drawTextWithBackdrop (this=0x1baed70,
    state=..., colorMultiplier=...)
==============================================================================

The crash disappears if I either (1) disable the use of images with stride
in the (public) osgGeo-library, or (2) add the following bugfix to Glyph.cpp.
This combination gives me the confidence that I understand where this problem
originates from, without trying to understand the full OpenGL details.

===============================================================================
@@ -221,7 +223,12 @@
             imageData[i] = 0;
         }

+        glPixelStorei(GL_UNPACK_ALIGNMENT,1);

+        #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
+        glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth());
+        #endif
+
         // allocate the texture memory.
         glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA,
                 getTextureWidth(), getTextureHeight(), 0,
================================================================================

I have copied (and adapted) the added lines above from the same source file,
where they were used in front of a similar call to glTexSubImage2D(.) around
line 515."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14371 16af8721-9629-0410-8352-f15c8da7e697
12cf202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment