if continuous updating is set to false.
The problem was being caused by the camera update call never being made
if continuous updating was not set to true. This fix adds a flag that
is set when dirtyOverlayTexture() is called and checked in the update
visitor section of the traversal to determine if the camera should be
updated.
I tested the fix by making some changes to the osgAnimate example
program so it has continuous updating off and calls dirtyOverlayTexture
for each frame. The overlay texture now displays properly."
"
the main problem is the wrapper generation:
The PropertyInfo class use MethodInfo class to access to the value.
When the property are define with the I_Property* macro,
the MethodInfo use by the property to have access to the value
are instancied in the I_Property* macro, but there
are already instantied by the I_Method* macro before
secondary problem:
- the function used by the property could no be customized
in the genwrapper.conf file
- an array property can't insert a value
- the std::map reflector (and indexedProperty in general) haven't remove method
- about the help in wrapper ... why not ...
solution :
To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro
old macro :
#define I_Method0(ret, fn) (\
params.clear(),\
addMethod(new osgIntrospection::TypedMethodIn
fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params)))
new macro :
#define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \
params.clear(); \
osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)
the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use
so for I_Property macro :
old macro :
#define I_PropertyWithReturnType(t, n, r) \
cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \
I_Method0(t, get##n), \
I_Method1(r, set##n, IN, t, value)))
new macro:
#define I_SimpleProperty(t, n, get, set) \
get, \
set))
The genwrapper has been modified in this way.
The method signature is define by the prototype of the method
For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature
solution for secondary problem:
The genwrapper accept new tokens in the configuration to custumize the property.
The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined
The PropertyRemover has been added to the StdMapReflector
The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class
modification:
I have modify the genwrapper files
Configuration.cpp Configuration.h add some tokens to custumize the property
Doxyfile.template add the comment in the output xml
genwrapper.conf customize some property in osg::Geometry
RegistryBuilder.h RegistryBuilder.cpp add the process_help function (to extract help from xml)
TypeRegister.cpp TypeRegister.h optimize the property detection
TypeDesc.h TypeDesc.cpp modify FunctionDesc and PropertyDesc
WrapperGenerator.h WrapperGenerator.cpp modify the output
I also modify the fallowing osgIntrospection files:
include/osgIntrospection/Attributes add the PropertyInserter and the CustomPropertyInsertAttribute class
include/osgIntrospection/ConstructorInfo add the _briefHelp and _detailedHelp variable in the ConstructorInfo class
add access function for the two new variables (_briefHelp and _detailedHelp)
modify the constructor to define the two new variables (_briefHelp and _detailedHelp)
include/osgIntrospection/MethodInfo add the _briefHelp and _detailedHelp variable in the MethodInfo class
add access function for the two new variables (_briefHelp and _detailedHelp)
modify the constructor to define the two new variables (_briefHelp and _detailedHelp)
include/osgIntrospection/PropertyInfo add the _briefHelp and _detailedHelp variable in the PropertyInfo class
add access function for the two new variables (_briefHelp and _detailedHelp)
modify the constructor to define the two new variables (_briefHelp and _detailedHelp)
include/osgIntrospection/ReflectionMacro remove unused I_Property* macro
modify all I_Method macro to accept the help string
modify all I_Method macro to define a MethodInfo signature
include/osgIntrospection/Reflector add the PropertyInserter in StdVectorReflector and StdListReflector
add the PropertyRemover in the StdMapReflector
include/osgIntrospection/StaticMethodInfo modify all StaticMethodInfo* to accept the help in parameter
include/osgIntrospection/TypedMethodInfo modify all TypedMethodInfo* to accept the help in parameter
include/osgIntrospection/TypedConstructorInfo modify all TypedConstructorInfo* to accept the help in parameter
include/osgIntrospection/Type add the _briefHelp and _detailedHelp variable in the Type class
"
lighting and backface culling settings from the event handling code in StatesetManipulator
into public methods. The event handler now calls the public methods. This allows user code
to invoke this same functionality from non-keyboard event inputs without clashing with the
keyboard-invoked functionality."
From Robert Osfield, tweaks to the above to kepp the coding style the same as the rest of the OSG, also
made getPolygonMode() const, and updated the wrappers.
handle scenes with multiple views with elements that need coordinating on a per view basis.
Added beginings of new osgText::FadeText class (not functionality yet).
two passes over the copying of imagery and DEM's to the destination graphs, once for
the original position, and once for the wrap around 360 degrees on or before.
Also fixed the GeospationExtents constructor that was setting the _max to DBL_MIN rather
than -DBL_MAX. This bug causesd the y axis to be computed incorrectly.
"I've made some changes to osg which I think make it easier to control
the render order of CameraNode's. Instead of using the built-in orders
(PRE_RENDER, POST_RENDER, NESTED_RENDER), you can specify an integer
order. Values less than zero are pre rendered in order. Values greater
than zero are post rendered in order. And a value of 0 is equivalent
to NESTED_RENDER.
The changes should be fully backward compatible. Also, I changed the
RenderStageList type from a vector to a list because I needed to be
able to insert values anywhere in the list.
The reason I made these changes was because I wanted to be able to set
the render order of a CameraNode at runtime without having to reorder
it in the scenegraph."
and later in the final submission message (relating to what has been finally been merged) :
"I've rethought my implementation and came up with something a little
better. The setRenderOrder will continue to take an enum, but will
have an optional orderNum parameter which can be both positive and
negative. I think this method is more intuitive and flexible."
"bug fix to reflect the wchar_t in Value and Value.cpp I add the toWString() function.
in Type and Type.cpp I just add two function to get a map of propertyList and a map of methodList
i need this map in my editor a i think it's could be util to put this functionnality in osgIntrospection,
"I was experiencing hard crashes of my application when using PBO's on
machines that don't support PBO's. I think osg incorrectly checks if
PBO's are supported.
I added a new method to the BufferObject::Extensions class which
returns if the "GL_ARB_pixel_buffer_object" string is supported. This
fixes the problem on my end. Machines without PBO support will
continue to work and machines with PBO support will still be able to
use it."
think it can be simplified quite a bit. The old code includes
<cmath> for pre-10.2 and anything using something other than g++ 4
and then uses std::isnan. For the most current version, it leaves
out cmath and uses isnan(). std::isnan and cmath work for the
current version, so I just made it include cmath if __APPLE__ is
defined and removed the ifdef between versions of OS X for isnan
related things.
This way the code is all the same, and it's not fragile to someone
including <cmath> prior to including osg/Math."
in incorrect texture assignment. Solution was to a compareTextureObjects() test to the Texture*::compare(..) method that
the osgUtil::Optimizer::StateSetVisitor uses to determine uniqueness.
"I've attached fixes to DataSet that should fix the problems that Maya was seeing yesterday. The issue was that the new interpolation code I submitted didn't use the SourceData's georef, it was assuming that the GDALDataSet had a proper geo-ref. I've made the getInterpolatedValue method a member of SourceData and now it uses the georef the SourceData's georef.
I also forward declared the GDALRasterBand class in the DataSet header."
setFactorAndUnitMultipliersUsingBestGuessForDriver() static methods to
osg::PolygonOffset to help implement workarounds for lack of portablity of
settings between different hardware.
make it consistent with the constructor and prevent the
BlendFuncSeparate path being called. This patch fixed the artifact
with the osgpointsprite demo on ATI cards reported by Mike Weiblen."
"There was a typo in "int setNotifyOffset()", appear to be a getter =>
"int getNotifyOffset()".
Then I have added a switch to create GDALTermProgress only when the
current notify level + local offset permit message display. In fact, if
the offset is set to 0 and the notify level is at the default, DataSet
is quiet but for the GDALTermProgress. That is quite disturbing since
you think the progress is related to the complete processing but it is
actually only related to the GDAL Warp."
"Attached is some fixes for Image::readImageFromCurrentTexture. It was
failing when used with a new Image object (some of the fields were
not set before they were used, and some were set to the wrong values).
A new optional parameter was added to give the desired data type, which
defaults to GL_UNSIGNED_BYTE, so programs should only need a recompile
to work properly."
"attached you'll find some modifications to Producer, osgGA and
osgProducer to enable Mac OS X support for
+ scrollwheels,
+ mightymouse-srollballs
+ new tracking-pads with scroll feature
+ tablet-support (pressure, proximity and pointertype) (Wacom only tested)
I think there was a bug in the windows-implementation of scroll-wheel
support (wrong order of ScrollingMotion-enum, casting problem) which is
fixed now.
The scrollwheel-code is a bit klunky across platforms, some devices on
OS X can report an absolute delta in pixel-coordinates not only the
direction, so for now there is scrollingMotion (which describes the
direction) and scrolldeltax and scrolldeltay. I decided to leave the
scrollingmotion-stuff to not break old code relying on this."
that users can assign to it without it being overriden. If none is
assigned externally it now uses a StateSet associated wit the Font assigned
to the Text.
dded GeospatialExtents bounding box class which used doubles
in place of the original usage of osg::BoundingBox.
Added path for computing interpolation elevation data being read from GDAL.
when the binding mode changes, thereby avoiding uncessary calls to dirtyDisplayList.
Note, from Robert Osfield, moved bodies of set*Binding() into Geometry.cpp to avoid
clutter in the header.
that removeChild(Node*), removeChild(uint) and equivilant Geode methods are
now inline methods, not designed to be overriden, and seperated out the
multiple remove method to be called removeChildren(uint, uint) which is
now the only virtual method. There removeChildren is now the method to
override in subclasses.
This reorganisation requires some call code to be rename removeChild usage
to removeChildren.
osg::DisplaySettings class. OsgCameraGroup will now read the setting
from the DisplaySettings instead of hardcoding the value. I added the
following commandline option to be able to set the multisample value:
--samples <num>
One thing to note, OsgCameraGroup would previously check if the
computer is an SGI and set multisample to 4. I retained this check in
DisplaySettings to be backwards compatible."
keyboard and mouse events.
Added osgGA::EventQueue class to support a thread safe event queue and adaption
of keyboard and mouse events.
Removed osgProducer::EventAdapter as GUIEventAdapter replaces it.
Adapted osgProducer and examples to work with the new changes to osgGA.
an invalid bounding sphere if it hasn't seen a cull traversal yet. It
depends on _firstTimeToSetEyePoint, which is initially true, then false
after a cull. There might be a better way? If so, let me know.
This change does resolve the issue I had encountered with auto scale to
screen and incorrect culling."
Added better handling in computeIntersections(..) of nodes that are internal
to the scene graph, correctly accounting for the accumulated transforms.
Changed the EventVisitor so that it only traveses active children rather than
all children.
Updated wrappers.
Normally the automatic setup is useful, but in the case of the .osg support this automatic
update was forcing premature loading of imagery that wasn't necessarily, and can lead to
reports of looking for files that arn't present.
change of ' ' to GUIEventAdapter::KEY_Space, fix to url in Matrix_implementation.cpp.
Syntax fixes by Robert Osfield to above submission fix inconsistencies with normal
OSG coding style.
methods, two that takes an index,two that takes a key value. Updated the ViewEventHandler
so the it now uses the getMatrixManipulatorWithIndex() method to avoid previous ambiguity.
I spent some more time debugging and it turns out there was a bug in
the ParticleSystem::update_bounds function. When the bound is being
reset, both the min and max are being set to the same postion without
the radius being subtracted/added to it. When there is only one
particle alive in the system this causes it to be culled by small
feature culling. I've modifed the function so that when the bound is
reset, the radius is subtracted/added to the position. This fixes my
problem."
paramters in its constructor to allow it to be used to create rotations around a point.
This provides the same interface and functionality as osgUtil::TransformCallback but
has the advantage and AnimationPathCallback is fully supported by the .osg and .ive file formats.
along with support for this Texture1D, 2D, 3D, TextureCubeMap and TextureRectangle. The
new SourceFormat and SourceType parameters are only used when no osg::Image is assigned to
an osg::Texture, and main use is for render to texture effects.
Added support for --hdr option in osgprerender, which utilises the new Texture::setSourceFormat/Type() methods.
readFontStream() to load fonts from a std::istream, rather than from the
local filesystem by name. Such a call may be used, for example, if the
user has a font fetched over a network, or a font available in memory
without a correspondng filename.
The changes implement the new function by following the corresponding code
for readFontFile(). readFontStream() reads a stream into memory, and
holds that memory for FreeType.
As a basic test, I mangled the osgtext example to use
readFontStream(std::ifstream("font")) in lieu of a readFontFile call, and
the modified example ran completely."
SGIX_blend_alpha_minmax and EXT_blend_logic_op extensions. It is
tested with the osgblendequation example. If the extensions are not
supported, a WARN level notification is generated."
the viewport, the clear colour and the subgraph needing rendered. This is done
transparently so all existing functionality will behave as before. What it does
add is the ability to set a SceneView directly by a single osg::CameraNode when required.