Commit Graph

11003 Commits

Author SHA1 Message Date
Robert Osfield
67e1d14991 Removed the executable property from source files 2011-01-27 09:41:37 +00:00
Robert Osfield
373f3931e9 Implement first pass at texture compile estimation 2011-01-26 18:47:55 +00:00
Robert Osfield
a4f2cbe577 Replaced CompileStats with GraphicsCostEstimator 2011-01-26 16:47:40 +00:00
Robert Osfield
3762dc49b9 From Mourad Biyfarguine, "This is a fix to some 'potentially uninitialized local variable' warnings in src/osg/glu/libutil/mipmap.cpp." 2011-01-26 16:46:58 +00:00
Robert Osfield
f9428e9f45 From Mathias Froehlich, build fix for Solaris 2011-01-26 16:45:36 +00:00
Robert Osfield
740b29d0f7 From Wang Rui, "I've found a problem when using QFont (osgQt/QFontImplementation.cpp)
to read fonts: only the first character of a whole text is correctly
shown and others are disappeared. I haven't got into the font
implementation so can't explain why this happened and how it should
work under other platforms, but it seems to be fixed by specifying
width and height of the glyph object. The source file is attached for
future developments. At present it just works for my own project. :-)
"
2011-01-26 16:10:42 +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
9bb86b5534 Fixed warnings 2011-01-25 16:48:53 +00:00
Robert Osfield
f20bebe52e Further work on GraphicsCostEstimator classes 2011-01-25 11:11:47 +00:00
Robert Osfield
abea92ee91 From Mathias Froehlich, build fixes 2011-01-24 21:12:25 +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
Cedric Pinson
a503b143cc From Michael Platings, Fix animation duration when adding channel to animation 2011-01-24 11:45:45 +00:00
Robert Osfield
71f97cb3bc Added #include to fix build 2011-01-21 14:11:22 +00:00
Robert Osfield
90508f282a From Sukender, "
DAE plugin was linking ORIGINAL images in the Collada file, using image->getName() as a path (even if images were modified in memory!). As the behaviour was not the one of other plugins (3DS, FBX, and such), I made the plugin relativise images filenames (as those plugins) and write the image which is in memory. However, in order to avoid removing features, I kept the previous behaviour but moved it in an option. Here are the options of the plugin I changed:
- daeForceTexture was unclear in this new context and removed in favor of two new options
- daeLinkOriginalTexturesNoForce: Writes reference to the original image if found, instead of writing the image in memory
- daeLinkOriginalTexturesForce: Writes reference to the original image even if not found, instead of writing the image in memory
Of course, if you specify no option, images are written as for other plugins.

Other thing I changed is the UTF8 support as I told you in a previous conversation. Now there is a simple option, "daeNamesUseCodepage", which makes all names except filenames (materials, animation, geometries...) be considered as encoded using current codepage. If so, they'll be converted to UTF8 when writing; else they are written directly. Of course, filenames follow OSG_USE_UTF8_FILENAME as usual.

I did "
2011-01-21 13:40:28 +00:00
Michael PLATINGS
cc207c1112 From Sukender: I had to call code from the FBX plugin (to relativise paths). I thus extracted it from FBX and moved it in osgDB (FileNameUtils) 2011-01-21 12:17:18 +00:00
Robert Osfield
43afbab09e From Sukender, getPathRelative() method. 2011-01-21 11:46:15 +00:00
Robert Osfield
26c313e258 Added export to see if it address Mingw link problems 2011-01-20 12:34:41 +00:00
Robert Osfield
6d1944b9e2 From Matthew Johnson-Roberson, "Small fix for operation thread to protect the access to _operations vector by functions getNumOperationsInQueue() and empty(). It is simply an addition of OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
to protect against accessing while writing which was segfaulting in VPB
specifically in void ThreadPool::run(osg::Operation* op)
in the waiting loop

while (_operationQueue->getNumOperationsInQueue() >= _maxNumberOfOperationsInQueue)
"
2011-01-20 12:32:20 +00:00
Robert Osfield
2dc0247bd9 From Per Fahlberg, warning fixes 2011-01-20 12:27:51 +00:00
Robert Osfield
34aca88715 From Simon Julier, "I have been using the ply plugin to read files created by bundler and pmvs2 (http://grail.cs.washington.edu/software/pmvs/). This program generates models in the form of vertices only. However, the existing ply reader implementation was not able to handle the models generated in a satisfactory manner for two reasons:
1. It did not support normals applied to individual vertices.
2. It would only support red / green / blue colour triples, but the pmvs models are generated with diffuse colours. (The PLY format, http://local.wasp.uwa.edu.au/~pbourke/dataformats/ply/, lists specular and ambient colour forms as well.)

To partially overcome these limitations, please find attached modified versions of

src/osgPlugins/ply/vertexData.cpp
src/osgPlugins/ply/vertexData.h

The changes I've made are:

1. I have changed the boolean hasColor flag to a vertexField (which is a boolean operation on an enum) to indicate what fields are present in the ply file. (This is required because Turk's ply reader spits out warnings for every line where you try to read fields which do not exist.)
2. I have modified the code to apply valid normals to either triangles or vertices.
3. I have kludged in "support" for the various colour variants. Specifically, all the colour specified can be read from the file. However, they are all applied in the same way (namely as a colour array, bound to each vertex)."
2011-01-20 12:23:04 +00:00
Robert Osfield
d21009c323 From Simon Julier, "I ran across linking errors with osgdb_exr. Specifically, I found it was necessary to link against libImlIlf, libImlThread, libHalf, libIex and libzip.
I have attached a patch, against the trunk from 13:30 today, which consists of the following:

1. CMakeModules/FindOpenEXR.cmake: Look for libIlmThread and libIex as well. 2. src/osgPlugins/CMakeList.txt: Only include the exr subdirectory if both the OpenEXR and zip libraries were found. 3. src/osgPlugins/exr/CMakeLists.txt: Add ZIP_LIBRARY to TARGET_EXTERNAL_LIBRARIES."
2011-01-19 10:57:58 +00:00
Robert Osfield
6fb5387473 From Sukender, normalized option names 2011-01-19 10:38:39 +00:00
Robert Osfield
fc32aa4918 From Sukender, "Added ability for writer to read from Vec3/4d/f. Plugin now warns if it finds another type of data" 2011-01-19 10:31:49 +00:00
Robert Osfield
975aea4a2b From Sukender, "Factorized the depth loop ("while ( lastDepth >= _nodePath.size() )...") into a method called updateCurrentDaeNode(). Added missing calls into apply(osg::LightSource &) and daeWriter::apply(osg::Camera &) and daeWriter::apply(osg::CameraView &)" 2011-01-19 09:53:34 +00:00
Robert Osfield
0ed6049390 From Sukender, "Fixed ReaderWriterDAE::ConvertFilePathToColladaCompatibleURI(): It now handles paths containing '#' character as expected." 2011-01-19 09:36:21 +00:00
Robert Osfield
45f2b29a77 From Sukender and Robert Osfield, clean up of options 2011-01-19 09:34:26 +00:00
Robert Osfield
bc6a94c5b3 From Michael Platings, "I've attached a fix for a subtle bug that causes animations (and quite possibly other things) to be serialized incorrectly.
For the following code:

#define MYMACRO(NAME) myOutputStream << #NAME;
MYMACRO(Group)

you would expect that "Group" would be output. However, as there are many overloaded operator<< functions, none of which take a const char* argument, the function that's actually called is operator<<(bool). Hence what actually gets output is "TRUE".
An actual example of this is in serializers\osgAnimation\Animation.cpp, WRITE_CHANNEL_FUNC2.

So the simple solution to this is to add operator<<(const char*), attached.
"
2011-01-18 16:14:24 +00:00
Robert Osfield
f2f9bb11b0 Moved the StateSet query and texcoord settings to within the if (vertices) block to avoid
an attempt to dereferences geometry->getStateSet() when non Geometry drawable is intersected.
2011-01-18 15:00:36 +00:00
Robert Osfield
57cf04a6bb Fixed CompileSet so it returns true when there is nothing to compile at all. 2011-01-18 11:20:53 +00:00
Robert Osfield
bf99528322 Build fix 2011-01-18 09:54:47 +00:00
Robert Osfield
11cd5a89ed Implemented better coupling of DatabasePager and IcrementalCompileOperation,
removing functional duplication and opening the door to dynamic enabling/disabling
of pre compile based on load.
2011-01-17 17:17:19 +00:00
Robert Osfield
45bd464942 Added getNum methods 2011-01-17 09:10:14 +00:00
Robert Osfield
4525dce70e First steps on the path to integrating ImageProcessor 2011-01-15 18:12:19 +00:00
Robert Osfield
2b3bba8587 From Guy Volckaert, "Changes to the openflight plugin to support replacing double sided polygons by 2 opposite facing polygons. This is sometimes required to resolved lighting and intersection issues. A new import option was was added to activate this feature called "replaceDoubleSidedPolys". 2011-01-14 14:30:19 +00:00
Robert Osfield
fac9992bca From Sukender, "- Lowered one notify level (it's now coherent with the "if" just above)" 2011-01-14 13:31:07 +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
a4f9c19440 From Sukender, "TIFF plugin now outputs messages coming from libtiff.
"
2011-01-14 12:03:37 +00:00
Robert Osfield
ad530c0fc7 From Sukender, "Small submission: - 3DS reader now takes care to not create Texture2D duplicates" 2011-01-14 11:49:55 +00:00
Robert Osfield
a1eabf18b5 Fixed for build with non autoatic ref_ptr<> to C pointer conversion 2011-01-14 11:46:43 +00:00
Robert Osfield
b0dd272186 From Brad Christiansen, "Attached is a fix which implements the lazy loading of optional layers (if requested) in the new osgb/osgt formats." 2011-01-14 11:00:11 +00:00
Robert Osfield
7c30f204e8 Updated so version number 2011-01-13 18:49:12 +00:00
Robert Osfield
0da6d7f298 From Tim Moore, added missing ImageProcessor header reference 2011-01-13 18:05:59 +00:00
Robert Osfield
1b67e3ad1f Added ImageProcessor interface class and plugin mechnanism for ImageProcessor implementations to osgDB::Registry.
Add NVidiaTextureTools based plugin that provides an ImageProcessor implementation within an nvtt plugin.
2011-01-13 14:59:29 +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
762f8d5360 Fixed comment 2011-01-12 17:39:35 +00:00
Robert Osfield
534052f7cb From Sukender, "FBX plugin did not relay the osgDB::ReaderWriter::Options* when writing images (the writeImage() call). Now it does." 2011-01-11 17:29:47 +00:00
Robert Osfield
1f0a8aff32 Changed dos endings to unix line endings 2011-01-11 17:29:11 +00:00
Robert Osfield
49113e03dc From Mikhail Izmestev, "Current osgManipulator::AntiSquishCallback stops update traversal of childrens." 2011-01-11 17:23:22 +00:00
Robert Osfield
5ed5221178 From Wojciech Lewandowski, "We encountered a problem when we tried overloading StandardManipulator class. Linker was unable to find StandardManipulator::AnimationData methods. Prefixing AnimationData with OSGGA_EXPORT removed the issue.
Fixed header is attached."
2011-01-11 17:20:25 +00:00