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."
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.
"
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.
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.
--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
(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)
"
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."
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"
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."
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.
"
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."