Commit Graph

11918 Commits

Author SHA1 Message Date
Robert Osfield
79ae9cd8a3 Added osgframerenderer example 2012-11-12 15:26:30 +00:00
Robert Osfield
e9a7b2a6e5 Changed the default settings to fix a jump problems 2012-11-12 10:36:21 +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
b6c6885a97 Changed the way the mouse position is update to handle the remote device control. 2012-11-08 15:28:24 +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
17b372ec38 Tweaked casts/types to fix build under Linux 2012-11-06 17:49:32 +00:00
Robert Osfield
679956e79a Added f qualifer to 1.0 to fix build problem under MSVS 2012-11-06 14:25:28 +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
Robert Osfield
d7ce523529 From Stephan Huber, updated to debug output to RestHttpDevice and tweaks to ImageIO and QTKit plugins 2012-11-05 12:03:50 +00:00
Robert Osfield
18d66619b0 Added static cast to float to avoid compile error under MSV 2012-11-05 09:36:00 +00:00
Robert Osfield
e45bdb60d7 From David Longest, "When drawing, a transform with an absolute reference frame will ignore the
calculated model / view matrices up to that point. The IntersectionVisitor would instead keep the
view matrices calculated up to that point even though the Transform class will throw out the
calculated model matrix via “computeLocalToWorldMatrix.”

The change I made will push an identity matrix as the view matrix when running into a transform
with an absolute reference frame and will pop the matrix off after the traverse.

To test this, I created a camera with a perspective view and added a transform with some geometry
in it. Afterwards, I set the transform’s reference frame to ABSOLUTE_RF and spun the camera around
using the trackball manipulator. When trying to pick with a LineSegmentIntersector, it would not
pick the geometry in the transform with the reference frame set to ABSOLUTE_RF."
2012-11-01 18:06:46 +00:00
Robert Osfield
2e1f90f7e8 Changed the PropertyEventCallback to only respond to mouse releated events. 2012-11-01 16:11:13 +00:00
Robert Osfield
9271b53c56 2012-11-01 14:29:26 +00:00
Robert Osfield
98e9f187b3 Added reading of the P3D_DEVICE env var for setting up the --device entry. 2012-10-31 17:06:29 +00:00
Robert Osfield
a6f3e0af78 Added event and update callbacks to pass up changes to the mouse position to the ImageSequence::seek() to control which images is selected based on mouse x position 2012-10-31 16:07:23 +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
d879cd7715 Intial work towards support an interaction <imagesequence> tag in Present3D. 2012-10-29 15:58:02 +00:00
Robert Osfield
ce623c697e From Luc Frauciel, "Compile Fix - KTX plugin with Visual Studio, <stdint.h>not defined under MSVC" 2012-10-26 15:31:18 +00:00
Robert Osfield
cebb9f6103 Fixed bug in click_to_run feature where events would be handled by hidden labels 2012-10-24 16:10:38 +00:00
Robert Osfield
f9fd4342ba From Stephan Huber, "attached you'll find the latest versions of the QTKit + the AVFoundation-plugin, some changes to osgPresentation and a small enhancement für ImageIO.
I fixed some bugs and did some more tests with both of the video-plugins. I integrated CoreVideo with osgPresentation, ImageStream has a new virtual method called createSuitableTexture which returns NULL for default implementations. Specialized implementations like the QTKit-plugin return a CoreVideo-texture. I refactored the code in SlideShowConstructor::createTexturedQuad to use a texture returned from ImageStream::createSuitableTexture.

I did not use osgDB::readObjectFile to get the texture-object, as a lot of image-related code in SlideShowConstructor had to be refactored to use a texture.  My changes are minimal and should not break existing code.

There's one minor issue with CoreVideo in general: As the implementation is asynchronous, there might be no texture available, when first showing the video the first frame. I am a bit unsure how to tackle this problem, any input on this is appreciated.

Back to the AVFoundation-plugin: the current implementation does not support CoreVideo as the QTKit-plugin supports it. There's no way to get decoded frames from AVFoundation stored on the GPU, which is kind of sad. I added some support for CoreVideo to transfer decoded frames back to the GPU, but in my testings the performance was worse than using the normal approach using glTexSubImage. This is why I disabled CoreVideo for AVFoundation. You can still request a CoreVideoTexture via readObjectFile, though.
"
2012-10-24 10:43:01 +00:00
Robert Osfield
1591fe09f3 Added osgGA::Device class for integration of both physical and virtual devices.
Added template readFile(..) function to make it more convinient to cast to a specific object type.

Added support for osgGA::Device to osgViewer.

Added sdl plugin to provides very basic joystick osgGA::Device integration.
2012-10-23 16:15:03 +00:00
Robert Osfield
f9ad1e5673 Added mutex lock to Uniform::addParent()/removeParent(). 2012-10-22 16:21:04 +00:00
Robert Osfield
1872137d88 Added serializers for osgGA 2012-10-12 14:51:08 +00:00
Robert Osfield
ad926d7265 Removed the insert of requests in the ImageSequence::_filesRequested data structure so that it always requests files, leaving it up the ImagePager to decide to track duplicates 2012-10-09 16:14:21 +00:00
Robert Osfield
9fab99ddd9 From Wang Rui, "I modified the Serializer header to add a UPDATE_TO_VERSION_SCOPED
macro, which could set version within brackets and reset it after
that. All related serializers are also modified so that the
backward-compatibility bug reported by Farshid can be fixed.
"

From Robert Osfield, removed the use of osg::Referenced and creating the proxy object on the heap.
2012-10-09 16:05:50 +00:00
Robert Osfield
16de7e9f33 From Wang Rui, "I've added CDATA tag support to XmlParser so that we can keep user
data (e.g., GLSL shader texts) in XML files without parsing them. This
will be necessary for the coming-soon effect compositor submission.
:-)"
2012-10-08 16:14:23 +00:00
Robert Osfield
94e8c42569 Added a static_cast to avoid build issues under Windows 2012-10-08 16:12:59 +00:00
Robert Osfield
03a9786b11 Fixed warning 2012-10-08 16:03:16 +00:00
Robert Osfield
7244e97850 From Aurelein Albert, "Under some Visual Studio configuration, I get compile error on "lib3ds_io.c" due to use of these kind of conversion :
b[1] = uint8_t((w & 0xFF00) >> 8);

I replaced it with :

    b[1] = (uint8_t)((w & 0xFF00) >> 8);

And it compiles fine
"
2012-10-08 15:10:56 +00:00
Robert Osfield
4235169d41 From Gill Peacegood, "In the attached file I have changed the colour space used for writing images to match the one used for reading images. Also this color space does not make subtle changes to the original colours which i think is probably what most people intend when writing an image and is more consistent with other plugins.
The effect is that an image that is written does not have a noticeably different colour when it is read back."
2012-10-08 12:00:53 +00:00
Robert Osfield
232bda3828 From Oren Fromberg, ""
--This line, and thosAttached is an update to ReaderWriterDAE.cpp/h and daeReader.cpp/h that implements

osgDB::ReaderWriter::ReadResult

ReaderWriterDAE::readNode (std::istream&, const osgDB::ReaderWriter::Options*)

This virtual function had never been implemented in ReaderWriterDAE. I implemented this function because the DAE plugin could not load files from other ReaderWriter derived objects that use protocol handlers.

I have updated function declarations in the header to have identical signatures with the base class declarations that include the default parameter.


readNode (std::istream&, …) is nearly identical to readNode(const std::string &, …) except it uses a new private function to convert the file from standard input:

bool daeReader::convert( std::istream& fin )

When this function is called fileURI is the string “from std::istream” to make the user aware where the file is coming from. Then instead of calling

_dae->open(fileURI)

we call

_dae->openFromMemory(fileURI, buffer.data())

Where buffer.data() is a pointer to the dae file text in memory.


Other changes include private functions to clear caches and to consolidate redundant code that appears between the two convert functions.


e below, will be ignored--

M    src/osgPlugins/dae/ReaderWriterDAE.cpp
M    src/osgPlugins/dae/daeReader.cpp
M    src/osgPlugins/dae/ReaderWriterDAE.h
M    src/osgPlugins/dae/daeReader.h
2012-10-08 11:54:40 +00:00
Robert Osfield
b742a9e71a From James Athey, "I've attached a new osgDB ReaderWriter that can read Khronos Texture Files
(KTX).  The KTX file format is straightforward and designed to be easy to
use in OpenGL.

http://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
http://www.khronos.org/opengles/sdk/tools/KTX/

The attached plugin can read:

* 1D, 2D, and 3D textures
* uncompressed and compressed images
* mipmapped and non-mipmapped textures
* little-endian and big-endian files
* textures from files as well as seekable istream objects

It does not handle:

* array textures (not supported by the ReaderWriter API)
* cubemap textures (not supported by the ReaderWriter API)
* the "KTXorientation" key-value pair; support could be added later (see
the file format spec for more information)
* non-seekable istream objects (would require more complicated memory
management)
"
2012-10-08 11:10:25 +00:00
Robert Osfield
740f660ef1 Made TouchData and osg::Object to aid with serialization. 2012-10-05 16:31:23 +00:00
Robert Osfield
47c5ddbce5 Improved ImageSequence's handling of seek() and added a simply hack to ImagePager to prevent the number of requests accumulating. 2012-10-05 10:37:36 +00:00
Robert Osfield
77bd6cbfe9 From Stephan Huber and Robert Osfield, addded interactive setting of the ImageSequence::seek() based on the mouse x position. 2012-10-05 10:35:06 +00:00
Robert Osfield
2e79a0e2d4 Added set methods to assist with serialization support 2012-10-05 10:07:09 +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
0dbafcc316 From Leigh Stivers, "We had this problem which shows up with nVidia's latest Quadro driver, 305.93 - and older drivers when the nVidia's setting "Thread Optimization" was turned on, running Windows 7. The symptom, is that after creating a first view and using it, and then creating a second view, the first view will never render anything but black.
What happens is this:
A view is created, and then the viewers thread is created and runs.
The setReleaseContextAtEndOfFrameHint is true.
To create a second view, the viewer is setDone(true), and we wait for the thread exit.

At this point, inside the ViewerBase::RenderingTraversals code, there are places where it reads "if(_done) return;"

The problem, is that it won't reach the code that will releaseContext().

Apparently, this driver won't let any other thread to makeCurrent(), if another thread (dead or not) has ownership.  So when the Viewers is re-started, the first view won't be able to use the gc.

The change attached (against rev 13153) corrects this."
2012-09-28 16:36:42 +00:00
Robert Osfield
4896edda56 From Thomas Hogarth, "Apple have decided in their eternal wisdom to do away with separate depth and stencil buffers on iOS from version 5 and above.
Attached are changes to GraphicsWindowIOS.mm to support setting up the new buffer type when compiling for iOS5,
also attached is a small change to FrameBufferObject.cpp to report support for packed depth stencil via the
GL_OES_packed_depth_stencil extension.

For anyone reading this you can attach a packed depth stencil to your FBO like so

_rttCamera->attach( osg::Camera::PACKED_DEPTH_STENCIL_BUFFER, GL_DEPTH24_STENCIL8_EXT );

Luckily GL_DEPTH24_STENCIL8_EXT happens to have the same value as iOSs GL_DEPTH24_STENCIL8_OES"
2012-09-27 08:34:56 +00:00
Robert Osfield
03047f3e7f From Paul Martz, "This change to include/osg/GL correctly includes the OpenGL header on OSX 10.7 when building OSG trunk for GL3. It also adds some CPP defines for compatibility." 2012-09-26 08:42:04 +00:00
Robert Osfield
86a37616f7 Changed dispatch to virtual 2012-09-25 11:04:11 +00:00
Robert Osfield
0e8bcc9027 From Frederic Bouvier, "fix PNG write for images with bits per components different than 8 that was hard coded." 2012-09-24 10:10:28 +00:00