Commit Graph

11954 Commits

Author SHA1 Message Date
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
Robert Osfield
ea631c777d From Aurelien Albert, "In the DXF plugin, DXF layers are decoded and each layer is added in a separate group, which is very usefull to retrieve a layer or display a list of all layers in the aplication.
But the layers are not always children of the "model root" node : there can be a matrix transform between "model root" and "layers parent", so I've added the name "Layers" on the node which contains all layers to easily retrieve the layers groups from application code."
2012-09-20 14:06:01 +00:00
Robert Osfield
b3f8679b69 From Luc Frauciel, Added sRGB FrameBuffer string 2012-09-20 14:03:47 +00:00
Robert Osfield
f804d7dd81 From Vladimir Cheaev, "
I worked with a osg::Constraint and found strange part of code:
class OSGMANIPULATOR_EXPORT Constraint : public osg::Referenced
{
    public:
...
        virtual bool constrain(ScaleUniformCommand& command) const     { return constrain((MotionCommand&)command); }
        virtual bool constrain(const Rotate3DCommand& command)         { return constrain((MotionCommand&)command); }
...

If i use osgManipulator::Rotate3DCommand then method Rotate3DCommand::accept(const Constraint& constraint) calls Constraint::constrain(MotionCommand&) instead Constraint:: constrain(const Rotate3DCommand&).

If you replace
        virtual bool constrain(const Rotate3DCommand& command)         { return constrain((MotionCommand&)command); }
on to
        virtual bool constrain(Rotate3DCommand& command) const         { return constrain((MotionCommand&)command); }
then all works correctly.
"
2012-09-20 11:27:57 +00:00
Robert Osfield
01c7d87b1a From Farshid Lashkari, Added GLBeginEndAdapter::reset(), and _overallNormalAssigned, _overallColorAssigned flags to avoid the GLBeginEndAdapter adapter setting colour and normals when none has been assigned. 2012-09-20 11:18:19 +00:00
Robert Osfield
d511288718 From Ulrich Hertlein, "attached is a patch to src/osgViewer/CMakeLists.txt that inverts the logic of when to use
Cocoa and when to use the old Carbon interface for the windowing system.

The old code had to be modified for every new OS X release to default to Cocoa.
The new code uses Carbon for <= OS X 10.4 and Cocoa on everything else."
2012-09-20 11:16:02 +00:00
Robert Osfield
b32cf216a7 Added ReadQueue::size() method to help with debugging. 2012-09-20 11:14:10 +00:00
Robert Osfield
67abc66d8a Added handling of directory names in osgimagesequence commandline.
From Stephan Huber, added support for controlling the ImageSequence seek position via mouse x position, toggled on/off via 'i' key.
2012-09-12 16:35:12 +00:00
Robert Osfield
5d5cf26138 Added osgDB::getSortedDirectoryContents and osgDB::FileNameComparator to help with sorting directory contents into alphabetic and numerical order. 2012-09-12 16:02:02 +00:00
Robert Osfield
cfe36876d4 Converted sorting of directory contents across to use the new osgDB::FileNameComparator and osgDB::getSortedDirectoryContents() 2012-09-12 11:09:41 +00:00
Robert Osfield
7fe5db073b Updated version after 3.1.3 dev release 2012-09-10 08:24:49 +00:00
Robert Osfield
7233b2117c Updated ChangeLog for 3.1.3 dev release 2012-09-07 17:04:31 +00:00
Robert Osfield
f288f9e996 From Wojciech Lewandowski, "With current trunk I had an error while compiling osg/Image.cpp for IOS simulator / GLES2. Symbol GL_RGBA16 was missing. Adding #define GL_RGBA16 0x805B to Image header solves the problem. " 2012-09-07 14:55:09 +00:00
Robert Osfield
55d03d5b34 Added setting of the input range of the event state based on the master cameras viewport. 2012-09-07 09:31:26 +00:00
Robert Osfield
53405c118a Added check so not intialization is down when you select the current camera manipulator 2012-09-07 08:33:24 +00:00