Commit Graph

8314 Commits

Author SHA1 Message Date
Robert Osfield
0781685b6c Fixed warnings 2013-02-04 12:38:08 +00:00
Robert Osfield
63575f53e1 Fixed warning 2013-02-04 12:01:26 +00:00
Robert Osfield
6ec15736cd Standardized use of GL_HALF_FLOAT_NV and GL_HALF_FLOAT_ARB to GL_HALF_FLOAT 2013-01-31 16:26:06 +00:00
Robert Osfield
9bc3b3316a From Stephan Huber, introduction of message id scheme were osc messages are sent with an unique id, and can be dispatched multiple times to workaround network packet losses. 2013-01-31 11:09:03 +00:00
Robert Osfield
5339864c17 Added handling of movies into Timeout 2013-01-30 11:31:27 +00:00
Robert Osfield
f5bd6b0487 Added disabling of the traversal of the Timeout in update when the timout is not displayed and disabled traversal by the SlideEventHandler. 2013-01-30 10:49:18 +00:00
Robert Osfield
1937cc6f14 Fixed the erronous header so that it is OSGPL like the rest of the osgAnimation. 2013-01-30 10:40:26 +00:00
Robert Osfield
366fcbf59b From Stephan Huber, "As I have not all referenced image-data, SlideShowConstructor crashed on my end. Attached is a fix for that crash." 2013-01-30 10:21:45 +00:00
Robert Osfield
84c857d24d From Wang Rui, "I've fixed the bug of writing/reading scenes including the ImageSequence serializer. Current trunk version will fail when handing image sequences because it forces to set className to "osg::Image" in InputStream.cpp. I have to read a value saved in file instead so I must add a hardhanded version checking for backward compatibility.
Now we can work with ImageSequence objects, in both osgt and osgb files."
2013-01-28 14:56:52 +00:00
Robert Osfield
26a8f63212 From Wang Rui, "In the attached files I've added the Compute Shader support for OSG, as well as serializer updates and a new osgcomputeshaders example. My submission also include a setComputeGroups() function in Program for setting compute-shader work groups, and a bindToImageUnit() function in Texture for binding textures as image variables in shaders.
All code are tested on Windows 7 + NVIDIA GFX 570 with the latest GeForce 310.70 Driver (BETA), which could support OpenGL 4.3.

Compute shader information can be found at "http://www.opengl.org/registry/specs/ARB/compute_shader.txt"
"
2013-01-25 11:54:03 +00:00
Robert Osfield
390b546389 Added debug message for Timout 2013-01-25 10:24:11 +00:00
Robert Osfield
bada884342 From Pjotr Svetachov, "when you restart threading
with startThreading/stopThreading the _drawQueue and _availableQueue
are not reset properly. This can lead to a deadlock when threading is
started again. So before threading is started again the queues must be
reset. This deadlock is also reported earlier by someone else in here:
http://forum.openscenegraph.org/viewtopic.php?p=43415#43415"
2013-01-23 17:38:28 +00:00
Robert Osfield
d3e9b61f2b From Pjotr Svetachov, "small bug which I have found in the
FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor: the visitor
will replace part of the tree when visiting the nodes but it does not
update the current node path to reflect this. If you then have
multiple nested transform nodes it will usually crash and sometimes it
won't crash but the resulting mesh will miss some nodes."
2013-01-23 17:37:26 +00:00
Robert Osfield
cd34312ea3 From Mathias Froehlich, "I have extended the dds loader by some newer DX10 texture formats. Especially
the float texture formats.
I need a few of these formats somewhere but have extended everything that I
found plausible and was easy to find a GL texture type/format for.
For some float32 type of texture the files the implementation seem to work fine.
The rest lacks testing.
The writer side is not implemented."
2013-01-23 16:27:22 +00:00
Robert Osfield
233a0a1782 From Lionel Lagarde, fixed typo bug 2013-01-23 15:54:20 +00:00
Robert Osfield
6f7570d4ac Removed redundent code block 2013-01-23 11:50:45 +00:00
Robert Osfield
9a7c9b2a50 From Lukasz Izdebski, "I found problem with rgb plugin.
Internal format of rgb image is wrongly set ( diffrent then in other images type  plugin ), because of that using rgb images in osg::Texture2DArray causes a bug."
2013-01-23 11:45:31 +00:00
Robert Osfield
e5ce3489a2 From Mathias Froehlich, "Attached is a patch that includes the stereo cameras in
Renderer::*etCameraRequiresSetUp.

I am not sure if the getter needs to be changed, but this is currently
included for consistency."
2013-01-23 11:20:00 +00:00
Robert Osfield
44002e77d2 From Alessandro Terenzi, "I've modified the avfoundation plugin to copy the preferredTransform matrix into the UserData property of the corresponding imagestream: by doing so, we can realize if the video should be transformed when applied as a texture (this should be the case, for instance, when we record a movie using an iOS device with any orientation different than 'landscape left')." 2013-01-22 16:53:50 +00:00
Robert Osfield
128eeb9b30 Added <template_layer name="layerbase_1"> and <layer inherit="layerbase_1"> functionality to .p3d functionality. 2013-01-22 16:13:59 +00:00
Robert Osfield
9b08c37373 Added extra check against whether node needs to be traversed in update and event traversals to prevent osgPresentation::Timeout being classified as a node that can be removed. 2013-01-22 10:33:19 +00:00
Robert Osfield
83f9d0f3e6 Added Options support to ImageSequence LOAD_* functionality 2013-01-18 17:11:49 +00:00
Robert Osfield
a0980734ac Added LOAD_AND_RETAIN_IN_UPDATE_TRAVERSAL and LOAD_AND_DISCARD_IN_UPDATE_TRAVERSAL ImageSequence::Mode's to allow for ImageSequence usage without using background paging threads, instead loading all the images on demand in the update traversal. 2013-01-18 16:21:17 +00:00
Robert Osfield
e7e517f2d0 Added <display_broadcast_event> and <dismiss_broadcast_event> support to <timeout> to allow the different timeout statges to be broadcast. 2013-01-17 13:51:52 +00:00
Robert Osfield
7129fce278 Changed the defaults of the Timeout to be DBL_MAX by default. 2013-01-17 11:57:18 +00:00
Robert Osfield
dd189f22e5 Completed <timeout> support, to use it with p3d use it along the lines:
<slide>
    <layer>
        <paragraph>Test</paragraph>
        <timeout>
            <idle_duration_before_timeout>3.0</idle_duration_before_timeout>
            <idle_duration_before_action>5.0</idle_duration_before_action>
            <key_starts_timeout_display>A</key_starts_timeout_display>
            <key_dismiss_timeout_display>S</key_dismiss_timeout_display>
            <key_run_action>D</key_run_action>
            <timeout_jump slide="0" layer="1"></timeout_jump>
            <timeout_event>w</timeout_event>
            <timeout_broadcast_event>t</timeout_broadcast_event>
            <image width="0.5">Images/lz.rgb</image>
        </timeout>
    </layer>
    <layer>
        <model>cow.osg</model>
    </layer>
</slide>
2013-01-17 11:48:20 +00:00
Robert Osfield
1fcadcf514 Added support for <timeout_jump> to Timeout support. 2013-01-17 09:51:15 +00:00
Robert Osfield
b8b8365c06 Implemented basic Timeout display and timing codes 2013-01-16 16:13:30 +00:00
Robert Osfield
81008c24df Added shell of Timeout class 2013-01-15 11:31:44 +00:00
Robert Osfield
93334e7df0 Added movie volume animation control to <image> and <stereo_image> tags to be used in the form:
<slide>
        <properties>
            <property name="volume" type="float">0.20</property>
        </properties>

        <property_animation>
            <key_frame time="0.0">
                <property name="volume" type="float">0.0</property>
            </key_frame>
            <key_frame time="2.0">
                <property name="volume" type="float">1.0</property>
            </key_frame>
            <key_frame time="10.0">
                <property name="volume" type="float">1.0</property>
            </key_frame>
            <key_frame time="12.0">
                <property name="volume" type="float">0.0</property>
            </key_frame>
        </property_animation>

        <layer>
              <image volume="$volume" looping="ON">big_buck_bunny_1080p_stereo.ogg</image>
       </layer>
    </slide>
2013-01-11 11:30:44 +00:00
Robert Osfield
4f8847dd50 Added support for <image delay="time" stop="time"> properties that works in conjunction with the start="time" property support checked in in previous submission,
together these control the delay, start position and stop position of movies.
2013-01-10 19:55:50 +00:00
Robert Osfield
e569671d13 Added support for <image "start=10"> property that tells a video to start specificied number of sections into a video. 2013-01-10 14:37:52 +00:00
Robert Osfield
c367e0771a From Stephan Huber, "thanks for your input, unfortunately I could not get it working with packing, but setting the row-length works now. Seems I had it wrong the first time.
Attached are both files. This should fix the video-bug mentioned on the dlf-wiki.

"
2013-01-10 10:53:22 +00:00
Robert Osfield
2391b42000 Changed the named colours back to having a alpha value of 1.0 to avoid problems with text not appearing. 2013-01-09 16:29:28 +00:00
Robert Osfield
7cc88c6e06 Added case for FORWARD_EVENT to address warning 2013-01-08 10:21:13 +00:00
Robert Osfield
da2efd5feb From Aurelien Albert, "I get a compile error on Windows VS2008 wih new DAE plugin, here is a fix :
_document = _dae->openFromMemory(fileURI, buffer.data());

"data" method is unknow for std::vector with VS2008

I've replaced it with :

    _document = _dae->openFromMemory(fileURI, &buffer[0]);
"
2013-01-07 15:03:22 +00:00
Robert Osfield
e76e3a7b1b From Stephan Huber, "* osgGA: fixed a small bug regarding emulating mouse-events from touch-events
* resthttp/osc: encapsulate RequestHandler-classes in their own namespaces to prevent class-name-lookup-errors in the debugger/code (had some weird crashes)
* QTKit: fixed a compile-bug for gcc and blocks
* osgPresentation: click_to_* will fire on RELEASE, only if the drawable received a PUSH beforehand
* p3d/osgPresentation: implemented "forward_mouse_event_to_device"-tag, which will forward mouse-events to all registered devices of a viewer, if an intersection occurs. The mouse-coordinates get reprojected
* present3d: all devices get registered with the viewer
* osgViewer: only devices which are capable of receiving events are queried for new events.
* GraphicWindowIOS: added a flag to GraphicWindowIOS::WindowData to set up a retained backing buffer (defaults to false) This will enable read-back of the render-buffer with glReadPixels even after the renderbuffer got presented
* curl: added an optimized check for file-existance, now only the headers are requested and checked, instead of reading the whole file and handle it with a ReaderWriter
* p3d: fixed a bug, where the existence of a local file may prevent the remote loading of a file with the same name.

"
2013-01-07 12:17:26 +00:00
Robert Osfield
6d0e1bd50b Added region="$xmin $ymin $zmin $xmax $ymax $zmax" support to <model> tag, along with animation support via the <property_animation> support. 2012-12-20 12:14:53 +00:00
Robert Osfield
0aef0c2f20 Removed lighting of trk lines 2012-12-19 17:14:29 +00:00
Robert Osfield
16e54a00fb Changed the colour calculation and added gl_ClipVertex to enable clipping. 2012-12-19 12:38:17 +00:00
Robert Osfield
634f597feb From Juergen Rensen, "This is a fix for the latest SVN version (rev 13269). The ‘destroyFrameBuffer’ method in ‘GraphicsWindowIOS.mm’ had ‘glDeleteFramebuffersOES’ calls for the stencil buffer, MSAA render buffer and MSAA depth buffer instead of ‘glDeleteRenderbuffersOES’. The fix changes the mismatched calls to ‘glDeleteRenderbuffersOES’.
The impact of the bug was a memory leak that would affect multi-sampling iOS apps that allow for device rotation or window resizing in general. For our app, the leak ranged from ca. 10 MB to 40 MB per device rotation, depending on device, for the MSAA buffers. I have not been able to confirm impact for the stencil buffer. "
2012-12-18 09:49:01 +00:00
Robert Osfield
c15d07caa1 Added support for RGBA colour buffer in osgframerenderer using the --rgba command line option (--rgb selects the standard non colour frame buffer which is the default). 2012-12-17 15:58:57 +00:00
Robert Osfield
d200ef90a7 From Stephan Hunber, "* now you can create a transparent opengl-view (see GraphicWindowIOS::WindowData)
* changes of the view's bound are reported via osg's event-system more reliably

"
2012-12-14 16:31:07 +00:00
Robert Osfield
c4b83d2b0c Added colouring and lighting of track using shader 2012-12-13 16:23:38 +00:00
Robert Osfield
a00c5e3a20 Fixed handling of image colour space conversion when pixel format changes 2012-12-11 17:45:20 +00:00
Robert Osfield
68c1360c96 Added automatic conversion of RGB to RGBA when doing REPLACE_ALPHA_WITH_LUMINANCE colour space conversion. 2012-12-11 17:27:22 +00:00
Robert Osfield
d86849fc35 Disabled lighting and set the colour to white 2012-12-11 10:44:00 +00:00
Robert Osfield
84d8eeb7cb First cut of generating lines from .trk data 2012-12-11 09:55:48 +00:00
Robert Osfield
22868bce4f From Stephan Huber, "attached you'll find a zip containing some bug-fixes and some refactored + new code.
* ZeroConfDevice does now return FILE_NOT_HANDLED instead of FILE_NOT_FOUND
* present3D supports multiple devices per env-var P3D_DEVICE, separate multiple device with a space

I refactored parts the p3d-plugin, the curl-plugin and parts of Registry and ReaderWriter. Currently the p3d-plugin tries to open all remote files with the help of the curl-plugin.

I added a new method to Registry called getReaderWriterForProtocolAndExtension. which will return a ReaderWriter which is capable in handling the remote file for the given protocol and extension. If no readerwriter is found for the given extension, a list is built of all readerwriters supporting the given protocol and this list is checked for support of wildcards (extension = "*"). If anything matches it get returned.

I added this principle also to the Registry, so now it's possible to register a generic ReaderWriter which can handle all filetypes for a given protocol, similar what curl is doing. All you have to do is to load the plugin at startup. The curl-fallback is still in place.

With these changes it is now possible to reference a movie inside a presentation without a server-address, read the presentation (with curl) and stream the movie with the correct plugin (e.g. QTKit)

"
2012-12-07 19:05:47 +00:00
Robert Osfield
8df5440a26 Added naming of root of presentation and used this in the setup of the position of the camera. 2012-12-07 13:59:57 +00:00
Robert Osfield
aa3634979a From Stephan Huber, attached is a fix for the bug of present3D not loading fonts across http. I pass SlideShowConstructor's options-object to readFontFile when constructing any text-objects so freetype can pick up the font-data from the curl-plugin. It works fine now on my end. 2012-12-07 10:19:05 +00:00
Robert Osfield
363633a81d Intial shell of .trk plugin 2012-12-06 19:09:17 +00:00
Robert Osfield
6fa6de8593 From Stephan Huber, build fix 2012-12-06 18:12:00 +00:00
Robert Osfield
9ebf35cf05 Added default value for initialization of port number 2012-12-06 14:42:36 +00:00
Robert Osfield
4cb5d59d35 From Stephan Huber, ZerConfDevice plugin for Windows and Apple 2012-12-06 08:02:08 +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
5a88734598 Moved the expansion of the key codes into ApplicationUsage so that help is only generated for non zero keycodes. 2012-12-05 10:13:51 +00:00
Robert Osfield
cbf6745da5 Added missing break; 2012-12-04 09:11:17 +00:00
Robert Osfield
24c612a2bd From Stephan Huber, "I've found a bug in SlideShowConstructor::findFileAndRecordPath which does return an empty string if the file was not found, and this empty string got added to the fileNames-vector, so the curl-plugin tried to load only an empty file-name, the directory-prefix. I fixed findFileAndRecordPath, so it returns the unmodified filename, which can then be loaded by the curl-plugin. Please review my fix, as I am not sure if it has any side effects, as I know the code not that well.
The file includes another small compile-fix when using float-matrices."
2012-12-03 16:49:47 +00:00
Robert Osfield
7d947d79ff From Wang Rui, "I've found a very covert bug in current VDSM implementation. It makes the computation of positional texgen incorrect if the shadow scene is under one or more child cameras with view/proj offsets. Using current stage instead will fix it." 2012-12-03 10:10:46 +00:00
Robert Osfield
e6141b984d Added include of osc plugin directory to help with Windows build 2012-12-03 09:35:12 +00:00
Robert Osfield
3e32d9c8af Fixed crash when no CameraManipulator is assigned to the viewer 2012-11-30 20:03:31 +00:00
Robert Osfield
d831f1b538 Added support for 0x and numeric defintion of keys to be used with <click_to_event> functionality. 2012-11-30 16:52:59 +00:00
Robert Osfield
6eb3b2f091 Added support for pausing and restart the property_animation. 2012-11-30 15:43:31 +00:00
Robert Osfield
236e75b2be Added xml defined property/property animation to .p3d format for <volume> propeties:
alpha="$alphaname"
   cutoff="$cutoffname"
   region="$minx $miny $minz $maxx $maxy $maxz"
   sampleDensity="$densityname"
   sampleDensityWhenMoving="$densityname"
2012-11-30 14:21:45 +00:00
Robert Osfield
7ffde8abce From Stephan Huber, New OscSendingDevice and OscReceivingDevice classes 2012-11-28 13:28:20 +00:00
Robert Osfield
8b231ba8e3 From Stephan Huber, added event sending support into osgGA::Device along with implementation on this into the osc plugin. Added osgoscdevice example to demonstate this in action. 2012-11-28 10:43:58 +00:00
Robert Osfield
694e603d15 Added support for <properties> tag for <presentation>, <slide> and <layer> scope to compliment the scope of <property_animation> 2012-11-27 16:00:43 +00:00
Robert Osfield
42529ca415 Added preliminary support for <property_animation> 2012-11-27 15:09:44 +00:00
Robert Osfield
a31d603f9a From Stephan Huber, "Attached you'll find a new ImageSequence.cpp which will fix an issue I had when moving the mouse cursor over the left window-border, as the index becomes negative. And I added a UdpSocket.cpp-file with more debuggin-output via some sprinkled printf-calls. " 2012-11-22 15:13:46 +00:00
Robert Osfield
1f50f23f86 Simplified CMakeLists and adjusted OscHostEndianness to automatically detect the endian at compile time 2012-11-22 11:55:38 +00:00
Robert Osfield
9ef448c7b1 From Stephan Huber, updates to explictly set the HOST Endian using Cmake 2012-11-22 11:47:03 +00:00
Robert Osfield
56bc0b14bc Added explict handling of osg::Image, osg::HeightField, osg::Shader and osg::Node when doing writes to the archive. 2012-11-22 09:49:24 +00:00
Robert Osfield
f0b3a47735 From Stephan Huber, further work on osc plugin 2012-11-21 15:19:58 +00:00
Robert Osfield
4b4327aaae Moved static for local to global scope in Uniform.cpp and removed the local static usage in Registry.cpp 2012-11-21 14:27:54 +00:00
Robert Osfield
3a67eefd9f Refactored osgDB::Input::readObjectOfType to use a template, and updated associated wrappers to avoid using local static's 2012-11-21 13:38:11 +00:00
Robert Osfield
ea9e13a0c6 From Paul Martz, fix for Windows build 2012-11-20 18:41:30 +00:00
Robert Osfield
7e67ac7a34 From Stephan Huber, added missing windows dependency 2012-11-20 13:01:57 +00:00
Robert Osfield
f3e9967f47 Added ws2_32 library to Win32 build 2012-11-20 10:37:42 +00:00
Robert Osfield
8b30807ef1 From Paul Martz, build fixes 2012-11-19 11:25:52 +00:00
Robert Osfield
e2ee774705 Frm Stephan Huber, osc plugin that supports send and recieving events via UDP packets. 2012-11-19 10:48:37 +00:00
Robert Osfield
c005e6997c Added first cut implememtation of PropertyAnimation class 2012-11-16 15:40:41 +00:00
Robert Osfield
10c43a3052 Moved PropertyManager related classes out from SlideEventHandler into their own dedicated header/source file. 2012-11-15 12:11:19 +00:00
Robert Osfield
057f8a8b3b Added support for <image blending="ON" or blending="OFF"> to allow user definition of when to enable OpenGL blending for an image or not. 2012-11-13 14:22:37 +00:00
Robert Osfield
0c02ef358f From Stephan Huber, fixed warning 2012-11-13 13:52:33 +00:00
Robert Osfield
933baf5db4 Changed COLOUR to COLOR to be consistent with OpenGL spelling 2012-11-13 13:32:01 +00:00
Robert Osfield
92975a01fd Moved colour space conversion of volumes from the osgvolume example into osg/ImageUtils and added support for colorSpaceConversion="MODULATE_ALPHA_BY_LUMINANCE","MODULATE_ALPHA_BY_COLOUR","REPLACE_ALPHA_WITH_LUMINANCE" and "REPLACE_RGB_WITH_LUMINANCE" to .p3d <volume> tag 2012-11-13 13:16:10 +00:00
Robert Osfield
e72af02c2b Added first step to adding pruning of expired image requests. 2012-11-13 11:45:20 +00:00
Robert Osfield
ad1cec1b2e From Stephan Huber, introduced syncornization of osgGA::Device 2012-11-13 11:20:36 +00:00
Robert Osfield
bf4daf11ff Cleaned up reported of events and added assigned of <volume> tag region properities when using the wildcard definition of the volume. 2012-11-12 16:46:08 +00:00
Robert Osfield
e8b86dc4ec Added missing files in support of key_jump and key_run tags 2012-11-10 12:12:24 +00:00
Robert Osfield
ff476e9c15 Added support for naming slides and layers with slide_name and layer_name properties respectively.
Added support for creating events based on key presses using a <key_to_run> and <key_to_jump> tags.
2012-11-09 21:32:54 +00:00
Robert Osfield
fd4126dc59 Added Node::getName() and getUserDataContainer() to check to see if an node can be removed or not. 2012-11-09 21:23:42 +00:00
Robert Osfield
36f6ef7242 From Alexander Sinditskiy, "I found issue with capturing mouse buttons.
This issue can be reproduced:
1. Create osgViewer window,
2. Push right&left mouse buttons on the osgViewer window,
3. Move mouse out of window, and release right&left mouse buttons.

osgViewer window handle only first mouse release, as result window thinks that we did not released second mouse button.

I attached fix for this issue."
2012-11-08 17:19:51 +00:00
Robert Osfield
1b871a822d Added support for <imagesequence interaction_mode="USE_MOUSE_Y_POSITION"> 2012-11-08 15:45:23 +00:00
Robert Osfield
b51bbaa406 Added check to avoid doing update when the imagesequence is empty. 2012-11-08 14:15:59 +00:00
Robert Osfield
014f13f774 Refactored ImageSequence to better handle random access usage. 2012-11-08 11:19:31 +00:00
Robert Osfield
4fa32ee0b8 From Stephan Huber, improved performance by using native apple functions for flipping image 2012-11-06 11:18:33 +00:00
Robert Osfield
f09b9576c6 From Stephan Huber, "Attached you'll find a fix for the image-io-plugin to handle out-of-memory situations more gracefully as before (don't crash)" 2012-11-05 17:22:34 +00:00
Robert Osfield
7cb6e103f4 Quitened down debug output 2012-11-05 12:21:34 +00:00