Commit Graph

2048 Commits

Author SHA1 Message Date
Robert Osfield
0cd64c8c4f Added View::setUpViewOnSingleScreen(uint) method to help set up view on
a single full screen window
2007-01-06 21:06:35 +00:00
Robert Osfield
fea694a0bf Ported osgcluster to osgViewer. 2007-01-05 21:19:01 +00:00
Robert Osfield
9a4209c61b Simplified the nameing of updateTraversal etc methods 2007-01-05 16:48:04 +00:00
Robert Osfield
9fcace0e73 Added GraphicsContext support for clearing the graphis context. The clearing
is off by default (ClearMask is 0), but can be switched on when ClearMask is
non zero.  GraphicsContext::clear() is called after each swap buffers
2007-01-05 15:24:06 +00:00
Robert Osfield
fc07efa656 Added int return type of Viewer::run(). 2007-01-05 13:16:24 +00:00
Robert Osfield
23ac972d4e Added a workaround for computing the time of an event. 2007-01-05 13:01:08 +00:00
Robert Osfield
552bda4cc5 Added Viewer::isRealized() and run() methods to make it easier to
set up and run a viewer, taking care of realized() calls if not already
done, and assigning trackball manipulator if not already assigned.
2007-01-05 10:59:23 +00:00
Robert Osfield
9e30014634 Removed inappropriate comment about normal orientation. 2007-01-05 09:55:04 +00:00
Robert Osfield
0985a06572 Moved the set of GraphicsContext RenderingOperations into Viewer. 2007-01-04 21:49:02 +00:00
Robert Osfield
1fd2047cf5 Added Viewer::setKeySetsDone(int) to allow developers to specify which
key should set done and cause the main loop to exit.
2007-01-04 21:28:16 +00:00
Robert Osfield
733c6e9e62 Changed the ReadWriteMutex to use standard OpenThreads::Mutex to fix
crashes in osgcatch.
2007-01-04 21:14:29 +00:00
Robert Osfield
9a31b7652e Added mutex to lock of ReentrantMutex 2007-01-04 20:50:35 +00:00
Robert Osfield
73fffe1800 Made Refernced::setThreadSafeReferenceCounting(bool) a virtual then overrode
this in various scene graph classes to ensure that the scene graph gets
updated as well as the objects that the initialial call is made from.
2007-01-04 16:49:58 +00:00
Robert Osfield
ff195bddf5 Added Object::resizeGLObjectBuffers(uint) method to help improve the ability
to change the number of active graphics contexts on the fly during an applications
life.
2007-01-04 14:11:51 +00:00
Robert Osfield
0ec854a365 Added support for starting and stopping osgViewer::Viewer threading and
automatic handling of windows being closed.
2007-01-04 11:49:15 +00:00
Robert Osfield
23206270e0 Added catch of window close 2007-01-03 23:00:05 +00:00
Robert Osfield
21869a79a9 From Paul Martz, added export to fix Windows build 2007-01-03 19:11:57 +00:00
Robert Osfield
4f87afdbf5 Improved the robustness of thread start and cancellation 2007-01-03 16:06:12 +00:00
Robert Osfield
f14aa7ef66 Added support for different threading models in osgViewer::Viewer 2007-01-02 17:39:31 +00:00
Robert Osfield
d068f7025a Added support for getting all windows and hiding the cursor 2007-01-02 12:50:57 +00:00
Robert Osfield
7155f7d1b0 Various work on osgViewer library, including warp point and graphics window resize support 2007-01-01 18:20:10 +00:00
Robert Osfield
96071fd1b1 Removed osgViewer::GraphicsWindowProxy as its was causing wrapper compile
problems and also no longer has a key role in osgViewer.
2006-12-28 08:16:36 +00:00
Robert Osfield
d7e3ed3fb2 Updated wrappers 2006-12-27 23:19:37 +00:00
Robert Osfield
11fef2d75e Tweaks from using a ReadWriteMutex& to a ReadWriteMutex* parameter to avoid
problems with osgIntrospection generation.
2006-12-27 23:19:17 +00:00
Robert Osfield
30cb8735d3 Added an osgDB::ReadWriteMutex to help manage the ability to have serialize
write to objects but allow multiple threads to read at once in a read only way.
2006-12-27 16:40:34 +00:00
Robert Osfield
791d884b44 Added GraphicsWindowWin32 and GraphicsWindowCocoa classes, curently not implmented,
but added as a placeholder for members of the community to step forward and implement.
2006-12-27 15:04:04 +00:00
Robert Osfield
6a74240d22 Various tweaks to keep in sync with new changes to osg::Timer and osgGA::EventQueue 2006-12-26 17:38:47 +00:00
Robert Osfield
84d22f9999 Added new adapter methods to EventQueue to allow the time value of the
event to be specified.
2006-12-26 17:37:58 +00:00
Robert Osfield
93dbfa04b7 Aded new convinience methods to osg::Timer - s/getStartTick and time_s(), time_m() etc
to help get time reletive the new start tick.
2006-12-26 17:37:06 +00:00
Robert Osfield
39c0c2df76 Unified the osg::GraphicsThread::Operation and osg::GraphicsContext::Operation classes
as osg::GraphicsOperation.  Unpdated parts of OSG depending upon these.

Added a virtaul bool valid() method to osg::GraphicsContext to allow apps to
test whether a valid graphis context has been created or not.
2006-12-24 16:40:19 +00:00
Robert Osfield
76461b3ab2 Added support for sample and sampleBuffers to osg::GraphicsContext::Traits and
cleaned up the Traits naming
2006-12-22 21:53:44 +00:00
Robert Osfield
401f3bcd43 Added mutexes to ParticleProcessor and ParticleSystemUpdater to improve the thread safety of osgParticle 2006-12-22 21:52:53 +00:00
Robert Osfield
bd6b7d581e Implemented perliminary multi-threading support in osgViewer::Viewer 2006-12-22 17:46:21 +00:00
Robert Osfield
4fc9af7ea0 Moved rendering support into GraphisContext, osgViewer::Viewer/View, and
added frame stamp updating and update traversal to osgViewer::Scene/Viewer.

Updated osgcamera example to use new Viewer API calls instead of using local
rendering calls.
2006-12-21 16:56:20 +00:00
Robert Osfield
8f9d2eeb46 Cleaned up the includes in the GraphicsWindowX11 header 2006-12-21 12:24:20 +00:00
Robert Osfield
a56d273fe3 Moved the implementation of GraphicsWindowX11 from the head into the src/osgViewer directory. 2006-12-21 12:19:14 +00:00
Robert Osfield
7772da71eb Improved the handling of moving the mouse pointer across screens, and add
grab focus support that honours where the mouse pointer was originally.
2006-12-21 11:20:42 +00:00
Robert Osfield
2255771b74 Further work osgViewer::Viewer and related classes. 2006-12-20 21:13:29 +00:00
Robert Osfield
d9d3b99c2e From Paul Martz, "minor code comment cleaup/rewording" 2006-12-19 17:16:14 +00:00
Robert Osfield
c9c2950759 Moved UnitTestFramework from core osg lib into osgunittests example 2006-12-19 17:06:59 +00:00
Robert Osfield
61f8827a6d Added Copyright notice 2006-12-19 16:47:15 +00:00
Robert Osfield
e9a7225db1 Added support for traversal mask into ElevationSlice, HeightAboveTerrain and LineOfSight classes 2006-12-19 16:45:09 +00:00
Robert Osfield
dcebe4daa0 Added initial GraphicsWindowX11 implementation, and fleshed out more of the
osgViewer and osg::GraphicsContext/osg::View infrastructure.
2006-12-19 16:00:51 +00:00
Robert Osfield
afc77f9b39 Added support WindowingSystemInterface for querring the number of screens, the screen size and creating GraphicsContexts. 2006-12-17 20:49:01 +00:00
Robert Osfield
982a4db9e2 Added ViewPoint support into NodeVistor/CullStack/CullVisitor/LOD/PagedLOD etc to facilate
management of LOD settings for RTT cameras.
2006-12-15 17:27:18 +00:00
Robert Osfield
81213d47d8 From Andy Skinnder, warning fix 2006-12-14 14:44:10 +00:00
Robert Osfield
3177494aa4 From Bryan Thrall, "Currently, the DatabasePager always loads requested Nodes using the
default Registry Options object, but it would be useful to be able to
request loading with a different Options object. The attached files
allow you to do that (based off the OSG 1.2 source).

For example, I'm implementing a loader that requires context information
when it pages in subgraphs, which becomes significantly complicated when
multiple scenegraphs are requesting subgraph loads with different
contexts (the loader needs to know which context to use, and the
Registry Options needs to be carefully managed so the context settings
don't clobber each other, especially in multithreaded situations). Being
able to pass an Options instance along with the Node request resolves
this problem."
2006-12-05 14:50:46 +00:00
Robert Osfield
afa96fff0e Added more accurate computation of local height above sea level in the plane intersections routines 2006-12-05 12:58:29 +00:00
Robert Osfield
56b7268c72 Added copying of plane to surface intersections in the osgUtil::PlaneIntersector class, and update wrappers. 2006-12-03 11:44:12 +00:00
Robert Osfield
8d85636b50 Fixed typo and updated wrappers 2006-11-30 18:42:38 +00:00
Robert Osfield
ab7d1ecc42 Further work on PlaneIntersector 2006-11-29 14:21:59 +00:00
Robert Osfield
3f0c9caa48 Cleaned up inheritance 2006-11-29 10:51:10 +00:00
Robert Osfield
b6e1924192 Fixed build errors in osgViewer 2006-11-28 20:35:31 +00:00
Robert Osfield
a2e79f6a38 Moved osgUtil::PolytopeIntersector, osgUtil::PlaneIntersector and osgUtil::LineSegmentIntersector out from include/osgUtil/IntersecionVisitor into their own seperate files. 2006-11-28 16:30:38 +00:00
Robert Osfield
345810ef22 Added support for float or double osg::Plane, and the default osg::Plane to double.
Performance tests on big models did not indicate any performance penalty in using doubles over floats,
so the move to doubles should mainly impact precision improvements for whole earth databases.

Also made improvements to osgUtil::PlaneIntersector and osgSim::ElevationSlice classes
2006-11-28 16:00:52 +00:00
Robert Osfield
05bffbe9c4 Added beginnings of osgUtil::PlaneIntersector and osgSim::ElevationSlice 2006-11-27 20:25:36 +00:00
Robert Osfield
fd2ffeb310 Renamed osg::CameraNode to osg::Camera, cleaned up osg::View.
Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
2006-11-27 14:52:07 +00:00
Robert Osfield
b82e521444 From Mauricio Hofmam, added support for reading images from all osg::CameraNode attachments in RenderStage. 2006-11-27 11:25:40 +00:00
Robert Osfield
4ab9c6f5f4 Removed check from objectDeleted(void*) method as this was not catching cases
where the registered ptr was different from the deleted ptr - something that
can happen with multiple inheritance.
2006-11-26 22:27:09 +00:00
Robert Osfield
426fd9eaf7 Missed check of changes to the RemoveRedundentNodesVisitor 2006-11-26 14:17:22 +00:00
Robert Osfield
2a8c48c13c Added isIdentity() method 2006-11-24 21:10:57 +00:00
Robert Osfield
5044a85c9e Improved handling of bounding polytope 2006-11-24 17:20:01 +00:00
Robert Osfield
006435e679 Added support for positional lights into computeShadowVolumeGeometry code and cleaned up OccluderGeometry interface. 2006-11-24 11:37:57 +00:00
Robert Osfield
51744272d5 Improved the ShadowVolumeGeometry orientations. 2006-11-23 21:32:49 +00:00
Robert Osfield
e7ef0ca846 First cut at generating the ShadowVolumeGeometry 2006-11-23 16:55:46 +00:00
Robert Osfield
156cf1e97f Added basic silhoette detection 2006-11-23 11:22:49 +00:00
Robert Osfield
1f3a851cfc From Farshid Lashkari, Added missing initialization of the _scaleByTextureRectangleSize
variable in two of its constructors.
2006-11-22 20:39:44 +00:00
Robert Osfield
0a696dbdc7 Added removeNullTriangles() method to help removed triangles with coincedent corners. 2006-11-22 15:38:59 +00:00
Robert Osfield
8483624646 Added compute and visualization of triangle and vertex normals 2006-11-21 16:59:34 +00:00
Robert Osfield
91a9a87dd4 Added removeDuplicates function 2006-11-21 16:16:56 +00:00
Robert Osfield
b400a2738b Reordered methods to make associated functions clearer. 2006-11-21 16:15:42 +00:00
Robert Osfield
b67de41991 Rearranged the #ifdef's to prevent compile problems under NVidia 2.1 OGL drivers 2006-11-17 20:45:29 +00:00
Robert Osfield
c24289315a Fixed comment 2006-11-15 20:24:09 +00:00
Robert Osfield
d0cc014f1b Further migration to using RenderInfo 2006-11-14 12:51:31 +00:00
Robert Osfield
7cb1bcbd7d From Farshid Lashkari, "This patch adds a CoordOriginMode to the osg::PointSprite attribute.
The mode needs to be changed to LOWER_LEFT when rendering point
sprites to pbuffers or FBOs, otherwise the points will be transformed
on the CPU."
2006-11-14 12:29:54 +00:00
Robert Osfield
c3f3093ecc From John Kelso, add support for default frame time for children of a Sequence node 2006-11-10 15:25:04 +00:00
Robert Osfield
8983544a86 Further work on osgShadow::GeometryOccluder 2006-11-10 15:07:13 +00:00
Robert Osfield
d23c04018b Updated wrappers 2006-11-08 11:49:35 +00:00
Robert Osfield
530e9e08d4 Added better handling of writeNode operations that arn't successful. 2006-11-07 17:00:56 +00:00
Robert Osfield
5ac6ea9a8d Ben van Basten, "1 Bug fix in reuseParticle where originally an old particle that was already killed would be killed again, but instead should have been placed on the dead stack for future reuse.
2 Getter/setter for _maxNumberOfParticlesToSkip that is used for filtering of particles during draw. This enables you to turn the filtering of by setting this value to zero.

3 Getter for retrieval of the first particle in the trail. This allows you to directly manipulate the trail from your application by walking from the start particle towards the end of the trail."

Submitted on Ben's behalf by Roland Smeenk.
2006-11-07 13:48:20 +00:00
Robert Osfield
c9fed221a5 Added initial cut of osgShadow::OccluderGeometry 2006-11-07 13:43:01 +00:00
Robert Osfield
06cca16a2a Added convinience constructors to help support picking with the new osgUtil::Intersector classes. 2006-11-02 17:05:46 +00:00
Robert Osfield
1c91b505dd Fixed bug in Polytope::contains(const std::vector<Vec3>& vertices) which resulted
in false positives.
2006-11-02 15:22:38 +00:00
Robert Osfield
e0f395fd07 Moved SimpleViewer and GraphicsWindow into their own osgViewer library, updated simpleviewer examples to reflect this change 2006-11-02 12:27:15 +00:00
Robert Osfield
f9fb99dc43 Added prelimnary work on PolytopeIntersector. 2006-11-02 12:17:06 +00:00
Robert Osfield
15f7abe100 Improved handling of projected coords in new intersection classes 2006-11-01 17:18:45 +00:00
Robert Osfield
75169ad16f Added support for osgUtil::Intersectors being in WINDOW, PROJECTION, VIEW or MODEL coordinates 2006-11-01 14:41:32 +00:00
Robert Osfield
a253e17d3e Implemented HeightAboveTerrain and added usage into osgintersection 2006-10-31 12:59:51 +00:00
Robert Osfield
e9b501002c Added LineOfSight and HeightAboveTerrain classes 2006-10-31 08:41:24 +00:00
Robert Osfield
16c238fc60 Added osgSim::LineOfSight and osgSim::HeightAboveTerrain classes 2006-10-30 20:29:06 +00:00
Robert Osfield
baeb41a416 From Michael Henheffer, "There's a problem with OverlayNodes where the texture will not display
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."
2006-10-30 12:19:41 +00:00
Robert Osfield
358b96e953 Added osgUtil::IntersectorGroup to handle groups of osgUtil::Intersectors 2006-10-27 15:11:17 +00:00
Robert Osfield
ce3929fd5f Added beginings of new osgUtil::IntersectionVisitor and osgintersection class 2006-10-26 16:03:17 +00:00
Robert Osfield
44a77dda7c Tweaked doxygen docs. 2006-10-24 16:24:24 +00:00
Robert Osfield
85dc696c09 Added FadeText::setFadeSpeed and made internal data structures protected. 2006-10-24 09:06:28 +00:00
Robert Osfield
f3b71fc2ac From David Callu:
"
  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

"
2006-10-17 15:17:06 +00:00
Robert Osfield
f257285efc From Chuck Seberion, added support reading ARB float format textures. 2006-10-14 21:50:29 +00:00
Robert Osfield
660cda57c8 From Terry Welsh, mplemented POINT_ROT_EYE. 2006-10-14 21:47:13 +00:00
Robert Osfield
5163c4a762 First cut at class interfaces and stubs for implementations for the new osgShadow NodeKit 2006-10-06 14:16:11 +00:00
Robert Osfield
f95a913daa Removed osgGA::GUIEventHandlerVisitor and osgGA::SetSceneVistor classes/headers as
this classes weren't being actively used the distribution, effectively being noops.
2006-10-06 09:54:45 +00:00
Robert Osfield
632df7f3ff Added osgGA::GraphicsWindow base class that derives from osg::GraphicsContext but
adds default overrides its pure virtue methods, and an EventQueue.
2006-10-05 10:06:19 +00:00
Robert Osfield
8e3a092a00 Removed the redundent relaseGLObjects() method declerations 2006-10-03 20:42:57 +00:00
Robert Osfield
e0599f652e Added releaseGLObjects to NodeCallbacks, Drawable::DrawCallbacks and wired up
osgProducer to use it when doing cleanup_frame.
2006-10-02 15:38:31 +00:00
Robert Osfield
f97759405a From Farshid Lashkari, "Here is the patch we discussed previously about adding a flag to
CullSettings which allows CameraNode to inherit the clear color."
2006-10-02 14:11:40 +00:00
Robert Osfield
3bfa8a27a8 From Edgar Ellis, "Changed return type of osg::equivalent methods from float/double to bool.
"
2006-10-02 13:11:32 +00:00
Robert Osfield
42dfe67c0c From Farshid Lashkari, "There was a bug in ParticleSystem where the bounds is not properly
flagged as computed when there is only 1 particle. Attached is the
fix."
2006-10-02 11:26:43 +00:00
Robert Osfield
ba7d27c9b2 From Chris Hanson, "These changes break out the implementation of the fill/wireframe/point, texture,
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.
2006-10-01 19:19:31 +00:00
Robert Osfield
2ed98b56c9 Added subclassing from osg::Referenced to allow the SimpleViewer to be safely managed on the heap. 2006-09-30 14:10:15 +00:00
Robert Osfield
5c0eb0b013 Added bare bones osgGA::SimpleViewer class to help simplify OSG setup when embedding the OSG
into existing GUI applications, and for one one a single camera, single window is required.
2006-09-25 16:25:53 +00:00
Robert Osfield
35d134f712 From Farshid Lashkari, added function for querring whether a mode is a texture related mode or not. 2006-09-21 10:01:27 +00:00
Robert Osfield
def74d3471 Introduced new osg::View, and osg::RenderInfo classes into the core OSG to help
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).
2006-09-18 20:54:48 +00:00
Robert Osfield
515225cfb9 Fixed the drawArrays() method checking of _drawArrayPtr 2006-09-12 15:21:41 +00:00
Robert Osfield
5915584b37 Revised the osg::ClampColor API to allow vertex, fragment and read color clamping to
be applied together.
2006-09-12 09:26:42 +00:00
Robert Osfield
292eee4c1e From Mike Weiblen, added missing export to fix osgTerrain wrapper linking under VS 2006-09-07 10:41:38 +00:00
Robert Osfield
9d02b2314f From Mike Weiblen, build fixes for Windows. 2006-09-05 09:51:33 +00:00
Robert Osfield
5c1b0f1bbd Added support for imagery and DEM's that wrap around the dateline, this required
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.
2006-09-04 20:43:07 +00:00
Robert Osfield
625c0173b2 Missing part of Farshid Laskari's submission relating to CameraNode RenderOrder. 2006-09-04 13:35:26 +00:00
Robert Osfield
daa54a3b09 From Farshid Lashkari,
"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."
2006-09-04 13:15:08 +00:00
Robert Osfield
f0277df858 Added osg::TexMat::s/getScaleByTextureRectangleSize feature that allows
one to use the osg::TexMat to automatically scale non dimensional tex coordinats to
the size of the last texture rectangle applied.
2006-09-04 12:46:49 +00:00
Robert Osfield
616097e465 From David Callu,
"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,
2006-09-01 12:52:15 +00:00
Robert Osfield
96e1630cc7 Removed the String inhertiance from osg::Referenced. 2006-09-01 12:46:45 +00:00
Robert Osfield
5d1de02afa Updated Version number for 1.2 release 2006-08-31 20:55:46 +00:00
Robert Osfield
aaba1c6b23 Made the inheritance of osg::Object in the DrawCallback to be virtual. 2006-08-31 10:10:42 +00:00
Robert Osfield
22e94c9aaf Added TexMat(Matrix) constructor. 2006-08-29 06:58:22 +00:00
Robert Osfield
6be6bc2eaa Added TexEnv object into Font and apply this in Text::drawImplementation to make
sure that a valid TexEnv is applied
2006-08-28 19:37:40 +00:00
Robert Osfield
6b186a122f Added support for logging StateSet usage in StatsVisitor. 2006-08-28 19:06:33 +00:00
Robert Osfield
70470bc84a From Roger James, "I have been going through my modified osg files and came across this fix to the Tesselator. From memory it handles a problem with per primitive normal binding. I must have forgotten to submit it." 2006-08-28 19:01:03 +00:00
Robert Osfield
19f3d975dd Futher work on TextureAtlasBuilder/Visitor, now functioning enough to deploy on real models. 2006-08-28 15:46:02 +00:00
Robert Osfield
ee7f3fa375 Further work on TextureAlasBuilder and TextureAtlasVisitor. 2006-08-28 10:46:39 +00:00
Robert Osfield
f86c824275 Further work on new TextureAtlasBuilder. 2006-08-25 16:30:23 +00:00
Robert Osfield
1f8c4874f6 Checking in first cut of new osgUtil::Optimizer::TextureAtlasBuilder class
for building texture atlas for sets of images or textures.
2006-08-25 15:53:16 +00:00
Robert Osfield
179f6100a0 Added missing setDataType and setPacking functions 2006-08-25 15:49:29 +00:00
Robert Osfield
ff61a20315 Added const version of getReadPBuffer() 2006-08-25 14:54:54 +00:00
Robert Osfield
f5d9443b78 Fixed const correctness of get shadow functions 2006-08-25 14:53:09 +00:00
Robert Osfield
0900857333 From Farshid Lashkari,
"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."
2006-08-25 08:48:16 +00:00
Robert Osfield
62edacece5 From David Guthrie, "I know there are 50,000 changes to osg/Math for OSX a day, but I
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."
2006-08-24 20:16:25 +00:00
Robert Osfield
49e7607fa0 Simplified swap bytes code to make it more efficient. 2006-08-24 20:15:32 +00:00
Robert Osfield
a33955a56b From Daniel Larimer, fix for OSX 10.4 when gcc != 4 2006-08-23 14:17:06 +00:00
Robert Osfield
98cdf9b3c7 From Eric Wing, fix for compute of the bounding box when handling outline/backdrop text. 2006-08-22 10:23:58 +00:00
Robert Osfield
6f23173c05 Added comments on the meaning of button value 2006-08-21 20:29:32 +00:00
Robert Osfield
be60b32add Fixed texture optimization problem associated with mixing already compiled scene graphs - resulting
in incorrect texture assignment.  Solution was to a compareTextureObjects() test to the Texture*::compare(..) method that
the osgUtil::Optimizer::StateSetVisitor uses to determine uniqueness.
2006-08-14 19:42:22 +00:00
Robert Osfield
0220448af3 Fixed value of FLATTEN_BILLBOARDS enum. 2006-08-11 16:03:04 +00:00
Robert Osfield
14f924c2af From Daniel Larimer, "Apple updated their developer tools again and broke the __isnanf and
__isnand methods... replacing them with a call to isnan(v) seems to
work on both Xcode 2.3 and 2.4"
2006-08-10 08:45:42 +00:00
Robert Osfield
91e9679362 Addd a setNodeMaskOverride(0xffffffff) to cope with models that are hiding
subgraphs that still need to be accounted for when optimizer.
2006-08-10 06:43:09 +00:00
Robert Osfield
3730d7266d Removed referecens to the deprecate UByte4 2006-08-09 13:02:52 +00:00
Robert Osfield
2616174b06 Added support for --affinity command line option for switch on procesor affinity where supported, 2006-08-08 11:27:36 +00:00
Robert Osfield
174e3b3dc3 Fixed RenderToTexture bug which occured when the viewport dimensions where
different than the texture being written to.
2006-08-03 15:57:39 +00:00
Robert Osfield
9e7b07fbcf Reworked the state management within osgText::Text and osgText::Font so that it
only applies textures locally rather than whole StateSet.
2006-08-02 21:05:56 +00:00
Robert Osfield
0336231321 Moved extension function pointer initilization into a method, and the pointers from
being static to be local member variables.  This should avoid issues under Windows
with multiple graphics contexts have seperate entry points.
2006-08-02 16:14:17 +00:00
Robert Osfield
553d017fd9 From Daniel Trstenjak, build fixes for Hpux 11.11, Irix 6.5, Solaris 8 and Aix 2006-08-02 10:43:26 +00:00
Robert Osfield
5c4446dd5e From Jason Beverage,
"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."
2006-07-31 20:56:22 +00:00
Robert Osfield
564ee34f76 Added Matrix*::getRotate()/setRotate(Quat), deprecating Matrix*::get(Quat&), Matrix*::set(Quat&) 2006-07-31 17:31:21 +00:00
Robert Osfield
28cf404a25 Tweaked the invert() method to avoid silly OSX warnings. 2006-07-31 14:49:36 +00:00
Robert Osfield
b1994cc60d Fixed multi-threaded/multi-pipe crash when primitive stats where output in osgProducer::Viewer's stats. 2006-07-29 16:47:28 +00:00
Robert Osfield
f977d7c606 Updated osgunittests with a matrix invert unit test, and added a conditional
calling of invert_4x4 or invert_4x3 depending on the the right hand column of the matrix.

Updated wrappers
2006-07-28 13:48:08 +00:00
Robert Osfield
c0c5e73ff9 From Michael Polak, double click fixes/additions 2006-07-27 12:32:40 +00:00
Robert Osfield
d9b6d87d5a Cleaned up per context buffers support 2006-07-26 15:29:26 +00:00
Don BURNS
f6efd393b5 Fixed HEIGHEST misspelling to HIGHEST 2006-07-19 17:39:45 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
6b2d32baae From Farshid Lashakari, fixed popStateSet. 2006-07-18 13:05:26 +00:00
Robert Osfield
419e185895 From Eric Wing, add alternate backdrop implementations.
From Robert Osfield, updated naming  and copy constructor methods.
2006-07-18 12:24:04 +00:00
Robert Osfield
a74801a0ee Added Optimizer::FlattenBillboardsVisitor. 2006-07-18 11:03:46 +00:00
Robert Osfield
2ef59b73e9 Change Unit to Units to keep consistent with OpenGL naming. 2006-07-17 11:43:26 +00:00
Robert Osfield
4bae225d39 Added s/getFactorMultiplier(), s/getUnitMultiplier(), areUnitAndMultipliersSet() and
setFactorAndUnitMultipliersUsingBestGuessForDriver() static methods to
osg::PolygonOffset to help implement workarounds for lack of portablity of
settings between different hardware.
2006-07-14 14:08:33 +00:00
Robert Osfield
ff00f888db Fixed popStateSet 2006-07-14 11:34:13 +00:00
Robert Osfield
dd32e6425e Added StatsVisitor to include/osg/Statistics, and usage of it in osgUtil::Optimizer.
Added --optimize <string> option to osgconv
2006-07-13 15:25:22 +00:00
Robert Osfield
93b13c0854 Fixed Statistics::reset() method to include a reset of all member variables 2006-07-13 11:46:55 +00:00
Robert Osfield
519157aeab From Vincent Vivanloc, Removed commas from end of enum lists, and removed semi-colon
from end of namespace.
2006-07-12 09:50:45 +00:00
Robert Osfield
dd6a33da49 Removed StateSet::ENCLOSE_RENDERBIN_DETAILS since it is rendendent, and
implemented the OVERRIDE_RENDERBIN_DETAILS.
2006-07-11 21:53:57 +00:00
Robert Osfield
165351196e From Brede Johansen, "Here's a small patch to BlendFunc::setFunction(source,destination) to
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."
2006-07-11 14:24:18 +00:00
Robert Osfield
ad18b88848 From Antoine Hue,
"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."
2006-07-11 10:34:41 +00:00
Robert Osfield
865ee4429c From Eric Sokolowsky,
"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."
2006-07-06 14:02:14 +00:00
Robert Osfield
88609a5eee Updated version numbers for 1.1 release 2006-07-06 10:28:12 +00:00
Robert Osfield
ce4b3a7b9e Changed parameter name from osberver_ptr to observer. 2006-07-04 19:58:53 +00:00
Robert Osfield
00fbfd4835 Updated wrappers. 2006-07-04 14:37:56 +00:00
Robert Osfield
e7d9e91525 From Stephan Huber,
"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."
2006-07-04 14:18:44 +00:00
Robert Osfield
3ad5140942 Change osgText so that the Text drawable now can have its own StateSet
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.
2006-07-04 13:56:29 +00:00
Robert Osfield
f1e7b6d5cb From Roland Smeenk, Added missing initialization to zero of the _carryOver value in
default and copy constructor.
2006-07-04 09:18:04 +00:00
Robert Osfield
7a42716036 Removed template methods that were break VS6.0 build. 2006-07-03 15:21:08 +00:00
Robert Osfield
f181228d4a From Michael Platings, added support for glBlendFuncSeperate. 2006-06-30 13:50:02 +00:00
Robert Osfield
6a2387373c From Eric Sokolowsky, made a couple of methods static. 2006-06-30 13:47:12 +00:00
Robert Osfield
30265ac0b3 Added support for RenderBin's have a local top level StateSet. This is now
used by default in the depth sorted bin.
2006-06-29 15:57:24 +00:00
Robert Osfield
710adfd698 From Eric Wing, added support for outline/shadow and colour gradient effects. 2006-06-27 13:09:00 +00:00
Robert Osfield
240fc9ebee Replaced ref_ptr<>:take with ref_ptr<>:release, and added handling of removeal
of ref_ptr<> operator >.
2006-06-26 20:45:51 +00:00
Robert Osfield
3e177ca727 From Tyge Løvset, ref_ptr<> template constructor, operators and associated functions.
From Robert Osfield, tweaks and fixes to the above, also removed the deprecated take() method.
2006-06-26 20:41:33 +00:00
Robert Osfield
f8644d08e5 From Leandro Motta Barros, documentation additions to PrimitiveSet & TriangleFunctor. 2006-06-26 09:56:52 +00:00
Robert Osfield
46ad44a9e7 Fixed typo. 2006-06-16 09:28:35 +00:00
Robert Osfield
4ab7be2833 Martin Spindler, new osg::ClampColor state attribute. 2006-06-08 15:27:18 +00:00
Robert Osfield
2e2684c05a From Paul Martz, added support to textured light points into osgSim and OpenFlight loader, as part of the OpenFlight v16.0 spec. 2006-06-08 14:32:02 +00:00
Robert Osfield
7d3ddc0e1b From Paul Martz, clean up of comments. 2006-06-08 12:09:51 +00:00
Robert Osfield
78742d6698 From Gustavo Wagner, addition of trim method to TemplateArray class.
From Robert Osfield, made trim method a virtual method of the base Array class
and added a trim implementation to TemplateIndexArray.
2006-06-08 11:58:56 +00:00
Robert Osfield
e1c77dfe2a Minor tweaks of ints to unsigned ints 2006-05-16 21:20:36 +00:00
Robert Osfield
690aeea7e4 From Mike Weiblen, futher work on Uniform array support. 2006-05-16 21:00:45 +00:00
Robert Osfield
bf065ed3a4 From Mike Weiblen, support GLSL uniform arrays. A couple of tweaks and fixes from Robert Osfield. 2006-05-15 15:46:08 +00:00
Robert Osfield
2e0865d0c9 From Jason Baverage, A
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.
2006-05-15 13:12:55 +00:00
Robert Osfield
4431b381d3 From Eric Wing, removed trailing commans from enum lists. 2006-05-15 11:56:59 +00:00
Robert Osfield
587adca056 From Eric Wing, compile fix for OSX. 2006-05-15 11:53:21 +00:00
Robert Osfield
1dcb923c15 From Daniel Trastenjak, added checking of binding modes to ensure that changes are only applied
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.
2006-05-15 11:48:05 +00:00
Robert Osfield
83722dc064 From Tree, build fixes for JavaOSG build. 2006-05-09 09:42:17 +00:00
Robert Osfield
bd895f94d4 From Farshid Lashari, round funciton. 2006-05-09 09:35:12 +00:00