Commit Graph

10335 Commits

Author SHA1 Message Date
Robert Osfield
68a1ed2dcf Fixes for building OSG with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF.
Fixed copy and paste error in Camera::getImplicitBufferAttachmentResolveMask().
2010-05-12 11:37:27 +00:00
Michael PLATINGS
e91557fe1d From Martins Innus: The current fbx writer doesn't seem to support BIND_PER_VERTEX for normals. If you have this type of geometry it, exports the the first normal in the array over the whole primitive set. I don't know that the attached change should be applied as is, since I don't know enough about DrawArrays and Draw Elements to know if the indices for the vertices and normals are guaranteed to be the same. I tried it on a couple models and that seemed to be the case. The alternative is to have the logic down in setControlPointAndNormalsAndUV and set the normals there with the "vertexIndex" if the binding type is per vertex. Not sure what is cleaner. 2010-05-12 08:54:22 +00:00
Michael PLATINGS
047b70c265 From Martins Innus: allow the fbx exporter to reference textures correctly if the stateset is applied to the Geode instead of Geometry 2010-05-11 17:02:18 +00:00
Michael PLATINGS
c51e94725b Fix from Martins Innus for error: extra qualification 'FbxMaterialToOsgStateSet::' on member 'FbxMaterialToOsgStateSet' 2010-05-11 09:08:55 +00:00
Robert Osfield
c0c4585ac3 updated wrappers 2010-04-30 20:04:25 +00:00
Robert Osfield
ed5f0578b8 Added support for stripping all by text nodes from a p3d xml file, and merging of an original and stripped p3d xml file for the purpose of using external editors to fix spelling mistakes 2010-04-30 19:42:43 +00:00
Robert Osfield
400aa8ebcd Added proper support for writing out Xml graph 2010-04-30 19:41:56 +00:00
Robert Osfield
7ef776ec5f Fixed warnings 2010-04-30 19:41:24 +00:00
Robert Osfield
5ef3952a76 Added beginnings of spell checking support 2010-04-30 15:51:38 +00:00
Robert Osfield
6d046e9fa1 From Wang Rui, "I've just made another OSG+Qt (GUI) examples to demonstrate how to create OSG views, add them to a CompositeViewer, and add corresponding widgets to Qt layouts or as popup windows. The example inherits a GraphicsWindowQt from the GraphicsWindow base class and implements most of the virtual methods. A QGLWidget is created at the same time to perform keyboards and mouse events, who is also added as the main widget's child.
The new example, named osgviewerQtContext (because of deriving from GraphicsContext), works fine on Windows XP SP3 and Qt 4.5.0, with 4 widgets in QGridLayout and a popup window and 60Hz frame rate. I haven't tested it on Unix/Linux and Mac OSX yet. So any feedback from these platforms is appreciated. I wish this example be a useful complement to current osgviewerQt and osgviewerQtWidgets ones. :)

Some unfinished functionalities: inheritedWindowData, sharedContext, and more tests needed."
2010-04-30 12:22:31 +00:00
Robert Osfield
c2a59415ce Changed DisplaySetting::instance() to return a ref_ptr<>& rathern than a raw C pointer to enable apps to delete the singleton or assign their own. 2010-04-30 11:48:30 +00:00
Robert Osfield
afce262601 Added free of _visualInfo if it's already been allocated 2010-04-30 10:52:24 +00:00
Robert Osfield
087559f7a0 Changed debug messages to use printf to avoid issues with using notify at startup and exit. 2010-04-30 10:51:27 +00:00
Robert Osfield
38276b0d92 Added support for using dot graphs directly in the <graph></graph> token 2010-04-30 10:50:17 +00:00
Robert Osfield
12a0b9ab6d From Bernardt Duvenhage: "I noticed that in 'src/OpenThreads/pthreads/CMakeLists.txt' a '!' has been written instead of 'NOT' within an if statement expression.
IF(!OSG_COMPILE_FRAMEWORKS) ...
vs.
IF(NOT OSG_COMPILE_FRAMEWORKS) ...

This has the effect of always compiling OpenThreads as a framework under OSX. The CMakeLists.txt that I use to be able to compile the non-framework version of OpenThreads is attached. I simply replaced the '!' replaced by a 'NOT' and added a MESSAGE to notify me when the .framework will be compiled."
2010-04-29 15:23:43 +00:00
Robert Osfield
b028a59720 From Michael Platings, "I've updated the FBX plugin to use the latest version of the FBX SDK. I've checked in the plugin files myself, but I need you to check in this change to FindFBX.cmake to change the SDK directory." 2010-04-29 11:59:51 +00:00
Robert Osfield
4012841053 Fixed handling of Terrain/CoordinateSystem node so that the code now handles the fact that Terrain now subclasses from CoordinateSystemNode. 2010-04-29 09:46:14 +00:00
Robert Osfield
a4718ef88b Updated wrappers 2010-04-28 22:08:48 +00:00
Robert Osfield
a6c7fee246 From Alok Priyadarshi, "1. Replaced APIENTRY to GL_APIENTRY which is used by OpenGL ES
headers. For desktop GL GL_APIENTRY has been defined as APIENTRY."
2010-04-28 21:22:44 +00:00
Robert Osfield
c019e2f76d Fixed typo 2010-04-28 21:10:29 +00:00
Robert Osfield
5435f6cf50 From Wang Rui, "Two small bugs were just found when I was writing examples for my book
in process: a wrong definition of the OSG_FATAL macro, and wrong logic
inside the KeySwitchMatrixManipulator::getDistance() function. I
believe both were slips."
2010-04-28 20:33:40 +00:00
Robert Osfield
363f32536b From Farshid Lashkari, "There's a subtle bug in osgDB::getFileExtension where it returns an incorrect value if the filename does not contain an extension but a sub-directory contains a dot character. I've modified the function so that it checks for this case." 2010-04-28 20:21:28 +00:00
Robert Osfield
0adf26ec6e From Wang Rui, "The osgManipulator serializers are ready now. I need to modify the
META_OSGMANIPULATOR_Object macro to ensure these classes could work
with their wrappers, and a few naming styles should be changed as
well. Fortunately everything seems to compile fine under Windows and
my new Ubuntu system.

And I finally find the problem of the
serializers/osgTerrain/Terrain.cpp, it just missed an "osg::Group"
before "osg::CoordinateSystemNode" indicator. With the small fix
attached now VPB could generate terrain with osgt/osgb formats."
2010-04-28 20:16:44 +00:00
Robert Osfield
22dfe6f8d1 From John Ivar Haugland and Michael Platings,
JIV:"I deleted a line from the ReaderWriterDAE.cpp file that was introduced in rev 11341. I got a crash on this line when the options pointer was NULL."
MP:"Good spot John. The next line is also unnecessary and can be removed as well (attached, plus some minor code beautifying)"
2010-04-28 20:10:53 +00:00
Robert Osfield
8b8ca09ab1 Added support for passing options to the .dot plugin 2010-04-28 18:53:34 +00:00
Robert Osfield
b459fb4a25 Added support for passing in an options string to control the orientation of the generated graph 2010-04-28 18:52:58 +00:00
Robert Osfield
f27678dbb9 Introduced the use of ref_ptr<> in read show methods 2010-04-28 17:29:31 +00:00
Robert Osfield
bff3fcbe72 Removed redundent files 2010-04-28 17:18:01 +00:00
Robert Osfield
dbbe73304a Added support for using graphviz dot for graphics visualization via <graph>filename</graph> token. 2010-04-28 14:56:38 +00:00
Robert Osfield
4143f2f839 Fixed typo 2010-04-28 14:55:42 +00:00
Robert Osfield
b86431fdf7 Added colours and different style to drawable and statesets 2010-04-28 14:55:07 +00:00
Michael PLATINGS
324ddd0ca3 No longer removes redundant nodes because node structure may be important. 2010-04-28 14:05:47 +00:00
Robert Osfield
dfda4ce35f Replaced afprintf usage with std::string to fix memory leak and improve portability of code. 2010-04-28 10:15:16 +00:00
Stephan Maximilian HUBER
7fb49c6d2f From Stephan Huber: updated xcode-project 2010-04-26 10:07:49 +00:00
Robert Osfield
117d949d1f From Roland Smeenk and Robert Osfield, improvements to the indentation of comments. 2010-04-23 16:35:44 +00:00
Robert Osfield
64acd4df54 From Hatwig Wiesmann, "osg::TransferFunction1D::assignToImage may assign NaN values to the image in case an underflow inside the method occurs. This underflow can be reproduced by the following call sequence:
osg::TransferFunction1D* tf(new osg::TransferFunction1D());

tf->allocate(18);
tf->setColor(-10000,osg::Vec4(        1.0,        1.0,        1.0,1.0));
tf->setColor(-1e-6,osg::Vec4(        1.0,        1.0,        1.0,1.0));
tf->setColor(   0,osg::Vec4(        0.0,        0.0,        1.0,1.0));

Remark: The value -1e-6 may be added (falsely) because of a rounding error.

The attached fix prevents assigning NaN values to the image.
"
2010-04-23 09:29:50 +00:00
Robert Osfield
75fc7b6598 Fixed warnings 2010-04-23 08:58:57 +00:00
Robert Osfield
07328f3d17 From Mourad Boufarguine, "This submissions fixes the problem of the difference of std::*::size_type between 32bit and 64 bit platforms. It wraps the reading and writing of std::*::size_type values using the osgDB::InputStream::readSize and osgDB::OutputStream::writeSize methods." 2010-04-23 08:55:23 +00:00
Robert Osfield
5d0b84edd0 From Marcin Hajder, "This submission contains Texture2DMultisample osg implementation.
Texture2DMultismaple as name suggests provides means to directly access subsamples of rendered FBO target. (GLSL 1.5 texelFetch call).

Recently I was working on deferred renderer with OSG, during that I noticed there is no support for multisampled textures (GL_ARB_texture_multisample extension). After consultations with Paul Martz and Wojtek Lewandowski I added Texture2DMultisample class and made few necessary changes around osg::FrameBufferObject, osg::Texture and osgUtil::RenderStage classes."

and from follow email:

"Fixed. According to ARB_texture_multisample extension specification multisample textures  don't need TexParameters since they can only be fetched with  texelFetch."
2010-04-22 17:02:22 +00:00
Robert Osfield
3f7454fd8c From Farshid Lashkari, "I've attached a small fix so that osgDB::convertStringFromUTF8toCurrentCodePage actually performs the conversion onto the destination string." 2010-04-22 16:08:26 +00:00
Robert Osfield
f67942cf03 From Alok Priyadashi, "The attached patch fixes
- compile errors on windows when compiled with UNICODE flag
- warnings for duplicate WIN32_LEAN_AND_MEAN. I think this should
better fixed by adding WIN32_LEAN_AND_MEAN to vcproj preprocessor
list."
2010-04-22 16:01:38 +00:00
Robert Osfield
25bc487763 From John Ivar Haugland, "I have added the serializer for UserData in osg::Object. See the attached modified file:
src\osgWrappers\serializers\osg\Object.cpp"
2010-04-22 13:07:49 +00:00
Robert Osfield
1a38137551 Updated ChangeLog, and AUTHORS files 2010-04-22 11:20:31 +00:00
Robert Osfield
9e2ec85420 From Tim Moore, added check to whether validConfigs is empty. 2010-04-22 10:13:05 +00:00
Robert Osfield
60b906b9fe Added a temporary /* */ around the check against _traits->vsync to avoid the errors reported with the current usage of RestoreContext for setting the vsync. 2010-04-22 08:59:52 +00:00
Robert Osfield
be0e573f80 From Torben Dannhauer, fixed typo 2010-04-22 07:32:11 +00:00
Robert Osfield
9eebb2eb23 From Ulrich Hertlien with little bits from Robert Osfield and Chris Hanson, added provisionl support for controlling sync to vblank. 2010-04-21 17:16:13 +00:00
Robert Osfield
6e03d73efe Changed "Sorted" label to "Sorted Drawables" 2010-04-21 16:44:38 +00:00
Robert Osfield
a475da35e3 From Mourad Boufarguine, "When compiling the example on VS9, the compiler complain about undefined GL_DEPTH_COMPONENT32F and GL_DEPTH_COMPONENT32F_NV. So I added them to include/osg/FrameBufferObject. The example builds fine and is working for me without crashs unless it is ran whithout argument. I added couple of lines to check for arguments number and print the example usage when needed." 2010-04-21 16:37:28 +00:00
Robert Osfield
6b9bbc7ca9 From Wang Rui, "The OSG book I'm working on will focus on helping beginners build
latest OSG source code with Visual Studio 2010 express, without
setting too many options and without facing unexpected errors. But at
present, the compilation process will fail because the INSTALL project
'cannot find' generated DLLs while copying files. I have looked into
the build directory and found that the places of generated file
folders were just different from previous VS versions. In this case,
the old hack in OsgMacroUtils.cmake may become invalid:

MACRO(HANDLE_MSVC_DLL)
       #this is a hack... the build place is set to lib/<debug or
release> by LIBARARY_OUTPUT_PATH equal to OUTPUT_LIBDIR
       #the .lib will be crated in ../ so going straight in lib by
the IMPORT_PREFIX property
       #because we want dll placed in OUTPUT_BINDIR ie the bin folder
sibling of lib, we can use ../../bin to go there,
       ...
       ELSE(NOT MSVC_IDE)
           SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
"../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
       ENDIF(NOT MSVC_IDE)
ENDMACRO(HANDLE_MSVC_DLL)

Here the prefix "../../bin" may need to be fixed. I just modified it to:

IF(MSVC_VERSION LESS 1600)
    SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
"../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
ENDIF()

It should keep compatible with old MSVC versions. There are similar
fixes in the SETUP_PLUGIN and SETUP_EXE macros. I haven't tested them
on more platforms.
"
2010-04-20 16:27:54 +00:00