Commit Graph

233 Commits

Author SHA1 Message Date
Robert Osfield
1b1c987356 Removed debug message
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14642 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 11:43:41 +00:00
Robert Osfield
5a4f962013 Changes to allow the COLLADA plugin to compile against the latest COLLADA DOM version 2.4 as well as retaining compatibility with the old 2.2 DOM.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14633 16af8721-9629-0410-8352-f15c8da7e697
2014-12-23 12:10:03 +00:00
Robert Osfield
dfc02b78bf Added if () block to avoid script variables set to NOT-Found being used in searching
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14624 16af8721-9629-0410-8352-f15c8da7e697
2014-12-19 08:27:30 +00:00
Robert Osfield
a03ec99005 Fixed script warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14623 16af8721-9629-0410-8352-f15c8da7e697
2014-12-19 08:25:35 +00:00
Robert Osfield
8be71caeaf From Aitor Moreno, LAS plugin - depends upon boost and liblas and liblas-c
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14622 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 17:47:08 +00:00
Robert Osfield
af16041f57 From Mattias Helsing, "The addition of the GStreamer cmake find script broke my build because
cmake vars weren't passed correctly to find_package_handler_args, so
while the find script didn't find a single required GStreamer lib or
include path it still reported GSTREAMER_FOUND=TRUE (and then tried to
compile the new plugin). This fixes it and correctly reports missing
components."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14611 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 09:03:15 +00:00
Robert Osfield
adf9596316 Added support for using SDL2 to the osgmovie to enable it to handle floating point audio formats
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14610 16af8721-9629-0410-8352-f15c8da7e697
2014-12-17 19:21:32 +00:00
Robert Osfield
69abe094ab From Javier Taibo, " I have found that since version 1.1, FFMPEG changed the way audio streams are retrieved, from packed to planar format. SDL interprets packed audio, as is used in the osgmovie example. To make the audio work when the OSGffmpeg plug-in is compiled against recent FFMPEG versions, FFmpegDecoderAudio must check for planar formats and in these cases request the samples as packed. This way all works as before. It can be checked with osgmovie example application.
$ osgmovie --audio movie.avi.ffmpeg
  FFmpegImageStream::open audio failed, audio stream will be disabled: unknown audio format

  With the attached FFmpegDecoderAudio.cpp, audio sounds correctly.

  I am also attaching a modified version of FindFFmpeg.cmake that allows to set as FFMPEG_DIR the ffmpeg compiled in the source directory structure. It should not break anything as it only adds some additional search paths.

"

Note from Robert Osfield, I have found in testing that audio quality is not good for planar floating point formats, even with adding support for SDL2 to the osgmovie example. I haven't yet tracked down the cause of these audio problems or a solution.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14609 16af8721-9629-0410-8352-f15c8da7e697
2014-12-17 19:20:48 +00:00
Robert Osfield
6cd9932780 From Julen Garcia, "Here there is a small plugin I use to play video files. It is based on GStreamer http://gstreamer.freedesktop.org and I have used the FFmpeg plugin as inspiration."
From Robert Osfield, fixed handled of row widths so that they are padded to a 4 byte boundary as certain row widths were being rendered incorrectly.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14604 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 11:20:42 +00:00
Robert Osfield
53e337611a From Jan Klimke, "i noticed, that there are a couple of additional flaws when building osg for Mac OS X 10.10 Yosemite.
The mac os sdk version is recognized by the current CMAKE script as 10.1 instead of 10.10 since it cuts the version string from the 4th place. I introduced a more reliable version checking based on splitting the returned version code into MAJOR MINOR and PATCH parts and reassemble the OSG sdk version afterwards.

I replaced the existing CMake code against the following (returning now version 10.10 as expected):

 # Determine the canonical name of the selected Platform SDK
   EXECUTE_PROCESS(COMMAND "/usr/bin/sw_vers" "-productVersion"
                   OUTPUT_VARIABLE OSG_OSX_SDK_NAME
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
   STRING(REPLACE "." ";" MACOS_VERSION_LIST ${OSG_OSX_SDK_NAME})
   LIST(GET MACOS_VERSION_LIST 0 MACOS_VERSION_MAJOR)
   LIST(GET MACOS_VERSION_LIST 1 MACOS_VERSION_MINOR)
   LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)

   SET(OSG_OSX_SDK_NAME "macosx${MACOS_VERSION_MAJOR}.${MACOS_VERSION_MINOR}")

Also i added the check for the new Version to some more find scripts.

Additionally the nil object in Objective C now seems to be equivalent with a null_ptr that cannot be passed as GLInt anymore. So i switched this in the PixelBufferCocoa.mm to pass a zero instead of nil.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14527 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 15:19:20 +00:00
Robert Osfield
b9a529148a From Rafa Gaitan, "I finally had some time to change the build system for Android using a Toolchain, which, I think, will be easier to maintain and uses cmake standard system to build it.
My changes:
-------------------
- I changed the cmake files and added a toolchain for building OSG in Android. The toolchain is based on the one used at OpenCV. For building OSG for android you just need to do:

    mkdir build_android_static_gles2 && cd build_android_static_gles2
    cmake .. -DANDROID_NDK=<path-to-the-android-ndk>
                  -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
                  -DOPENGL_PROFILE="GLES2"
                  -DDYNAMIC_OPENTHREADS=OFF
                  -DDYNAMIC_OPENSCENEGRAPH=OFF
                  -DANDROID_NATIVE_API_LEVEL=15 # optional
                  -DANDROID_ABI=armeabim #optional
                  -DCMAKE_INSTALL_PREFIX=<path-to-the-install-path> #optional
make -j 8
make install

    The OPENGL_PROFILE works as expected, changing it to "GLES1" it builds and links OSG using GLES1.
    The DYNAMIC_OPENTHREADS/DYNAMIC_OPENSCENEGRAPH parameters also allows to build the dynamic libraries

- I also added some build fixes for android related to the texture formats and added some missing USE_OSG_SERIALIZER_WRAPPER in the osg serializer library to support loading osgb files in static."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14514 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:37:33 +00:00
Robert Osfield
2986df22d6 From Björn Blissing, fix for ambiguous defines in Atomic.cpp when compiling with MinGW and GCC
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14513 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:21:46 +00:00
Robert Osfield
eae4d51e3f From Stephan Huber, "Please revert the change to FindQuickTime.cmake as this breaks compilation for IOS and possibly OS X." 2014-05-06 08:37:39 +00:00
Robert Osfield
fa6f5219bf From Mattias Helsing, "I finally got to fix the cmake Modules that have duplicates in later
version of cmake. See attached submission. I have tested the ones that
I compile myself (GDAL, Freetype, ZLIB) on ubuntu 12.04 with
cmake-2.8.7."
2014-04-29 12:19:21 +00:00
Robert Osfield
ecd26f9f5b From Paul Martz, "There is no standard place for gl/glcorearb.h on Windows. Previously, the only way to get OSG to build for core profile was to append an additional include directory ("/I") onto the CFLAGS variables This submission adds a FindGLCORE.cmake script so that the path to gl/glcorearb.h can be specified with a variable, GLCORE_ROOT, either in CMake or the environment.
Currently this submission is Windows-only. I don't think OSX or Linux require any help in locating gl/glcorearb.h. But if they do, this submission can be easily modified.

Files:
 - "CMakeLists.txt" is the top-level file.
 - FindGLCORE.cmake" and "OsgMacroUtils.cmake" go in CMakeModules.
"
2014-04-29 12:18:51 +00:00
Robert Osfield
6f2d003bc5 From Mattias Helsing, "Seems I was only half right given what you asked for. CMP0017 only
says that modules that are found and ran from cmake modules dir should
prefer cmake-provided modules. find_package() and include() still look
in CMAKE_MODULE_PATH first.

After some investigating I've come up with a proposal examplified in
the attached FindGDAL.cmake script. It simply calls the cmake provided
FindGDAL.cmake if it exists and returns if it succeeds in finding GDAL
using that, otherwise continue with our local cmake code.
Pro: Wont clutter our root CMakeLists.txt
Con: If we begin to write more advanced Findxxx modules (using
COMPONENTS, REQUIRED etc.) we may have to revise this scheme.
"
2014-04-24 10:49:57 +00:00
Robert Osfield
5015fb6dac Renamed FindFreeType.cmake to FindFreetype.cmake to enable CMake build to pick up on CMake's own FindFreetype.cmake when it's available. 2014-04-13 16:04:27 +00:00
Robert Osfield
c168887e5e From Paul Cheyrou-Lagreze, "Attached is fix/feature for FBX osgplugins against latest trunk:
- ReaderWriterFBX.cpp: add "z up scene axis" support:  FBX provides facility to convert model scene axis during conversion. Currently fbx plugin convert axis to fbx:opengl axis system (which is arbitrarily at Y up, as opengl is in reality axis agnostic) and sometimes what is needed is Z up so added an option for Z up conversion

- FindFBX.cmake: add support for latest fbx sdk ( 2014.2 )"
2014-04-09 17:40:27 +00:00
Robert Osfield
ef5be684ed Added extra search paths to add compatibility with Kubuntu/Ubuntu 14.04 now locaton for freetype 2014-04-08 19:42:05 +00:00
Robert Osfield
fba7a65fb4 Fixed MingW build's handling of debug d postfix. 2014-01-28 16:48:47 +00:00
Robert Osfield
1ec3ec1247 From Torben Dannahuer, "modified findcollada.cmake which can now detect Boost 1.55 libraries, which are used by Collada in my 3rdParty package" 2014-01-24 16:28:34 +00:00
Robert Osfield
0bb62a8162 Removed execute properties via svn propdel svn:executable file 2014-01-07 16:43:07 +00:00
Robert Osfield
534d21dffd Renamed the OSGSIM cmake variable to OSGSIM_LIBRARY to be consistent with the rest of the variables. 2014-01-06 10:23:26 +00:00
Robert Osfield
91033a3a1f From Kristofer Tingdahl, Build fix for svg plugin that makes sure the version of librsvg is at sufficient, and fixed a missing virtual destructor warning. 2013-11-22 09:48:02 +00:00
Robert Osfield
dbf88cc209 From Stephan Huber, "minor ios-fixes/-enhancements
* force _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC for IOS device + simulator as the test does not pick the right implementation
* fixed a small compile-bug for iphone-example
* added a check to prevent multiple realization of a GraphicsWindowIOS-object
"
2013-11-18 14:21:06 +00:00
Robert Osfield
ffb0a8e545 From Stephan Huber, "Build Problem with osgGA at MacOS with Xcode 5"..."attached you'll find a possible solution for the issue. This will add a new option to cmake called OSG_CXX_LANGUAGE_STANDARD which defaults to C++11. If you set it to C++98 it will setup the project accordingly." 2013-11-01 14:40:50 +00:00
Robert Osfield
0dc55ebc86 Laurens Voerman, "my cmake (2.8.10.2 generating for Visual Studio 11 Win64) doesn't like
include(${CMAKE_MODULE_PATH}/FindPackageHandleStandardArgs.cmake)
in CMakeModules/FindLua52.cmake
changing to a more common
    include(FindPackageHandleStandardArgs)
solves my problem."
2013-10-10 14:41:41 +00:00
Robert Osfield
e8b5272b02 From Stephan Huber, "attached you’ll find a bunch of fixes + enhancements for iOS and OS X based on current trunk. I incorporated + tested the submission from Colin Cochran, so his submission is not needed anymore.
* fixed a bug with multi-touch and touch-id-generation on iOS and OS X. (will fix a bug reported by Colin Cochran, without ditching the existing logic)
* removed unnecessary warning-flagss when generating xcode-projects via cmake, will enable the usage of OSG_AGGRESSIVE_WARNING_FLAGS
* added support for 10.9 (OS X)
* new cmake-variable: IPHONE_VERSION_MIN, this will set the deployment-target (previously hard-coded) If you set the IPHONE_VERSION_MIN to something like 7.0 osg gets compiled also for 64bit (amd64)
* cmake defaults now to the clang compiler if IPHONE_VERSION_MIN > 4.2
* cmake now sets some xcode-settings so the compiler uses the c++98-standard (clang defaults to c++11, w/o this I got a lot of linking errors)
* removed include-dir for avfoundation-plugin as not needed on OSX/IOS.
* enhanced the ios-example, will now show multitouch-information on a hud (similar to the  osgmultitouch-example), and more importantly, will compile + link out of the box
* small enhancements for the osc-device-plugin (send only one msg for MOVE/DRAG, even if multiple msgs/event is enabled)
* better memory-handling for the zeroconf-plugin
* fixed a possible bug in the rest-http-plugin when receiving mouse-events.
* incorporated a fix from Colin Cochran "forwarded touch events are not transformed into the GL UIView“
"
2013-10-07 10:05:09 +00:00
Robert Osfield
20fbad6c29 Cleaned up line endings 2013-10-07 09:33:46 +00:00
Robert Osfield
79e2d1309f Added support for Lua 5.2 and osg::Object creation from within Lua scripts. 2013-10-04 16:30:25 +00:00
Robert Osfield
b20a74b017 From Ulrich Hertlein, "Patch for FindAVFoundation to work with OS X 10.9" 2013-09-09 12:44:36 +00:00
Robert Osfield
835ee7aa8e Added osgpresentation example as a test bed for new osgPresentation object model.
First cut of example test bed is to test how easy it is to build against Lua, V8 and Python for purposes of running embedded scripts.
2013-08-07 17:08:38 +00:00
Robert Osfield
f6c3c8ac00 From Torben Dannhauer, "Please find attached further changes to make library auto detection
functional again for some libraries:

Find3rdPa..: Fix to find libxml2
FindCollada: Rearranged to handle different MSVC versions more effective.
This file is already prepared for the upcoming VS 2013.
FindNVTT: introduced management of debug libraries (also auto detected).
"
2013-07-23 05:25:39 +00:00
Robert Osfield
bbf00cef01 From Torben Dannhauer, "after being absent for more than 12 month, I'm very pleased to present my
new 3rdparty package (V8).

 This package is compiled with Visual Studio 2012 Update 3. Some community
members complained that these package is very large (indeed), so I
introduced 2 versions:
- The small version contains the dependencies for several image file formats
( tiff, png, gif, jpeg), as well as zlib, minizip, curl, freetype,  glut,
gdal and openSSL
- The full version will include all libraries which were include in the
previous releases of my 3rd party package.

Some of the included libraries are released in newer versions, so I adapted
the attached CMake module to find these renamed files.

I hope you can merge this minor changes soon, since I plan to publish the
small 3rdparty package today.
"
2013-07-18 16:29:13 +00:00
Robert Osfield
2768c1b170 From David Callu, "Here a fix for FindFBX.cmake
under linux, library name to look for must be fbxsdk instead of libfbxsdk."
2013-07-01 09:12:11 +00:00
Robert Osfield
5a93c9100b From Mathieu Marache, I needed to modify the FindCOLLADA.cmake to enable its compilation under macosx. 2013-06-21 09:53:57 +00:00
Robert Osfield
82ecbe98da From Laurens Voerman, "Autodesk released a new version of their FBX Software Development Kit (web page http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775847).
The API has changed quite a bit, so lots of changes had to be made in the osg readerwriter. The preious version of the FBX SDK (2013.3) already deprecated a lot of the names and functions. The code I submit now still compiles against 2013.3 (possibly needs a #define FBX_NEW_API). Not sure if that's useful, but it might ease the transition."
2013-06-03 14:27:14 +00:00
Robert Osfield
29eb65c77d From David Longest, "I have updated the FFmpeg plugin to support the 1.0 release version of FFmpeg. The files attached were modified in order to facilitate the update. Below are the details for all changes made.
Header update

FindFFmpeg.cmake has been changed in order to support the new header include format for FFmpeg. In the 1.0 release, a new file had been added with the name “time.h” in the avutil library. The previous method of adding includes caused conflicts with the ANSI C “time.h” file. Now the include directive will only use the main include folder. All files using the old include format have been updated to reflect the change.



Added __STDC_CONSTANT_MACROS define to CMakeLists.txt

Since there is no guarantee that FFmpegHeaders.hpp will be included before stdint.h is included, the define has been moved from FFmpegHeaders.hpp to be part of the CMakeLists.txt for the FFmpeg plugin. This will allow the define to work on all compilers regardless of include order.



Replaced AVFormatParameters with AVDictionary

AVFormatParameters is no longer supported in FFmpeg and has been replaced with a key/value map of strings for each setting. FFmpegParameters and FFmpegDecoder has been updated to reflect this.



Replaced av_open_input_file with avformat_open_input

FFmpeg now opens files using avformat_open_input. Since the av_open_input_file method is deprecated, the FFmpegDecoder class has been updated to reflect this change.



Added custom AVIOContext field to options

Since some formats and inputs may not be supported by FFmpeg, I have added a new parameter that allows a user to allocate their own AVIOContext. This class will allow for creating a read, seek, and write callback if they desire.



Checking for start_time validity

It is possible for some file formats to not provide a start_time to FFmpeg. This would cause stuttering in the video since the clocks class would be incorrect.



Removed findVideoStream and findAudioStream

The new FFmpeg release already has a function that will find the best audio and video stream. The code has been replaced with this function.



Updated error reporting

Some functions would not log an error when opening a file or modifying a file failed. New logs have been added as well as a function to convert error numbers to their string descriptions.



decode_video has been replaced

The old decode_video function would remove extra data that some decoders use in order to properly decode a packet. Now av_codec_decode_video2 has replaced that function.



Picture format changed from RGBA32 to RGB24

Since most video will not contain an alpha channel, using a 24 bit texture will use less memory."
2013-02-06 12:46:03 +00:00
Robert Osfield
eed71f647d From Stephan Huber, "* imageio: removed ReaderWriterImageIO_IOS.cpp, refactored ReaderWriterImageIO to work on OS X and IOS
* avfoundation: added support for IOS (CoreVideo-support is still in development, works only for SDK >= 6.0, set IPHONE_SDKVER in cMake accordingly)
* zeroconf: added ZeroConf-device-plugin (Mac/Win only, linux implementation missing) to advertise and discover services via ZeroConf/Bonjour, on windows you'll need the Bonjour SDK from Apple
* osgosc: modified the example to demonstrate the usage of the ZeroConf-plugin (start the example with the command-line-argument --zeroconf)
* SlideShowConstructor: enable/disable CoreVideo via a environment variable (P3D_ENABLE_CORE_VIDEO)
* RestHttp: mouse-motion-events get interpolated
* RestHttp: unhandled http-requests get sent as an user-event to the event-queue, all arguments get attached as user-values to the event
* modified some CMakeModules to work correctly when compiling for IOS
* fixed a compile-error for IOS in GraphicsWindowIOS
* some minor bugfixes"
2012-12-05 17:15:53 +00:00
Robert Osfield
fa2fb07609 From Stephan Huber, RestHttpDevice plugin for support of remote application control via Rest http. 2012-10-30 12:31:27 +00:00
Robert Osfield
23786604c6 From Stephan Huber, "attached you'll find a fix for Registry.cpp not using the QTKit-plugin for video-files. W/o this fix you had to preload the plugin to open movie-files." 2012-10-04 13:45:54 +00:00
Robert Osfield
1796d55bea From Stephan Huber, OSX and iOS Video support via a QTKit plugin from OSX 10.7 and before, and an AVFoundation plugin for iOS and OSX10.8 and later. 2012-10-02 14:07:12 +00:00
Robert Osfield
c6a4fde917 From Jorge Izquierdo Ciges, "Mostly small changes to add more compile options, and shared linking (still testing that capability, but this enables on a compile basis if the user wants). Robert, when you give the Ok I'll update/rewrite the Android section in the old/new wiki you'll say where is better. Mostly to be clear for the future users what options can configure and what are their purpose." 2012-04-19 09:50:10 +00:00
Robert Osfield
5a396c91e6 From Martin Lambers, "It adds a new ReaderWriter plugin for the GTA file format
(http://gta.nongnu.org). This allows to read and write floating point
image data. Unlike other formats, GTA also allows very good compression
ratios for floating point data. The compression method can be selected
with the COMPRESSION option of the plugin.
"
2012-02-17 16:45:49 +00:00
Robert Osfield
2a36e51eed From Nico Kruithof, "I found that Collada wasn't found correctly with visual studio 2010." 2012-02-07 11:43:42 +00:00
Robert Osfield
ad0872a783 From Kristofer Tingdahl, Added missing core OSG libraries. 2012-01-27 09:49:06 +00:00
Robert Osfield
eb72bd6556 From Wang Rui, "This fixes a small problem in the FindFBX file. In CMake scripts,
VS2010 is not marked as MSVC100 but MSVC10. And CMake defines
MSVC_VERSION instead of MSVC_VER to indicate the version number. The
modification can find fbx sdk for VS2010 automatically now.
"
2011-07-21 08:52:02 +00:00
Robert Osfield
c34fe4255b From Magnus Kessler, "I have recently installed the latest version of collada-dom on Linux, and
found that the include path has changed. By default, collada-dom now installs
its header files under /usr/local/include/collada-dom or/usr/include/collada-
dom. The attached FindCollada.cmake has been updated to look for these
locations in addition to the previous candidate locations."
2011-06-22 16:18:34 +00:00
Robert Osfield
aab458da93 From Torben Dannhauer, "originally I posted the addendum of 'freetype244MT', but that was wrong.
I updated it to the correct addendum of 'freetype244' yesterday, but supposedly that was not forwarded to you by the forum-to-mail-gateway.

Find attached the corrected CMake module. "
2011-06-21 13:01:23 +00:00
Robert Osfield
058eef0555 From Torben Dannhauer, "Just in time for OSG 3.0 I will present an updated 3rdParty package for VS2008 , which includes some updated libraries (libcurl, freetype, jpeg). It also provides now all debug databases (*.pdb), so all the annoying compile warnings about missing .pdb files are gone.
I extended the CMAKE module to find the new library."
2011-06-19 19:16:49 +00:00