Commit Graph

1909 Commits

Author SHA1 Message Date
Robert Osfield
4d86f8dc79 Added --fps support 2012-06-07 10:08:42 +00:00
Robert Osfield
aea3d6855b Removed trailing spaces 2012-05-02 14:13:29 +00:00
Robert Osfield
b86c87d1a8 From Christophe Herreman, Added viewer.setCameraManipulator( keyswitchManipulator.get() ) to fix problem with master Camera not being updated 2012-04-26 10:07:36 +00:00
Robert Osfield
d37eff5c2b Ran dos2unx on file 2012-04-20 09:40:29 +00:00
Robert Osfield
b0c510ab08 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"
2012-04-20 09:38:51 +00:00
Robert Osfield
25989e73f5 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.
"
2012-04-18 09:51:39 +00:00
Robert Osfield
aab27e106c 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."
2012-03-29 09:43:12 +00:00
Robert Osfield
055e1258ea Removed trailing spaces 2012-03-23 16:09:30 +00:00
Robert Osfield
7c278ce5d6 From Christian Buchner, "The attached openscenegraph example is much simpler than
osgshaders.cpp and demonstrates the use of GLSL vertex and fragment
shaders with a simple animation callback. I found the osgshaders.cpp
too complex to serve as a starting point for GLSL programming"
2012-03-06 10:29:47 +00:00
Robert Osfield
8d3790d594 Added RotateCylinderDragger and RotateSphereDragger to list of manipulators for testing purposes 2012-03-06 10:06:00 +00:00
Robert Osfield
f59f4d2929 From Paul Martz, "Just a minor update and typo fix.
"
2012-03-05 14:17:01 +00:00
Robert Osfield
f86efdcd31 Cleaned up CMake warning 2012-02-24 10:56:48 +00:00
Robert Osfield
981182fb01 From Kim Bale, "The application description for osg2cpp was cut and pasted from osgconv and not changed.
I've added a more relevant description."
2012-02-17 16:51:10 +00:00
Robert Osfield
9244ea7603 From Paul Martz, a simple GL3 example 2012-02-09 15:51:20 +00:00
Robert Osfield
3b4333ec9a Fixed silly compiler warning that was being produced in error. 2012-02-06 12:05:36 +00:00
Robert Osfield
85bce8b8ad From Stephan Huber, "attached you'll find a first version of multi-touch-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"
2012-02-03 14:25:08 +00:00
Robert Osfield
95f93e3bf5 Renamed selection to transform to make it clear to understand what is being done. 2012-02-01 17:16:44 +00:00
Robert Osfield
c3b7f6debe Added example usage of teh new DraggerTransforCallback's HandleCommandMask which is tied to the TabPlaneDragger example. 2012-02-01 17:10:48 +00:00
Robert Osfield
7664d90504 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.
2012-01-31 10:56:52 +00:00
Robert Osfield
0381914b42 Added support for Scale1DDragger, Scale2DDragger and TranslatePlaneDragger to --dragger command line option 2012-01-30 12:26:28 +00:00
Robert Osfield
6d66e1abaa Added support for using GL_UNPACK_ROW_LENGTH in conjunction with texture'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.
2012-01-24 14:34:02 +00:00
Robert Osfield
c225f2758c Added --num-sm and --parallel-split and --cascaded command line options to set the appriopriate ViewDependentShadowMap settings. 2011-12-19 09:09:30 +00:00
Robert Osfield
74fb1f42d9 Moved osgshaders example across to use the new osgUtil::PerlinNoise example 2011-12-13 21:14:33 +00:00
Robert Osfield
22ef706e32 Fixed build under Tiny Core. 2011-11-30 19:14:14 +00:00
Robert Osfield
116b9a978c From Trajce Nikolov, "Here is extended version of the osgforest example - technique with geometry shader added, was doing it for a project so I thought might be useful to update the example as well
"
2011-11-18 08:20:04 +00:00
Robert Osfield
c7542d5cd8 Fixed indentation 2011-11-18 08:15:36 +00:00
Robert Osfield
9995cb70a9 Added password support into osgvnc example and vnc plugin 2011-10-26 12:29:38 +00:00
Robert Osfield
62888dba38 Added check against build type to avoid the build of the osgviewerWX example with debug build as this fails with unresolved symbols within the internals of WxWidgets. 2011-10-20 11:50:04 +00:00
Robert Osfield
2c4eb8d181 Fixed typo in command line output, and add an explanation message for when createTexture3D fails to create an osg::Image from a list of input osg::Image. 2011-10-20 08:59:47 +00:00
Robert Osfield
0fc0c642bf Quitened down debug message 2011-10-17 11:12:05 +00:00
Robert Osfield
4992f798d7 From Jean-Sebastien Guay, add --mapres size option to ViewDependentShadowMap settings. 2011-10-17 10:25:28 +00:00
Robert Osfield
3279e9a5f5 Fixed memory leak 2011-09-14 10:45:11 +00:00
Robert Osfield
6c46956918 From Jean-Sebastien Guay, removed unneccessary BUILD_QT_EXAMPLES cmake option 2011-09-13 13:33:41 +00:00
Robert Osfield
5162fcc108 From Wang Rui, "I've encountered a strange problem that osgviewerMFC doesn't work well
with the StatsHandler. When the 's' key is pressed, the rendering
window will be halted. I tried solving the problem by commenting a
line in CMFC_OSG_MDIView::OnKeyDown() and it seems to work now.

Another improvement here is to use a thread class derived from
OpenThreads to replace the old _beginthread(). It helps a lot in
keeping a high frame rate when you open more than one MDI child
windows. And the application using OpenThreads in my opinion will be
more compatible and portable."
2011-09-12 10:47:59 +00:00
Robert Osfield
3a79bc343d Moved ViewDependetShadowMap parameter settings into a dedicated ShadowSettings object in prep for making it possible to scale the API to handle multiple lights and multiple shadow maps per light. 2011-09-07 15:55:54 +00:00
Robert Osfield
f26ef2d9e0 Added optimization of the mutliple cessna shadow model to address peformance issues when rendering 100 cessna's. 2011-09-06 14:13:13 +00:00
Robert Osfield
f95f43dbc6 Added -5 model option using Wang Rui's test demo as a base 2011-09-06 11:42:54 +00:00
Robert Osfield
ecbca83c01 Fixed the heights of the trees and houses 2011-09-06 11:11:38 +00:00
Robert Osfield
454ccad3b9 Replaced use of ShapeDrawable with osgTerrain for the terrain tile 2011-09-05 12:27:20 +00:00
Robert Osfield
2d71a390d3 Added support for setting the MinimumShadowMapNearFarRatio. 2011-08-29 09:59:47 +00:00
Robert Osfield
ef91a87e23 Added names to models to help with debugging. 2011-08-26 15:36:33 +00:00
Robert Osfield
1ad9979cea Added event handling for toggling on/off the light source animation. 2011-08-25 15:39:09 +00:00
Robert Osfield
0d3169f645 Added support for user defined setting of the shadow texture unit 2011-08-24 19:38:58 +00:00
Robert Osfield
26e2106636 Changed new ViewDependentShadowMap to default to a perspective shadow map with automatic detection of a spot light/perspetive light projection
matrix to prevent inappropriate usage of perspective shadow map.
2011-08-24 13:57:15 +00:00
Robert Osfield
b15317481c Added public interface for selecting use of perspective and light space perspective shadow maps. Implementation
of backends not implemented yet so will follow.
2011-08-12 20:29:14 +00:00
Robert Osfield
675a61ea87 Implemented ViewDependentShadowMap::setDebugDraw(bool) to allow osgshadow to enable/disable the debug display via the
standard --debugHUD option.
2011-08-09 15:57:37 +00:00
Robert Osfield
31cb490c75 From Jean-Sebestien Guay and Robert Osfield, mixture of two sets of change - one from JS that adds more controls for specifying positional and spot lights, and from RO adding support for the new ViewDepedentShadowMap 2011-08-07 15:54:21 +00:00
Robert Osfield
b59ab789a3 From Alberto Luacas, typo fixes 2011-07-17 16:24:47 +00:00
Robert Osfield
913e159114 Tightened up float usage. 2011-06-25 07:07:16 +00:00
Robert Osfield
8620c4af7e Tightened up the float/double usage 2011-06-24 19:17:25 +00:00
Robert Osfield
30becd5ed3 Resolved warnings reported by g++ 4.6's -Wunused-but-set-variable.
Warnings were:

/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp: In member function ‘void PrimitiveShapeVisitor::createHalfSphere(unsigned int, unsigned int, float, int, float, const Matrix&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp:1409:11: warning: variable ‘nzBase’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp:1410:11: warning: variable ‘nRatioBase’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp: In function ‘osgUtil::Triangle_list osgUtil::fillHole(osg::Vec3Array*, std::vector<unsigned int, std::allocator<unsigned int> >)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp:569:27: warning: variable ‘ptest’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp: In member function ‘bool osgUtil::DelaunayTriangulator::triangulate()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp:979:45: warning: variable ‘curp’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/RenderStage.cpp: In member function ‘void osgUtil::RenderStage::runCameraSetUp(osg::RenderInfo&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/RenderStage.cpp:631:18: warning: variable ‘stencilAttached’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp: In member function ‘void FadeTextPolytopeData::buildPolytope()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp:74:20: warning: variable ‘edge23’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp:75:20: warning: variable ‘edge30’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/Text.cpp: In member function ‘void osgText::Text::computeBackdropPositions(unsigned int) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/Text.cpp:747:10: warning: variable ‘is_valid_size’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp: In member function ‘virtual bool osgGA::NodeTrackerManipulator::performMovementLeftMouseButton(double, double, double)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp:257:21: warning: variable ‘lookVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp:259:21: warning: variable ‘upVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp: In member function ‘virtual bool osgGA::TerrainManipulator::performMovementMiddleMouseButton(double, double, double)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp:217:11: warning: variable ‘lookVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp:219:11: warning: variable ‘upVector’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgVolume/FixedFunctionTechnique.cpp: In member function ‘virtual void osgVolume::FixedFunctionTechnique::init()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgVolume/FixedFunctionTechnique.cpp:124:30: warning: variable ‘tf’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgParticle/FluidProgram.cpp: In member function ‘virtual void osgParticle::FluidProgram::execute(double)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgParticle/FluidProgram.cpp:38:23: warning: variable ‘velBefore’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgShadow/ParallelSplitShadowMap.cpp: In member function ‘virtual void osgShadow::ParallelSplitShadowMap::cull(osgUtil::CullVisitor&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgShadow/ParallelSplitShadowMap.cpp:593:22: warning: variable ‘bb’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp: In member function ‘virtual void osgTerrain::GeometryTechnique::generateGeometry(osgTerrain::GeometryTechnique::BufferData&, osgTerrain::Locator*, const osg::Vec3d&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp:777:12: warning: variable ‘i_sampleFactor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp:778:12: warning: variable ‘j_sampleFactor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp: In function ‘osg::Image* ReadDDSFile(std::istream&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp:314:10: warning: variable ‘is3dImage’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp: In function ‘bool WriteDDSFile(const osg::Image*, std::ostream&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp:721:10: warning: variable ‘is3dImage’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/hdr/hdrloader.cpp: In static member function ‘static bool HDRLoader::load(const char*, bool, HDRLoaderResult&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/hdr/hdrloader.cpp:101:10: warning: variable ‘cmd’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/vtf/ReaderWriterVTF.cpp: In function ‘osg::Image* ReadVTFFile(std::istream&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/vtf/ReaderWriterVTF.cpp:360:23: warning: variable ‘base’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/jp2/ReaderWriterJP2.cpp: In function ‘int putdata(jas_stream_t*, jas_image_t*, int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/jp2/ReaderWriterJP2.cpp:41:13: warning: variable ‘linelen’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertToInventor.cpp: In member function ‘void ConvertToInventor::processGeometry(const osg::Geometry*, ConvertToInventor::InventorState*)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertToInventor.cpp:1639:10: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertFromInventor.cpp: In member function ‘virtual SbBool SoVRMLImageTextureOsg::readInstance(SoInput*, short unsigned int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertFromInventor.cpp:1264:16: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp: In member function ‘virtual void flt::Face::readRecord(flt::RecordInputStream&, flt::Document&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp:369:19: warning: variable ‘secondaryPackedColor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp: In member function ‘virtual void flt::Mesh::readRecord(flt::RecordInputStream&, flt::Document&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp:942:19: warning: variable ‘secondaryPackedColor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp: In member function ‘virtual osgDB::ReaderWriter::ReadResult FLTReaderWriter::readNode(std::istream&, const Options*) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp:427:40: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ive/ShapeAttributeList.cpp: In member function ‘void ive::ShapeAttributeList::write(ive::DataOutputStream*)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ive/ShapeAttributeList.cpp:31:48: warning: variable ‘it’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp: In member function ‘void ac3d::Geode::ProcessGeometry(std::ostream&, unsigned int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:806:35: warning: variable ‘fRep_s’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:806:43: warning: variable ‘fRep_t’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:807:35: warning: variable ‘fOffset_s’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:807:46: warning: variable ‘fOffset_t’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:932:38: warning: variable ‘primLength’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_geom.cpp: In member function ‘virtual bool trpgGeometry::Write(trpgWriteBuffer&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_geom.cpp:615:19: warning: variable ‘u’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_material.cpp: In member function ‘int trpgMatTable::AddMaterial(const trpgMaterial&, bool)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_material.cpp:103:10: warning: variable ‘spaceInTable’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_rarchive.cpp: In member function ‘virtual bool trpgr_Archive::ReadHeader(bool)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_rarchive.cpp:261:14: warning: variable ‘headerHasTexTable’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp: In member function ‘ZRESULT TUnzip::Get(int, ZIPENTRY*)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:8: warning: variable ‘hidden’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:22: warning: variable ‘system’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:36: warning: variable ‘archive’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/ZipArchive.cpp: In member function ‘virtual bool ZipArchive::getFileNames(osgDB::Archive::FileNameList&) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/ZipArchive.cpp:91:37: warning: variable ‘iterEnd’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/pvr/ReaderWriterPVR.cpp: In member function ‘osgDB::ReaderWriter::ReadResult ReaderWriterPVR::readPVRStream(std::istream&) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/pvr/ReaderWriterPVR.cpp:155:14: warning: variable ‘hasAlpha’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp: In function ‘osg::Geometry* create3DSphericalDisplayDistortionMesh(const Vec3&, const Vec3&, const Vec3&, double, double, osg::Image*, const Matrix&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:737:15: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp: In function ‘osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const Vec3&, const Vec3&, const Vec3&, double, double, osg::Image*, const Matrix&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:1130:19: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:1118:15: warning: variable ‘dx’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/GraphicsWindowX11.cpp: In member function ‘virtual void osgViewer::GraphicsWindowX11::checkEvents()’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/GraphicsWindowX11.cpp:1181:10: warning: variable ‘destroyWindowRequested’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/cfg/ConfigParser.cpp: In member function ‘bool osgProducer::CameraConfig::parseFile(const string&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/cfg/ConfigParser.cpp:2247:13: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgQt/QGraphicsViewAdapter.cpp: In member function ‘bool osgQt::QGraphicsViewAdapter::handlePointerEvent(int, int, int)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgQt/QGraphicsViewAdapter.cpp:344:17: warning: variable ‘viewportGeometry’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp: In function ‘osg::Node* createDistortionSubgraph(osg::Node*, const Vec4&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:125:19: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:126:19: warning: variable ‘texcoord’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp: In function ‘osg::Geometry* createDomeDistortionMesh(const Vec3&, const Vec3&, const Vec3&, osg::ArgumentParser&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:358:15: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgposter/osgposter.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgposter/osgposter.cpp:253:31: warning: variable ‘outputTiles’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgthreadedterrain/osgthreadedterrain.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgthreadedterrain/osgthreadedterrain.cpp:669:10: warning: variable ‘readParameter’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgtext3D/TextNode.cpp: In member function ‘virtual void osgText::Layout::layout(osgText::TextNode&) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgtext3D/TextNode.cpp:80:11: warning: variable ‘characterHeightScale’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgvolume/osgvolume.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgvolume/osgvolume.cpp:678:38: warning: variable ‘internalFormatMode’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ‘bool windowMouseOver(osgWidget::Event&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp:27:24: warning: variable ‘xy’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ‘bool widgetMouseOver(osgWidget::Event&)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp:35:24: warning: variable ‘xy’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/p3d/ReaderWriterP3D.cpp: In member function ‘osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode*, bool, osgDB::Options*) const’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/p3d/ReaderWriterP3D.cpp:2121:10: warning: variable ‘readSlide’ set but not used [-Wunused-but-set-variable]
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/applications/present3D/present3D.cpp: In function ‘int main(int, char**)’:
/home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/applications/present3D/present3D.cpp:639:10: warning: variable ‘sizesSpecified’ set but not used [-Wunused-but-set-variable]
2011-06-22 12:30:01 +00:00
Robert Osfield
7f9e1c5a6f Fixed a range of issues reported by cppcheck:
[examples/osgphotoalbum/PhotoArchive.cpp:56]: (error) Memory leak: fileIndentifier
[examples/osgphotoalbum/PhotoArchive.cpp:257]: (error) Deallocating a deallocated pointer: newData
[examples/osgphotoalbum/PhotoArchive.cpp:318]: (error) Deallocating a deallocated pointer: newData
[src/osg/ImageUtils.cpp:116]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:307]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:312]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:367]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:399]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:400]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:482]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:483]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:484]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:519]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:536]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:71]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:74]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:77]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:82]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:102]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:107]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:599]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:600]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:601]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:602]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:603]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:604]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:605]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:606]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:134]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:135]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:136]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:137]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:139]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:177]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:178]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:195]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:198]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:203]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:205]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:253]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/InputStream.cpp:553]: (error) Memory leak: data
[src/osgDB/OutputStream.cpp:393]: (error) Memory leak: data
[src/osgPlugins/Inventor/ConvertToInventor.cpp:656]: (error) Mismatching allocation and deallocation: tmpArray
[src/osgPlugins/Inventor/ReaderWriterIV.cpp:237]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure
[src/osgPlugins/OpenFlight/expGeometryRecords.cpp:167]: (portability) Extra qualification 'flt::' unnecessary and considered an error by many compilers.
[src/osgPlugins/OpenFlight/expGeometryRecords.cpp:373]: (portability) Extra qualification 'flt::' unnecessary and considered an error by many compilers.
[src/osgPlugins/cfg/CameraConfig.cpp:635]: (error) Unusual pointer arithmetic
[src/osgPlugins/freetype/FreeTypeLibrary.cpp:122]: (error) Memory leak: buffer
[src/osgPlugins/geo/ReaderWriterGEO.cpp:210]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 211
[src/osgPlugins/geo/ReaderWriterGEO.cpp:227]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 228
[src/osgPlugins/geo/ReaderWriterGEO.cpp:903]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 904
[src/osgPlugins/geo/osgGeoNodes.h:180]: (error) Memory leak: geoHeaderGeo::intVars
[src/osgPlugins/geo/osgGeoNodes.h:181]: (error) Memory leak: geoHeaderGeo::useVars
[src/osgPlugins/geo/osgGeoNodes.h:182]: (error) Memory leak: geoHeaderGeo::extVars
[src/osgPlugins/md2/ReaderWriterMD2.cpp:180]: (error) Memory leak: mapbase
[src/osgPlugins/md2/ReaderWriterMD2.cpp:166]: (error) Resource leak: file_fd
[src/osgPlugins/pic/ReaderWriterPIC.cpp:152]: (error) Mismatching allocation and deallocation: tmpbuf
[src/osgPlugins/pic/ReaderWriterPIC.cpp:153]: (error) Mismatching allocation and deallocation: buffer
[src/osgPlugins/ply/plyfile.cpp:843]: (error) Memory leak: plyfile
[src/osgPlugins/pvr/ReaderWriterPVR.cpp:179]: (error) Memory leak: imageData
[src/osgPlugins/shp/ESRIShapeParser.cpp:29]: (error) Resource leak: fd
[src/osgPlugins/shp/XBaseParser.cpp:96]: (error) Resource leak: fd
[src/osgPlugins/zip/unzip.cpp:3158]: (error) Possible null pointer dereference: s - otherwise it is redundant to check if s is null at line 3159
[src/osgPlugins/zip/unzip.cpp:4155]: (error) Dangerous usage of 'rd' (strncpy doesn't always 0-terminate it)
[src/osgShadow/MinimalCullBoundsShadowMap.cpp:334]: (error) Possible null pointer dereference: rl - otherwise it is redundant to check if rl is null at line 331
[src/osgViewer/ScreenCaptureHandler.cpp:617]: (error) Possible null pointer dereference: camera - otherwise it is redundant to check if camera is null at line 611
[src/osgViewer/ScreenCaptureHandler.cpp:632]: (error) Possible null pointer dereference: camera - otherwise it is redundant to check if camera is null at line 626
[src/osgVolume/Locator.cpp:209]: (error) Dangerous iterator usage after erase()-method.
[src/osgVolume/RayTracedTechnique.cpp:274]: (error) Possible null pointer dereference: imageLayer - otherwise it is redundant to check if imageLayer is null at line 259
[src/osgVolume/RayTracedTechnique.cpp:275]: (error) Possible null pointer dereference: imageLayer - otherwise it is redundant to check if imageLayer is null at line 259
[src/osgWrappers/serializers/osg/ShaderBinary.cpp:28]: (error) Mismatching allocation and deallocation: data
2011-06-20 19:15:53 +00:00
Robert Osfield
38a807ae6e Windows warning fixes 2011-06-16 15:57:40 +00:00
Robert Osfield
ba489a04a3 From Anthousis Andreadis, added multiple sampling test for multiple rendering targets which is activated by the --ms command line option. 2011-06-15 09:35:25 +00:00
Robert Osfield
d18250da59 Replaced .osg with .osgt file usage 2011-06-14 16:54:20 +00:00
Robert Osfield
2c2234d68b Improved the handling of command line parameters 2011-06-14 16:50:40 +00:00
Robert Osfield
8d613019ce From Jorge Ciges, "two clean example viewers (GLES1/2) that permit load models withouth recompiling by options in the menu and some basic options. basic options.
As Rafa and I told you earlier this can't be integrated in the CMAKE chain. It needs to be compiled by the user out of the OSG standard compilation. It could be stored in the examples. That way users will not come here asking for the examples.

Main characteristics are:

-Menu with loading and unloading by path.
-Return to home view
-Keyboard capabilities with manipilator switch and basic state changing.
-Change color screen.
-Osg log bypassed to LogCat (This comes practically straight from Marcin Hajder example I've only added personal TAG)
-Earmbi / Earmbi V7
-Install to SD (if the device supports the feature)

And that's all. Now I'm looking to fix the environmental mapping with true GLES (it does not work well in Android) I will try to make it in time for 3.0. The other work that i'm studying Dynamic build with Android but that will need a lot of time to test.
2011-06-09 14:11:04 +00:00
Robert Osfield
22bc0391c7 Refactored the UserDataContainer so that the osg::UserDataContainer is now a pure virtual base class,
with a osg::DefaultUserDataContainer subclassed from this.  The user object access methods have now all
been moved from osg::Object into the UserDataContainer class, except for the set/getUserData() methods
that are left in osg::Object for backwards compatibility, and the description list access methods have
been moved back into osg::Node.

main UserObject access methods are now all def
2011-06-09 12:57:14 +00:00
Robert Osfield
9ac24c8e5d Changed the defaults volume setting to not enable the SampleDensityWhenMoving property. 2011-06-09 10:48:19 +00:00
Robert Osfield
1fbbd347bf Cleaned up example to use the new ImageUtils functions for creating a 3D image from a list of images. 2011-06-08 17:45:24 +00:00
Robert Osfield
86439123b4 Added support for creating a 3D Image from an image list.
Added support for reading a list of images in the Present3D <volume> tag.
2011-06-08 16:10:46 +00:00
Robert Osfield
ebc3c295a7 Removed OSG_EXPORT 2011-06-08 09:28:59 +00:00
Robert Osfield
ccfac57f20 Simplified the osgdepthpartion example to use the osgView::View::setUpDepthPartition(..) feature 2011-06-08 09:24:29 +00:00
Robert Osfield
537272b98f Added support for .osgt, .osgb and .osgx plugins to osgvolume example 2011-06-07 16:17:35 +00:00
Robert Osfield
4f7903f732 From Mathias Froehlich, build fixes for legacy unix systems 2011-06-07 14:26:13 +00:00
Robert Osfield
7f9a6aa49d Added ability to subclass from osg::Object to provide custom user data functionality. A new UserDataContainer provides the
default implementation of the user data functionality.
2011-06-07 13:02:20 +00:00
Robert Osfield
b0ca6de657 Added support for --tf-255 transfer function files 2011-06-03 15:58:36 +00:00
Robert Osfield
f64762b3ec Added new osguserdata example as a guide to the new user object API and as a testbed 2011-06-02 22:06:56 +00:00
Robert Osfield
960f20fe1e Fixed the searchAndReplace function so that it correctly skips over the newly inserted replacement strings. 2011-05-27 11:07:04 +00:00
Robert Osfield
b507858240 Fixed indentation 2011-05-26 16:13:04 +00:00
Robert Osfield
b1d3763510 Renamed example from osgviewerQtContext to osgviewerQt. 2011-05-16 09:17:30 +00:00
Robert Osfield
b4b0e4f069 Updated example to use new GraphicsWindowQt::getGLWidget() method instead of deprecated getGraphWidget() method 2011-05-16 09:16:22 +00:00
Robert Osfield
b3a1b30ab3 Added support for setting threading model from command line and changed default threading model to
CullDrawThreadPerContext.  New command line options are:

   osgviewerQtContext --SingleThreaded
   osgviewerQtContext --CullDrawThreadPerContext
   osgviewerQtContext --DrawThreadPerContext
   osgviewerQtContext --CullDrawThreadPerContext
2011-05-16 09:15:02 +00:00
Robert Osfield
9bbf71b53a From Wang Rui, "A Chinese engineer (named Beilei Geng) reports a possible bug in the
osg2cpp application to me today. The conversion result may become
incorrect if there are quotation marks ( " ) in the shader file, which
will mostly appear in comment lines.

Replace all " into \" before writing to cpp files will solve the
problem, as the attached file shows."
2011-05-12 12:28:43 +00:00
Robert Osfield
946e9f01fc From Mattias Helsing, "Fixes two of the osgWidget examples that were broken due to changed
virtual function prototypes in osgWidget/EventInterface"
2011-04-26 12:07:37 +00:00
Robert Osfield
3c4180d982 From Paul Martz, "To summarize the fix: OpenGL eye coords are negative outside Cartesian quadrant 1. As a result, the center of projection is eye coord (0,0), which (when used as st tex coords) looks up the lower left corner of the texture. However, in projective texturing, you usually want eye coord (0,0) to look up the center of the texture. Accomplishing this mapping requires not just a lookat and perspective transform, but also a translate and scale." 2011-04-19 13:32:25 +00:00
Robert Osfield
581e6fb630 Ran svn propset -R svn:eol-style native . on the OpenSceneGraph 2011-04-19 11:40:22 +00:00
Robert Osfield
36f755670b Cleaned up example 2011-04-19 09:53:34 +00:00
Robert Osfield
89eadcfe82 Added SampleDensityWhenMovingProperty to control LOD property of osgVolume. 2011-03-17 15:37:39 +00:00
Robert Osfield
17f1f432f4 Changed the use of a viewer thread to be off by default because it was causing the application to crash when any users input was recieved 2011-03-09 10:35:00 +00:00
Robert Osfield
b24353b12c From Rafa Gaitan and Jorge Izquierdo, build support for Android NDK.
"- In order to build against GLES1 we execute:
$ mkdir build_android_gles1
$ cd build_android_gles1
$ cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NDK=<path_to_android_ndk>/
-DOSG_GLES1_AVAILABLE=ON -DOSG_GL1_AVAILABLE=OFF
-DOSG_GL2_AVAILABLE=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DJ=2
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF
$ make
 If all is correct you will have and static OSG inside:
build_android_gles1/bin/ndk/local/armeabi.

- GLES2 is not tested/proved, but I think it could be possible build
it with the correct cmake flags.
- The flag -DJ=2 is used to pass to the ndk-build the number of
processors to speed up the building.
- make install is not yet supported."
2011-03-08 16:35:37 +00:00
Robert Osfield
91b35436ac Added comments 2011-03-07 14:42:47 +00:00
Robert Osfield
62459a441c Added --color r g b a, --wall-color r g b a, --back-color r g b a options for setting the colours of faces via materials.
and --image filename, --wall-image filename, --back-image filename options to set the textures used, note, texcoords are not currently set up so texels used will be 0,0.
2011-03-07 12:35:30 +00:00
Robert Osfield
afecdbb46b Moved intial cut of depth partition support into osgViewer::View via two new methods:
/** Convenience method for setting up multiple slave cameras that depth partition the specified camera.*/
        bool setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPartitionSettings* dps=0);

        /** Convenience method for setting up multiple slave cameras that depth partition each of the view's active cameras.*/
        bool setUpDepthPartition(DepthPartitionSettings* dsp=0);
2011-03-03 15:52:19 +00:00
Robert Osfield
be31cdb328 Introduced a new more generic function for settings up the depth partitioning of viewer cameras. 2011-03-03 12:33:57 +00:00
Robert Osfield
832a779d63 Build fix 2011-03-02 16:40:36 +00:00
Robert Osfield
3d8cf5695d Implemented first cut of more flexible depth partitioning code. 2011-03-02 16:09:50 +00:00
Robert Osfield
388836f2b6 Fixed typo 2011-03-01 16:21:38 +00:00
Robert Osfield
eaca6f9e09 Added support for passing the --depth-partition distance, throw to the depth partition slave camera setup. 2011-03-01 15:04:56 +00:00
Robert Osfield
a471d8ac30 Added experiment depth partioning support in the form of an slave camera configuration. 2011-03-01 14:50:25 +00:00
Robert Osfield
a7fd352b40 Removed TrapezoidalShadowMap due to discovery of patent on algorithm. 2011-02-24 11:54:44 +00:00
Robert Osfield
a25c4e4ab2 From Wojciech Lewandowski, intial cut at new TrapezoidalShadowMap ShadowTechnique 2011-02-23 16:46:34 +00:00
Robert Osfield
939522a214 Added support for negative --xMultipler, --yMultiple and --zMultiplier values 2011-02-23 13:56:41 +00:00
Robert Osfield
218f30b831 Added support for positive values of --xMultiple <float> --yMultiplier <float> and --zMultiplier <float> 2011-02-23 12:48:17 +00:00
Robert Osfield
a727b74926 Changed the default number of components for a RGB to 4 so it appears as an RGBA 2011-02-23 12:13:43 +00:00
Robert Osfield
2981a52b05 Added error reporting for old options 2011-02-23 11:43:30 +00:00
Robert Osfield
d24647c582 Added -n option 2011-02-23 11:28:43 +00:00
Robert Osfield
e489c7b1bf Added extra check for GL_BGR and GL_BGRA formats and messages describing image format loaded 2011-02-23 10:37:51 +00:00
Robert Osfield
7792f1ce5b Added support for GL_BGR and GL_BGRA pixel formats 2011-02-22 11:59:51 +00:00
Robert Osfield
323cdab7b8 Added --fov and --light-pos and --light-dir command line parameters 2011-02-20 09:55:20 +00:00
Robert Osfield
df0fdadb59 From Jean-Sebastien Guay, event handler for controlling the field of view of the viewer's camera using 0, - and = keys. 2011-02-11 12:11:17 +00:00
Robert Osfield
88ce98b47d Moved GraphicsCostEstimator from osgUtil into core OSG library 2011-02-03 12:22:09 +00:00
Robert Osfield
bcda8e4671 From Jean-Sebastien Guay, build fix 2011-02-02 17:23:12 +00:00
Robert Osfield
6072652875 From Mathias Froehlich, "Driven by the last qfontimplementation changes, I realized, that I never
contributed my testcase/demo for the original implementation.
This attached change is similar to osgtext but uses the QFontImplementation in
a Qt based viewer.
With that, it should be easier for all of us to test changes in
qfontimplementation"
2011-01-28 10:59:50 +00:00
Robert Osfield
ac65e37ed3 From Mourad Boufarguine, "This is a tiny fix for some typos in osg code." 2011-01-28 10:50:24 +00:00
Robert Osfield
67ae23f2cf From Alexander Sinditskiy, "reason of this changes described in http://forum.openscenegraph.org/viewtopic.php?t=7596
and another problem is:
example osgkeyboard is not work (keys not highlight) if user have 2 keyboard layout native and english and current user layout is native

I try to explain my changes

we need something that is identify key without modifier keys and layout  -> this is UnmodifedKey

I think osg must have its own UnmodifiedKeys table. Code must be run same on different platforms. This can de guaranteed by UnmodifiedKeys table.

Mikhail Izmestev helped me. He implemented VirtualKey changes in GraphicsWindowX11"
2011-01-27 16:23:48 +00:00
Robert Osfield
67e1d14991 Removed the executable property from source files 2011-01-27 09:41:37 +00:00
Robert Osfield
9df072ce05 Moved GraphicsCostEstimator into osgUtil. 2011-01-26 12:51:46 +00:00
Robert Osfield
1079c494d6 Implemented first pass at geometry cost estimation. 2011-01-26 12:07:56 +00:00
Robert Osfield
f20bebe52e Further work on GraphicsCostEstimator classes 2011-01-25 11:11:47 +00:00
Robert Osfield
442caf6961 Added osggraphicscost example as a base of for developing and testing the new osgUtil::GraphicsCostEsimator class. 2011-01-24 20:45:02 +00:00
Robert Osfield
4525dce70e First steps on the path to integrating ImageProcessor 2011-01-15 18:12:19 +00:00
Robert Osfield
942213dc85 From Wang Rui, "I'd like to submit a small new feature to the osgmanipulator example
which could fix the dragger size in screen, so that no matter how we
zoom in/out the camera, the dragger will never be scaled.

This is what 3D graphics software like 3dsmax and maya behave, which
helps users select and manipulate draggers more easily.

You may turn on the feature with the new --fixedDraggerSize argument:

# osgmanipulator.exe --fixedDraggerSize --dragger TranslateAxisDragger
cessna.osg
"
2011-01-14 12:08:46 +00:00
Robert Osfield
f61a6aa4e7 Refactored the way that the DatabasePager passes the Terrain decorator node onto the TerrainTile.
The DatabasePager now passes the Terrain pointer into the ReaderWriter's via osgDB::Options object,
rather than pushing a NodePath containing the Terrain onto NodeVisitor.  This
change means that the DatabasePager nolonger needs to observer the whole NodePath and
will be lighter and quicker for it.

The change also means that ReadFileCallback can now run custom NodeVisitor's on the scene graph without
having to worry about TerrainTile's constructing scene graphs prior to the Terrain being assigned.

Also changed is the NodeVisitor::DatabaseRequestHandler which now requires a NodePath to the node that you wish
to add to rather than just the pointer to the node you wish to add to.  This is more robust when handling scenes
with multiple parental paths, whereas previously errors could have occurred due to the default of picking the first
available parental path.  This change means that subclasses of DatabasePager will need to be updated to use this new
function entry point.
2011-01-12 19:29:24 +00:00
Robert Osfield
32a4c0da2e Added more flexible testing of Text3D 2011-01-11 11:39:50 +00:00
Robert Osfield
8202ccc679 From Jean-Sebastien, "In my auto-build today there are 3 errors caused by using a ref_ptr<T> in a function taking a T* when building without the implicit conversion." 2010-12-23 09:59:35 +00:00
Robert Osfield
410b4fd109 Converted FrameStamp::g/setFrameNumber from int to uint 2010-12-22 20:11:05 +00:00
Robert Osfield
959b8e6d1d Fixed memory leak by introducing use of ref_ptr<> 2010-12-20 12:03:56 +00:00
Robert Osfield
9818c0fee2 From Kim Seokhwan, "Error fix in example/osganimationmorph/osganimationmorph.cpp
in this file,
function,
osg::Geometry* getShape(const std::string& name)
(line 51)

tries to use null pointer when model is not provided.
I added simple comment in attached file."
2010-12-20 12:02:50 +00:00
Robert Osfield
cac4f3afb5 Added --speed option and output of buffer object and texture object pool stats at the end of the animation path. 2010-12-14 20:07:41 +00:00
Robert Osfield
65f95fe3fe Added methods for checking sizes of various buffer object/texture object pool sizes. 2010-12-14 19:29:01 +00:00
Robert Osfield
5f8def64ff Improved the parsing of output filename 2010-12-14 14:32:16 +00:00
Robert Osfield
b44baea35c Added GLBufferObjectManager::reportStats() 2010-12-14 13:43:32 +00:00
Robert Osfield
c0937c1614 From Wang Rui, "A modified version is attached. The blank while generating is in fact
used to avoid dual update traversals of the scene, which is not
allowed in my application (but I forgot the reason ;-) Now the blank
problem will disappear.

Inactive mode is also available, using the --inactive mode and
--camera-eye and --camera-hpr to set camera position:

./osgposter --output-poster --poster output.bmp --tilesize 800 600
--finalsize 8000 6000 cow.osg --inactive --camera-eye 0 0 20
"
2010-12-14 08:53:20 +00:00
Robert Osfield
3145837629 Renamed osgviewerQtContext to osgviewerQt, and removed deprecated examples from CMakeLists.txt 2010-12-13 17:54:27 +00:00
Robert Osfield
10fb8183ec Moved osgviewerQT and osgviewQtWidget to deprecated as osgviewerQtContext will no be the main Qt example 2010-12-13 17:50:57 +00:00
Robert Osfield
29a8ea2e88 Moved osgbrowser into svn/trunk. 2010-12-13 17:50:00 +00:00
Robert Osfield
a4b0ca0310 Move osgcegui into deprecated 2010-12-13 17:49:37 +00:00
Robert Osfield
eb9510eb72 Moved GraphicsWindowQt from osgviewerQtContext into osgQt. 2010-12-13 16:25:50 +00:00
Robert Osfield
c4fded0629 Fixed warnings 2010-12-13 13:41:42 +00:00
Robert Osfield
1402583d17 From Wang Rui, "Attachment is an example of rendering 3D scenes to high resolution screenshots.
I uses a queue of Camera objects to do offscreen rendering with the Camera::attach() function. The entire picture is split into many tiles and it will take a few seconds while attaching and detaching cameras with tiles. You may select to output every tile as an image file, or combine them together to create a large poster, for example, a 12800 x 9600 image.

Start the program like this:

./osgposter --output-poster --poster output.bmp --tilesize 800 600 --finalsize 8000 6000 cow.osg

Adjust the scene camera to a suitable position and press 'p' or 'P' on the keyboard. Wait until sub-cameras dispatching is finished. And the poster file will be created while closing window. A 8000 x 6000 output.bmp will be created to show a fine-printed cow. :)

The command below may also help:

./osgposter --help
 "
2010-12-13 13:37:37 +00:00
Robert Osfield
a345a04254 From Wang Rui, "I implemented a customized viewer event traversal here to read state
changes from the DirectInput devices and add events to the event
queue. I've tested with the keyboard and joystick supports. Because of
only having a very old 6-button gamepad, I can't do more experiments.
Hope this will bring more ideas to those who face similar problems,
especially simulation game designers. :)

I didn't map all DirectInput key values to GUIEventAdapter key
symbols. Users may add more in the buildKeyMap() function freely. The
mouse handling operations are also ignored, but will be easily
improved in the same way of creating keyboard and joystick devices.

Please add a line:

FIND_PACKAGE(DirectInput)

in the CMakeLists of root directory. And in the examples/CMakeLists.txt:

IF(DIRECTINPUT_FOUND)
   ADD_SUBDIRECTORY(osgdirectinput)
ENDIF(DIRECTINPUT_FOUND)

DirectX SDK 2009 is used here, but an older version like DX8 should
also work in my opinion.
"
2010-12-13 11:34:33 +00:00
Robert Osfield
14a12afb6c From Eduardo Poyart, "The attached patch fixes a race condition that caused OSG to try to render the scene before the window is realized. It works ok in my osgviewerWX-derived application under Linux." 2010-12-13 10:46:18 +00:00
Robert Osfield
c040b25699 Build fixes to keep up with changes in head inclusions/API in osgDB 2010-12-10 13:22:21 +00:00
Robert Osfield
8707758429 Added handling of CoordinateSystemNode when they decorate a loaded model, copying the contents of the CoordinateSystemNode across to the Terrain node 2010-12-09 12:16:11 +00:00
Robert Osfield
0754a78ddb From Ulrich Hertlein, "Attached; here's a summary of the changes:
- CMakeLists.txt
-- don't look for GL when compiling for iOS (device or simulator), look for OGLES instead
-- use architecture i386 for simulator
-- removed iphoneos-version-min for simulator

- examples/osgviewerIPhone/CMakeLists.txt
-- added build dependencies for osgdb_osg, osgdb_freetype, osgdb_imageio
-- added framework QuartzCore link dependency

- src/osgDB/CMakeLists.txt
-- don't link against Carbon on iOS (device or simulator)

- src/osgPlugins/freetype/CMakeLists.txt
-- don't link against OpenGL on iOS device or simulator

- src/osgViewer/CMakeLists.txt
-- link against OpenGLES on iOS (device or simulator)

- src/osgPlugins/imageio/CMakeLists.txt
-- compile ReaderWriterImageIO_IOS.cpp as Objective-C++

"
2010-12-02 14:20:52 +00:00
Robert Osfield
65aee287e7 From Mathias Froehlich, "Attached are most of the fixes that are required to build osg on solaris and
hpux. I have skipped irix this time as irix is too dead to keep osg building
there.

As usual, solaris does not like member templates in stl containers.
Some headers missing and link problems due to missing libraries."
2010-12-02 14:13:54 +00:00
Robert Osfield
e26eab96f4 Ran dos2unix to fix line endings 2010-12-02 14:01:54 +00:00
Robert Osfield
a38f5140ff From Jason Daly, "OK, I dug a bit into the CMake scripts and found a fairly obvious solution to the QtWebkit issue on RHEL 6 (see my other message on osg-users). I just moved the osgQtWidgets example in examples/CMakeLists.txt under the check for QtWebKit.
Fix is attached:"
2010-12-01 19:49:03 +00:00
Robert Osfield
5723050580 From Ulrich Hertlein and Stephan Huber, improves to iOS build 2010-11-30 09:26:18 +00:00
Robert Osfield
e5a9eaa711 From Tim Moore, "Here is initial support for uniform buffer objects. The binding between a buffer object and an indexed target is implemented as a new StateAttribute, UniformBufferBinding. I've included an example program based on the code in the ARB_uniform_buffer_object specification.
A few things remain to do:
* The binding between a uniform block in a shader program and a buffer indexed target number is fixed, like a vertex attribute binding. This is too restrictive because that binding can be changed without relinking the program. This mapping should be done by name in the same way that uniform values are handled i.e., like a pseudo state attribute;

* There's no direct way yet to query for the offset of uniforms in uniform block, so only the std140 layout is really usable. A helper class that implemented the std140 rules would be quite helpful for setting up uniform blocks without having to link a program first;

* There's no direct support for querying parameters such as the maximum block length, minimum offset alignment, etc. Having that information available outside of the draw thread would make certain instancing techniques easier to implement."
2010-11-29 17:43:27 +00:00
Robert Osfield
b523cb15c1 From Tomas Holgarth and Stephan Huber, "
attached you'll find the second part of the IOS-submission. It contains

* GraphicsWindowIOS, which supports external and "retina" displays,
 multisample-buffers (for IOS > 4.0) and multi-touch-events
* an ios-specific implementation of the imageio-plugin
* an iphone-viewer example
* cMake support for creating a xcode-project
* an updated ReadMe-file describing the necessary steps to get a
 working xcode-project-file from CMake

Please credit Thomas Hogarth and Stephan Huber for these changes.

This brings the ios-support in line with the git-fork on github. It
needs some more testing and some more love, the cmake-process is still a
little complicated.

You'll need a special version of the freetype lib compiled for IOS,
there's one bundled in the OpenFrameworks-distribution, which can be used."

Notes, from Robert Osfield, modified CMakeLists.txt files so that the IOS specific paths are within IF(APPLE) blocks.
2010-11-26 18:19:28 +00:00
Robert Osfield
8a929ea923 From Magnus Kessler, "Typo in usage string of examples/osganalysis
please specifies -> please specify"
2010-11-26 10:31:34 +00:00
Robert Osfield
1a227bf35e From Jean-Sebastien Guay, build fixes for windows. 2010-11-24 20:20:57 +00:00
Robert Osfield
0ee0aad0fe Moved TextNode from osgText into example/osgtext3D in prep for 3.0 2010-11-23 17:33:43 +00:00
Robert Osfield
04b6a0888b Build fixes for building OSG with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2010-11-22 19:38:18 +00:00
Robert Osfield
9b70348ced Fixed typo of commercial 2010-11-22 11:22:03 +00:00
Robert Osfield
a9b90b9652 Added texture pool handler to print out results from texture pool 2010-11-17 10:19:25 +00:00
Robert Osfield
c358c48db9 Added quite size test. 2010-11-17 10:16:45 +00:00
Robert Osfield
bda7ef8179 From Wang Rui, "I've finally completed the static build support for dotosg wrapper and
serialization libraries. My submission mainly includes:
1. Add two new macros USE_DOTOSGWRAPPER_LIBRARY and
USE_SERIALIZER_WRAPPER_LIBRARY. Applications using static OSG must
include corresponding static-link libraries and use these two macros
to predefine native format wrappers. Please see osgstaticviewer and
present3D in the attachment for details.

2. Add a LibraryWrapper.cpp file in each
osgWrappers/deprecated-dotosg/... and osgWrappers/serializers/...
subfolder, which calls all USE_...WRAPPERS macros inside. The
LibraryWrapper file is automatically generated by the
wrapper_includer.cpp (with some slight fixes), which is also attached
for your reference. The deprecated-dotosg/osgAnimation is not included
because it doesn't us REGISTER_DOTOSGWRAPPER to define its wrappers.

3. Modify the ReaderWriterOSG.cpp to prevent calling loadWrappers()
when static build.

4. An uncorrelated fix to Serializer and ObjectWrapper.cpp, which
ensures version variables of serialziers are initialized, and
serializers out-of-version are not written to model files.
"
2010-11-11 11:47:24 +00:00