Commit Graph

11112 Commits

Author SHA1 Message Date
Robert Osfield
1c9d800756 Fixed size of default font 2011-01-28 12:34:49 +00:00
Robert Osfield
b4eaccc3c2 From Per Fahlberg, warning fixes 2011-01-28 11:07:51 +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
523b77ee8f From Ulrich Hertlien, "the changes from r12126 (see below) in dae/domSourceReader.h cause compiler errors on OS X
with gcc-4.2.1:

In file included from
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/daeRAnimations.cpp:3:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:43: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:45: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:47: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:49: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:51: error:
explicit specialization in non-namespace scope 'class osgDAE::domSourceReader'
...

The attached file fixes this."
2011-01-28 10:53:49 +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
9b6e3fbe94 From Andreas Roth, "simple fix to support quad buffer stereo in osgQt" 2011-01-27 18:49:22 +00:00
Robert Osfield
2a18c8b02a From Eric Buehler, "I believe that the osgWidget::Window::HA_CENTER alignment should be center aligned rather than by the origin, as the osgWidget::Window::VA_TOP causes.
The current setAnchorHorizontal() command doesn't center the center of the object, it just center's the object's origin.  The following change to osgWidget::Window::update() will correct that behavior so that it is consistent with setAnchorVertical() behavior.
"
2011-01-27 17:14:28 +00:00
Robert Osfield
278203240b From Sukender, "I found the bug I was chasing! Here is my "twin" submission, from latest trunk rev: 12124.
1. DAE submission:
DAE plugin now correctly writes images URI in Collada file, when images are used twice.
I also greatly improved readability and maintenability of geometry reading (mainly daeRGeometry.cpp), by factorizing code, templatizing it (for double/single precision), and removing ugly macros.

2. osgDB submission:
I updated osgDB::getPathRelative(): it is now far more readable, it handles more cases (especially when you want to relativise "a/c" from "a/b", which results in "../c"), and I added comments to make it clearer to maintain."
2011-01-27 17:12:23 +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
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