Commit Graph

4684 Commits

Author SHA1 Message Date
Robert Osfield
ee470f2445 From Mathias Froehlich, "This patch removes the X11/Xmu/WinUtil.h header from GraphicsWindowX11.cpp.
That one is not used and appears not to be present on every platform we
compile on."
2007-07-13 11:42:02 +00:00
Robert Osfield
b1f943cef8 From Mathias Froehlich, "This change makes the net plugin compile on hp-ux.
It tries to unify some partly ugly ifdefs in the socket classes.
The change is also tested on a solaris 8, irix 6.5 and suse 9.0 machine."
2007-07-13 11:39:40 +00:00
Robert Osfield
14ab33cc29 Updated wrappers 2007-07-13 11:22:44 +00:00
Robert Osfield
b2535d55c6 Introduced new GUIEventAdatper singleton for sharing the current state between
multiple GraphicsWindows, this singleton is accessable via GUIEventEvent::getAccumulatedEventState().

Added use of this new singleton in GraphicsWindow* implementations.

Added WindowSizeHandler to osgkeyboard to help with debugging of event state
between windows.
2007-07-13 11:17:41 +00:00
Robert Osfield
03749d5e34 Removed redundent TerrainGeometry classes, and adding double buffer of
internal data within GeometryTechinque in prep for support multi-threaded
set up and rendering of terrain.
2007-07-12 20:12:38 +00:00
Robert Osfield
ecf0b58a19 Renamed include/osg/OperationsThread to OperationThread.
Created a new GraphicsThread subclass from OperationThread which allows the
GraphicsContext specific calls to be moved out of the base OperationThread class.

Updated the rest of the OSG to respect these changes.
2007-07-12 15:54:45 +00:00
Robert Osfield
4d7e8b12ae Renamed OperationsThread to OperationThread and add two way link between OperationQueue and OperationThread 2007-07-12 12:15:42 +00:00
Robert Osfield
35435c3146 Updated wrappers 2007-07-11 16:06:24 +00:00
Robert Osfield
095da72020 Fixed typo 2007-07-11 16:06:04 +00:00
Robert Osfield
691a49d0fa From Paul Melis, fixes to spelling mistakes/typos. 2007-07-11 15:51:17 +00:00
Robert Osfield
bdc8a72aae From Andre Garneau, minor warning fixes 2007-07-11 15:30:14 +00:00
Robert Osfield
b93539ee09 Added setting of the Scene's FrameStamp on each CompositeViewer::updateTraversal() call to fix animation path issue. 2007-07-11 13:48:41 +00:00
Robert Osfield
0d38a66bbb Added OperationsThread 2007-07-10 19:29:11 +00:00
Robert Osfield
6a9551ebfb Wired up OperationsThread to use the new OperationQueue and thereby support
thread pooling where multiple OperationsThreads share a single OperationsQueue
2007-07-10 17:36:01 +00:00
Robert Osfield
44c07b9fad Separated OperationsThread out from the GraphicsThread header and introduced
new OperationQueue class.
2007-07-09 19:04:36 +00:00
Robert Osfield
4d04f3f645 Fixed unitialized variables. 2007-07-09 15:02:03 +00:00
Robert Osfield
c407866f30 Added OpertionQueue 2007-07-09 11:05:04 +00:00
Robert Osfield
e8f8c0c147 Updated wrappers 2007-07-09 10:48:32 +00:00
Robert Osfield
f70b6d0993 Improved the consistency of setting of rotation and auto rotate modes in setAxisAlingment method 2007-07-09 10:47:06 +00:00
Robert Osfield
a4499b482b Fixed missinged intialization of the _threadsRunning variable. 2007-07-09 10:12:37 +00:00
Robert Osfield
7099068914 From Jean-Sebastien Guay and Jan Ciger, added search path can improved handling of backslashes/forward slashes 2007-07-07 16:05:05 +00:00
Robert Osfield
4c379a2848 Updared wrappers 2007-07-06 20:00:11 +00:00
Robert Osfield
50ec07b734 Added include of DeleteHandler 2007-07-06 16:54:45 +00:00
Robert Osfield
2b84aa7760 Added dirty count support to osgTerrain::Layer clases.
Added LayerHandler to osgterrain example that modifies the layers in 
response to pressing the 's' and 'q' keys
2007-07-06 16:47:08 +00:00
Robert Osfield
c4c165099c From Jea-Sebastien Guay and Robert Osfield, build fixes for Windows 2007-07-06 14:07:59 +00:00
Robert Osfield
9e2fe92ef1 From Rudolf Wiedemann, "I need to link OpenSceneGraph statically to my application, so I
completed the new registration of the plugin-readerwriters
("REGISTER_OSGPLUGIN") according to your osgstaticviewer-example (see
attachment, based on today's svn)."
2007-07-06 13:54:26 +00:00
Robert Osfield
a7de33ee55 From Brede Johansen, "Attached is a fix that returns a default color (white) if an invalid
index to the color palette is used."
2007-07-06 13:33:40 +00:00
Robert Osfield
6931ae4878 Added include/osg/GLObjects + .cpp which provide osg::flush*DeletedGLObjects() methods.
Added and cleaned up DeleteHandler calls in osgViewer to help avoid crashes on exit.

Changed DatabasePager across to dynamically checcking osg::getCompileContext(..)

Updated wrappers.
2007-07-06 13:08:51 +00:00
Robert Osfield
a484b95d3c Added #include<algorithm> 2007-07-06 09:06:37 +00:00
Robert Osfield
dedc99f036 Updated wrappers. 2007-07-05 18:41:54 +00:00
Robert Osfield
d1fa520349 Added support for managing a CompileContext. Rearranged the DeleteHandler::flushAll call. 2007-07-05 18:33:20 +00:00
Robert Osfield
5aa3db15a3 Improved the computation of the side vector 2007-07-05 18:30:57 +00:00
Robert Osfield
601217025f Improved the mapping of update and cull traversal 2007-07-05 18:30:20 +00:00
Robert Osfield
0434d29ad4 From Adndre Garneau, "Attached is a fix to prevent a cursor being shown in graphics windows when
traits specify that none should be used (a recent change forced a
left-pointer cursor as the default). "
2007-07-05 10:57:34 +00:00
Robert Osfield
70bbb06dd5 Commented out "fix" that explictly sets the key modifier state as this change
actually broke the key modifier state management.
2007-07-05 10:51:47 +00:00
Robert Osfield
7f0b3144ea Added checking of GUIEventAdpter::getHandled(). 2007-07-03 13:26:48 +00:00
Robert Osfield
e7d7c1dcc2 Changed the way that computeNearFar is computed to avoid inconsistencies when in stereo mode 2007-07-02 13:17:47 +00:00
Robert Osfield
1522002b47 Updated wrappers 2007-07-02 13:16:54 +00:00
Robert Osfield
e5a6b1a834 From Csaba Halasz, support reading "monochrome" option string and use of monocrhome FreetType support 2007-07-02 12:43:23 +00:00
Robert Osfield
19d1a563fe From Csaba Halasz and Robert Osfield, support for passing in ReaderWriter::Options object into readFontFile 2007-07-02 12:30:14 +00:00
Robert Osfield
c7a316e445 From Mike Connell, "This is a tiny fix for win32.
The current code takes the mouse cursor position and adds it to the
window (left,top) position, and sends the mouse cursor there. But this
doesn't take into account the window decoration.

The new code converts the given (x,y) coordinates from the client area
coordinate system to the screen instead using ClientToScreen. I think
this is the natural windows way to do it.

Tested on XP with osgviewer
"

Note from Robet Osfield, made a few changes to layout to make it more consistent 
with the rest of the OSG and used #if 0 instead if (0) blocks.
2007-06-30 16:19:56 +00:00
Robert Osfield
efda16ac56 From Stephan Huber, "attached you'll find a small fix for the 3ds-plugin, so 3ds-files
exported from cinema 4d are imported correctly. It's not cinema's fault,
because the 3ds-files show up correctly in 3dStudio Max."
2007-06-30 15:40:23 +00:00
Robert Osfield
3873f50214 Updated wrappers 2007-06-30 14:30:55 +00:00
Robert Osfield
bb94377f20 Added balancing of stack size on entry/exit from rendering nested camera. 2007-06-30 14:30:12 +00:00
Robert Osfield
c80313ccd0 From David Callu,
"
Found in the join file the fix for the bug found by Rafa.


    Problem :

        osgIntrospection::Value grp(new osg::Group);

        osgIntrospection::ValueList vlcall;
        vlcall.push_back(osgIntrospection::Value("toto"));

       const osgIntrospection::MethodInfo *m =
grp->getType.getCompatibleMethod("setName", vlcall, true);

       if (m)
       {
            m->invoke(grp, vlcall);      // ** SEGFAULT here
       }





    Algorithm explanation :

          The "invoke" method try to convert "grp", which reflect an
"osg::Group*", in a
          "osgIntrospection::Value", which reflect a "osg::Node*".
This because
          the "setName(const char *)" method found by
"grp->getType.getCompatibleMethod"
          is an "osg::Object" type method.

          When osgIntrospection do this conversion it try :
             - to found a "osgIntrospection::Converter"  to convert
               from "osg::Group*" to "osg::Node*"
             - to found a chain of "osgIntrospection::Converter" to convert
               from "osg::Group*" to "one or many type" to "osg::Node*"
             - to converte an Enum to int or unsigned int
             - to convert the value in its "value string representation",
               then converte this string in the destination value

          Else it throw a "TypeConversionException".







     Bug :

          1)
          When osgIntrospection try to found a chain of
"osgIntrospection::Converter"
          It could do any downcast or (Type to SuperType) or upcast
(SuperType to Type).
          This mean the the chain could be :
          osg::Group to osg::Transform to osg::Camera to
          osg::CullSettings to osg::CullStack to
osg::CollectOccludersVisitor to
          osg::NodeVisitor to osg::Referenced to osg::Object

         During the convertion with this chain, A METTRE failed and
the pointer in
         "grp" is set NULL. But the "grp" is always a valid
"osgIntrospection::Value"
         and so, osgIntrospection accept the conversion. Then it try
to use this pointer
         to call the "setName" function. And Bing SEGFAULT.


         2)
             In "bool Reflection::accum_conv_path( ... )"
             the convection path isn't accumulate in the recursive loop.
             this cause multi request of a conversion path, and a
slowdown in the
             conversion algorithm.

         3)
             Use of the last conversion way in a conversion from
pointer to pointer
             this mean you can do this :
             "osg::Node*" to " value string representation" to "osg::Material*"
             What a bad thing !!!




    Solution :

         1)
          Introduce the concept of dynamic_cast and static_cast.
          now, to do a conversion, osgIntrospection does this :

             - to found a "osgIntrospection::Converter"  to convert
               from "osg::Group*" to "osg::Node*"
             - to found a chain of "osgIntrospection::Converter" to convert
               from "osg::Group*" to "one or many type" to "osg::Node*"
               only with static_cast, downcast (Type to SuperType)

             - to found, if the source and the destination are two pointer,
               a chain of "osgIntrospection::Converter" to convert
               from "osg::Group*" to "one or many type" to "osg::Node*"
               only with dynamic_cast, upcast (SuperType to Type)

             - to convert an Enum to int or to unsigned int
             - to convert the value in its "value string representation",
               then convert this string in the destination value

          Else it throw a "TypeConversionException".


          Add the "enum CastType" to distinguish the static_cast or
dynamic_cast converter.
          Add file OpenSceneGraph/include/osgIntrospection/CastType

         2)
         add a line to accumulate converter in converter Path.

         3)
         add a line to check if source and destination are pointer.
"
2007-06-30 14:21:34 +00:00
Robert Osfield
79dddef778 From Sherman Wilcox, added check for Drawable cull callbck into apply(Billboard) 2007-06-30 09:27:11 +00:00
Robert Osfield
847a7c1644 Added Point::Extension::isPointSpriteCoordOriginSupported() method 2007-06-29 17:01:37 +00:00
Robert Osfield
74af1b8351 From Paul Martz, "Attached is src/osg/CMakeLists.txt. Adding TemplatePrimitiveFunctor to the source code list for the project. This makes this header file show up in the VS IDE as part of this project, and therefore facilitates IDE searching of project-related files, as well as making other tasks easier." 2007-06-29 16:10:24 +00:00
Robert Osfield
ddc26afa16 Fixed indenting to use 4 spaces instead of tabs 2007-06-29 16:09:12 +00:00
Robert Osfield
87788c2360 From Jan Ciger, "I am attaching a fix for the COLLADA plugin on non-windows systems. The
COLLADA modules STLDatabase, LIBXMLPlugin and stdErrPlugin are
statically included in the main COLLADA library on Linux and shouldn't
be linked separately - those libraries do not exist in the default Linux
build and the compilation will fail.

Second issue - the current version of the COLLADA plugin (both current
HEAD in Subversion and the one in stable 2.0) do not work right with the
stable COLLADA DOM 1.4.1. I am getting the following error:
"
2007-06-29 16:06:52 +00:00
Robert Osfield
0ee2466f23 From Roger James, bug fix to counting of number geode with drawables 2007-06-29 16:00:53 +00:00
Robert Osfield
7d2efa886d From Brad Colbert, get/setVolume methods 2007-06-28 20:56:56 +00:00
Robert Osfield
15ff70d298 From Brad Colbert with ammendments by Robert Osfield, add set/getVolume support 2007-06-28 14:19:30 +00:00
Robert Osfield
4953e23ab5 From Trajce Nikolov, fixes to pbuffer setup 2007-06-28 12:59:04 +00:00
Robert Osfield
7a0442a388 From Nikolaus Hanekamp, added support for osg::Multisample 2007-06-28 09:51:47 +00:00
Robert Osfield
49c15572a9 From Stephan Huber, "attached you'll find a first implementation of pbuffer-support for os x.
I used osgprerender --pbuffer to test the carbon-implementation, for now
it works :)
"
2007-06-27 20:44:12 +00:00
Robert Osfield
eac3dc1963 From Paul Melis, "Here is a list of fixes to misspelled APIs. Unfortunately, more than one
of these are public APIs and therefore will break linkage to existing
shared libraries."

Note from Robert Osfield, updated wrappers.
2007-06-27 20:36:16 +00:00
Robert Osfield
64b8e3062f Added temporary reset of the RenderLeaf pointer for any internal calls to other graphics contexts. 2007-06-27 20:34:29 +00:00
Robert Osfield
14470e12c4 From Andy Skinner, fixed return value. 2007-06-27 17:01:54 +00:00
Robert Osfield
60a0e13b2a Updated wrappers 2007-06-27 11:14:40 +00:00
Robert Osfield
97ff495a9c From Rajce Nickolov, improvements to PixelBufferWin32 and GraphicsWindowWin32 2007-06-27 10:37:30 +00:00
Robert Osfield
c0a8c9dd53 Added texture format into Traits. 2007-06-27 10:12:10 +00:00
Robert Osfield
8fea401d79 Fixed target setting bug in PixelBuffer RTT set up. 2007-06-27 09:44:35 +00:00
Robert Osfield
746d916fce Reverted to using non silhouette computation. 2007-06-26 11:31:39 +00:00
Robert Osfield
1a78eb8159 Changed the RTT Camera so that it doesn't automatically recompute the near and far planes 2007-06-25 13:48:57 +00:00
Robert Osfield
350b25c49b From Trajce Nickolov, improvements to PixelBufferWin32. 2007-06-25 11:32:19 +00:00
Robert Osfield
c4b3e32436 Updated wrappers 2007-06-24 10:55:43 +00:00
Robert Osfield
1e506da145 From Trajce Nikolov, PixelBufferWin32 implementation 2007-06-24 10:18:54 +00:00
Robert Osfield
b9947a8189 Simplified decoration code and added support for reading Traits::supportsResize 2007-06-23 21:55:35 +00:00
Robert Osfield
581b1c322e Added setting of the Camera's projection matrix to fit the windowing aspect ratio. 2007-06-23 11:21:54 +00:00
Robert Osfield
1b3468413d Added ability to compile OpenGL objects via pbuffers in the DatabasePager/Viewer 2007-06-22 14:48:18 +00:00
Robert Osfield
e8a65e4cff From Trajce Nikolov, windows build fixes 2007-06-21 11:20:54 +00:00
Robert Osfield
4677fe20a7 Added dummy init method 2007-06-20 12:34:37 +00:00
Robert Osfield
1de128de27 Added placeholder for PixelBufferWin32 2007-06-20 12:29:19 +00:00
Robert Osfield
9f72c9392e Added code of support for contouring shaders 2007-06-20 12:00:29 +00:00
Robert Osfield
fadc115066 Updated wrappers 2007-06-20 11:59:53 +00:00
Robert Osfield
78b6ada743 Completed implementation of PixelBufferX11. 2007-06-20 11:59:27 +00:00
Robert Osfield
ac69f49b55 Added beginnings of osgViewer::PixelBufferX11 2007-06-19 17:12:05 +00:00
Robert Osfield
d4309ce69a Added use of GLSL filters 2007-06-18 12:10:46 +00:00
Robert Osfield
cff9188caf Fixed namespace 2007-06-15 16:08:33 +00:00
Robert Osfield
bd6a001dcc Added default values for ambientBias 2007-06-15 14:57:17 +00:00
Robert Osfield
c9513f2ec6 Removed now redundent file 2007-06-15 14:02:55 +00:00
Robert Osfield
f423c7660f Fixed handling of cases when no matrix is attached to intersections 2007-06-15 13:12:46 +00:00
Robert Osfield
08d3b13430 Added ShadowMap::s/getAmbientBias, updated NEWS and wrappers 2007-06-15 12:59:22 +00:00
Robert Osfield
314a22d553 Changed the version format. 2007-06-15 12:41:46 +00:00
Robert Osfield
4979a0ac41 Added handling of when mouse delta is too high, indicating a inconsitency in the
the events.  These changes prevent irratic high speed spinning when releasing the
mouse point in a different screen from when the mouse event started.
2007-06-15 10:12:57 +00:00
Robert Osfield
10235ad0b4 Fixed null pointer derefence bug 2007-06-15 09:29:23 +00:00
Robert Osfield
9c3ae6f3c2 Addded missing namespace 2007-06-15 08:36:35 +00:00
Robert Osfield
f61c6262f7 Included shaders directly into source, added support for toggle lighting on/off 2007-06-14 20:58:43 +00:00
Robert Osfield
97b53024d4 Fixed typo 2007-06-14 19:17:31 +00:00
Robert Osfield
60af7de2d3 Updated wrapers, changelog, README and AUTHORS files for 1.9.9 release 2007-06-13 21:15:04 +00:00
Robert Osfield
56a24486cd Updated wrappers and Version numbers for 1.9.9 release 2007-06-13 21:00:28 +00:00
Robert Osfield
a9287fe824 Added ability to set the keyboard bindings in the RecordaAnimationPathHandler 2007-06-13 20:52:07 +00:00
Robert Osfield
21033536a7 From Jeremy Moles & Robert Osfield, Added support for playback of animation paths using 'Z' key 2007-06-13 20:34:16 +00:00
Robert Osfield
8c727acddc Added new shader support 2007-06-13 19:53:48 +00:00
Robert Osfield
aab2ed9094 From John Shue, fixed typo in CMakeLists.txt 2007-06-13 19:44:56 +00:00
Robert Osfield
b8f9364cef Wired up new shaders 2007-06-13 14:05:21 +00:00
Robert Osfield
d2c16c2fa0 Added better handling of 0,0,0 values 2007-06-13 13:41:23 +00:00
Robert Osfield
29be5312a0 Added OSG_SCREEN and OSG_WINDOW env var checking in the Viewer::realize() 2007-06-13 11:09:31 +00:00
Robert Osfield
6f95508df8 Updated wrappers 2007-06-13 10:45:36 +00:00
Robert Osfield
a9a55de053 Added osgViewer::View::setUpViewInWindow(...) method and command line option into
osgViewer::Viewer to allow you to specify the window dimentions and screen for
the window on startup.
2007-06-13 10:38:40 +00:00
Robert Osfield
1625360b63 Fixed versioning 2007-06-13 10:12:55 +00:00
Robert Osfield
7016db5f26 Removed ParallelSplitShadowMap as its currently a non op. 2007-06-13 09:56:12 +00:00
Robert Osfield
3c4730bdce Updated wrappers 2007-06-12 19:46:56 +00:00
Robert Osfield
a7a0e2c4d3 Added Image::g/setOrigin to help movie plugins tell applications that the imagery
is not the usual OpenGL BOTTOM_LEFT orientation, but with the origin TOP_LEFT.  This
allows geometry setup code to flip the t tex coord to render the movie the correct way up.
2007-06-12 16:55:44 +00:00
Robert Osfield
2658819e66 UPdated wrappers 2007-06-12 15:52:13 +00:00
Robert Osfield
64c8e7c2bc From Stephan Huber, "while porting my own code to the new osgViewer I discover more and more
bugs in the Carbon-implementation of GraphicsWindow, so here's another
fix for setWindowDecorationImplementation, now updates the
titlebar-height, and fixes some display-issues when switching the
decoration on/off.
"
2007-06-12 15:38:09 +00:00
Robert Osfield
ab347eb34c Changed _data to _movieData to avoid possible confusion 2007-06-12 14:43:26 +00:00
Robert Osfield
aa970f2a30 Changed the throw dection time to 0.02 2007-06-12 09:55:40 +00:00
Robert Osfield
3eb4c3baa6 Work in progress on perspective view dependant codes 2007-06-12 08:30:41 +00:00
Robert Osfield
c7f5d96caf From Stephan Huber, "the computation of the windowtitlebar-height was wrong, attached you'll
find a fixed version for GraphicsWindowCarbon.cpp
"
2007-06-12 08:28:41 +00:00
Robert Osfield
d8a3d7aa4e Updated wrappers 2007-06-10 20:12:47 +00:00
Robert Osfield
08a793eb87 From Stephan Huber and Robert Osfield,
Stephan: "attached you'll find some modifications to the GraphicsWindow-class and
their platform-dependant implementations.

The problem:
setWindowRectangle and setWindowDecoration do not update the
traits-object, so, if you call setWindowRectangle on a
not-realized-window it will open with another size when realized later.
getWindowRectangle reports possible wrong sizes if setWindowRectangle
called before.

My solution:
split the implementation in two parts:
GraphicsWindow::setWindowRectangle will update its traits-object and
call afterwards the virtual method setWindowRectangleImplementation
(which is implemented by the derived platformspecific classess). For
setWindowDecoration I am useing a similar mechanism.

I hope you'll find the submission useful, the Win32 and X11 changes are
not tested but should work."

Changes to this made by Robert are call of resized in setWindowRectangle 
instead of setting of Traits, and use of a bool return type.
2007-06-10 19:53:18 +00:00
Robert Osfield
43790b07b3 From Vladimir Shabanov, "osg::Image::isImageTranslucent() now handles
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV and
GL_HALF_FLOAT_NV pixel formats."
2007-06-10 19:22:13 +00:00
Robert Osfield
3d918ef35f From Vladimir Shabanov, "DDS plugin now works with these formats:
R3G3B2, R5G6B5, A1R5G5B5, X1R5G5B5, A4R4G4B4, X4R4G4B4, R8G8B8 (now
without swaping of red and blue), A8R8G8B8 (also w/o swapping),
X8R8G8B8, A8B8G8R8, X8B8G8R8, A2R10G10B10, A2B10G10R10, L4A4 (not work
on my machine), L16A16, L16, A16B16G16R16, A16B16G16R16F,
Q16W16V16U16, R32F, R16F and A32B32G32R32F.

And these ones are correctly detected, but prints "unsupported" using
osg::notify(osg::WARN) and are not loaded:
A8R3G3B2, G16R16, G16R16F, G32R32F and CxV8U8.

Also added checking of not supported DDPF_BUMPDUDV (V8U8, V16U16,
Q8W8U8L8, A2W10U10V10 etc.) and DDPF_BUMPLUMINANCE (L6V5U5, X8L8V8U8,
etc.) pixel formats.

Mipmap handling is slightly modified and now support all additional formats.
"
2007-06-10 19:18:27 +00:00
Robert Osfield
b48ed1a4d4 Improved the set up of static build, added freetype plugin to plugins that support static usage 2007-06-10 09:51:29 +00:00
Robert Osfield
2532b5f06e Improved the detection of throwing of the mouse. 2007-06-09 17:58:37 +00:00
Robert Osfield
43ba59f7ec Updated wrappers 2007-06-09 10:18:28 +00:00
Robert Osfield
90ae3f385b Added DisplaySettings to osg::Camera, and support into osg::View for initializing
the Camera to the DisplaySettings ScreenWidth/Height/Distance.  Added support
for dual screen horizontal split stereo.
2007-06-09 10:06:38 +00:00
Robert Osfield
e3d7e6e173 Added debug code path that prints out font details. 2007-06-08 20:11:50 +00:00
Robert Osfield
3e8be9ac7d From Stephan Huber, "attached you'll find a new GraphicsWindowCarbon-header and .cpp, the
changes I made:

+ put a warning in the console if a nonexistant screen is requested
+ add getters for the aglcontext and pixelformat -- I need access to
them in my own code.
"
2007-06-08 11:04:30 +00:00
Robert Osfield
b4cd96ebdd From Jason Daly, "We have a few OpenFlight files that used to display properly with the
old loader, but appear very, very wrong with the new one.  I traced the
problem to the handling of the palette override flags in the external
reference records.  The current behavior for handling the palette
override flags for external references has different offsets for
different OpenFlight version (2 bytes for 14.2-15.1 and 4 bytes for 15.2
and later).  However, I believe this behavior is incorrect.

I know that the original 14.2 OpenFlight spec (dated April 1995)
specifies 2 bytes between the filename and the override flags, and the
15.4 and later specs specify 4 bytes.  However, I also found a 14.2.4
OpenFlight spec (dated January 1996) that changes the specification to 4
bytes.  Also, the databases in question were created using an old IRIX
version of MultiGen II, which wrote OpenFlight 14.2 files natively.
These files also have 4 bytes between the filename and flags.
Furthermore, these databases have always worked properly under earlier
versions of OSG, under Performer, and in every MultiGen product we've used.

This leads me to believe that the original 14.2 spec was incorrect (the
14.2.4 spec corrected this error), and there should be 4 bytes between
the filename and flags for all OpenFlight files version 14.2 and later.

The attached fix modifies the OpenFlight loader to behave in this way."
2007-06-08 10:58:22 +00:00
Robert Osfield
c8a5db6a71 Updated wrappers 2007-06-08 10:42:52 +00:00
Robert Osfield
b1909ff55a From Jason Daly, "This changes the handling of textures in the OpenFlight loader.
Currently, if the texture attribute file doesn't explicitly specify an
internal format, the loader will force it to use GL_RGB, which keeps
translucent textures (eg. GL_RGBA textures) from showing up properly.

This patch changes the default behavior to simply use the image's format
instead of forcing a particular format."
2007-06-08 10:22:44 +00:00
Robert Osfield
6bc1a940c9 Updated wrappers 2007-06-07 21:07:30 +00:00
Robert Osfield
5a8ec8f470 Commented out the Scene Stats entry as its not implemented yet. 2007-06-07 20:26:29 +00:00
Robert Osfield
4b73712f51 Added automatic stopping of animation when home() is called 2007-06-07 12:23:21 +00:00
Robert Osfield
32236ab2a4 From Per Fahlberg, "To get the pfb (Performer) plugin to compile I had to remove some of the
libraries listed under TARGET_EXTERNAL_LIBRARIES.
The removed libraries are not needed when linking the plugin, they are
loaded during runtime by Performer.
The modified file is attached."
2007-06-07 12:05:09 +00:00
Robert Osfield
3b1c5c3b96 Introduced a destruct method to help clean up the Registry. 2007-06-07 11:19:02 +00:00
Robert Osfield
9064895b91 Revert the signOrZero cade path in the getRotate() to fix bugs. 2007-06-07 11:06:40 +00:00
Robert Osfield
51d489fb97 Added View::home() method and updated wrappers 2007-06-07 09:58:49 +00:00
Robert Osfield
1d7ba27e72 Removed redundent files 2007-06-07 09:24:46 +00:00
Robert Osfield
766e58a589 Updated wrappers 2007-06-07 08:52:51 +00:00
Robert Osfield
211abb16dc Updated version numbers for release 2007-06-06 21:43:38 +00:00
Robert Osfield
3f7ffb088e Revert the setting of SingleThreaded under Windows in suggestBestThreadingModel() 2007-06-06 17:01:37 +00:00
Robert Osfield
34b4fb524d Fixed includes 2007-06-06 14:51:08 +00:00
Robert Osfield
87c9b39c98 From Roger James, "These fix a couple of problems in the ac3d writer.
1. Number of child node of the world object set incorrectly in when scene contains shape drawables.

2. Incorrect handling of line primitives."
2007-06-06 11:34:19 +00:00
Robert Osfield
36d50301cf From Olaf Flebbe, "an implementation of GraphicsWindow::setCursor for WIN32." 2007-06-06 11:28:44 +00:00
Robert Osfield
85c8797bc4 Moved HelpHandler and StatsHandler classes into ViewerEventHandlers header, removed HelpHandler and StatsHandler headers 2007-06-06 11:21:13 +00:00
Robert Osfield
118a6b3bf2 Updated wrappers 2007-06-06 11:10:44 +00:00
Robert Osfield
6844ac0209 Moved SimpleViewer from osgViewer into the osgviewerCocoa example directory as this
is the only place in the OSG that now relies upon SimpleViewer.
2007-06-06 10:58:21 +00:00
Robert Osfield
6e3c9ad3d3 Added support for passing in ArgumentParser in Viewer and CompositeViewer constructor 2007-06-06 10:57:02 +00:00
Robert Osfield
2c16c5b87d Change interator to const_iterator to try and avoid Solaris build failure 2007-06-05 14:37:55 +00:00
Robert Osfield
2b9f209765 From Per Fahlberg, "added use of the internal format specified in the OpenFlight format attr files." 2007-06-05 11:18:28 +00:00
Robert Osfield
a1e436d9e7 From Jeremy Moles and Rbert Osfeild, added extra details about CMake build options. 2007-06-04 20:32:15 +00:00
Robert Osfield
1f2cfa91c3 Warning fix 2007-06-04 15:05:59 +00:00
Robert Osfield
3bc90a837e From Roger James, "Here are my fixes for transparency in the Collada DAE reader." 2007-06-04 11:47:05 +00:00
Robert Osfield
a1fc3e63a8 From Martin Lavery and Robert Osfield, added use of hardwarded value kCGLCEMPEngine
to fix build failure on slightly older versions of OSX.
2007-06-04 11:14:17 +00:00
Robert Osfield
3ec3bf1679 Updated wrappers 2007-06-04 10:56:01 +00:00
Robert Osfield
448efe0722 Added osg::Hint class 2007-06-04 10:47:15 +00:00
Robert Osfield
a9d9d387df Fixed spelling of Receives 2007-06-04 08:38:11 +00:00
Robert Osfield
30e4eb833f Updated wrappers 2007-06-03 10:00:09 +00:00
Robert Osfield
b5791629ea Added Viewer::setUpViewerAsEmbeddedInWindow convinience method 2007-06-03 09:34:28 +00:00
Robert Osfield
6fc3543cc8 updated wrapper 2007-06-01 22:28:03 +00:00
Robert Osfield
b92ebca928 From Maria Ten, "The constructor method of the EllipsoidLocator of osgTerrain assumes
that the terrain is always the Earth planet. I changed the constructor
method to accept the Equator radius and the Polar radius like
parameters. By default, it assumes the Earth radius for the
EllipsoidLocator. I added a setEllipsoidModel method, too.

Now, we are developing some libraries for a GIS applicacion, and our
libraries can visualize terrains of planets like Mars. I think that is
a interesting change."
2007-06-01 21:33:29 +00:00
Robert Osfield
523337ea20 Updated wrappers 2007-06-01 19:53:14 +00:00
Robert Osfield
053ba0c543 From Wojciech Lewandowski, "I did few tests to see whether adding PreDraw callback would help us with SPI problems when using Viewer. Results were positive so I decided to give it a try and ask you to verify and maybe merge with existing codebase.
I added _preDrawCallback member and neccessary access methods plus modified osgUtil RenderStage.cpp to invoke it before all drawInner calls are made. I tried to maintain symmetry with postDrawCallback but you know better where is a proper place for this call ;-)
"
2007-06-01 19:45:24 +00:00
Robert Osfield
822868ca31 From Mathias Froelich, "have done an interface to change the mouse cursor in the X11 graphics
window.
The win32 implementation is still in its original shape since I have no win32
implementation available.

I have chosen the enum approach for the first cut. That is benefitial since
the user does not need to track creation of mouse cursors for different
windows and displays in presence of multiple viewer windows.

The default set of available mouse shapes is the same set that was available
with glut. That set served many OpenGL applications well, so the hope is that
this is enough.

Even though, that implementation is still extensible:
I have digged out the way SDL defines new mouse cursors and added a still
documented out function prototype in the GraphicsWindow that can be used to
extend the current implemtation for arbitrary mouse shapes. That is not
implemented yet.

I hope that somebody with a win32 test system can catch up that implementation
on win32."
2007-06-01 19:43:28 +00:00
Robert Osfield
fcafd4db06 From Stephan Huber, "attached you'll find the modified ImageStream
and a small fix for QuicktimeImageStream to disable debug-logging :)"
2007-06-01 19:19:23 +00:00
Robert Osfield
3d853fcbc6 Removed the debug message for the ortho path. 2007-06-01 19:01:23 +00:00
Robert Osfield
c79a7e7ad5 Work in progress on shaders support 2007-06-01 18:27:08 +00:00
Robert Osfield
78c831f850 Changed name of AnimationPathHandler to RecordCameraPathHandler 2007-06-01 10:42:24 +00:00
Robert Osfield
5a80e4bfdc From Jeremy Moles, new event handler to record the camera path. A few small tweaks by Robert Osfield to make it more consistent with the old osgProducer::Viewer behavior. 2007-06-01 10:39:27 +00:00
Robert Osfield
9b1426e47e Improved taper ratio computation 2007-05-30 17:56:43 +00:00
Robert Osfield
7b31aeca43 Added set up of overlay stateset 2007-05-30 16:36:47 +00:00
Robert Osfield
a510ecf5bd Added trapezodial fitting code 2007-05-30 14:18:33 +00:00
Robert Osfield
34fe63a74f Fixed case of when view==NULL 2007-05-30 09:25:01 +00:00
Robert Osfield
f012e4516c From Sherman Wilcox, "The issue itself occurs when a model is tessellated
that has greater than unsigned short number of vertexes. An object
called vertexPtrToIndexMap contains vertexes and their indexes. This
std::map object can obviously hold a quantity that is greater than
unsigned short, however osg::DrawElementsUShort objects were being
created to reference these vertexes and their indexes.
osg::DrawElementsUShort can only hold indexes that are 16-bit
quantities.

...

proposed_patch_2\tessellator.cpp. This solution examines the size of
vertexPtrToIndexMap and selects 1 of 3 possible osg::DrawElements
objects: DrawElementsUByte, DrawElementsUShort, or DrawElementsUInt.
The main drawback of this particular solution is the code duplication.
However, the repair is straightforward."
2007-05-29 10:31:03 +00:00
Robert Osfield
adf95c8261 Fixed handle on non ellipsoid models 2007-05-28 15:27:21 +00:00
Robert Osfield
4abacc9d3d Added project down to base implementation. 2007-05-28 13:56:26 +00:00
Robert Osfield
02d2963df4 Updated version number, wrappers and readme for release 2007-05-28 10:17:52 +00:00
Robert Osfield
49217e8a88 From Frauciel Luc, "Added support for other pointers than mouses by using a nearpoint and farpoint instead of mousex,mousey + Camera (see Dragger and Dragger.cpp).
The major modification concern the LineProjector class in Projector.cpp. The intersection was previously done in window space, I've modified it to compute it in object space."
2007-05-28 10:14:29 +00:00
Robert Osfield
c072e4adac Updated wrappers 2007-05-27 19:35:50 +00:00
Robert Osfield
9e9b9250c3 Updated wrappers 2007-05-27 18:18:17 +00:00
Robert Osfield
784383ac08 Added camera event callback support into osgViewer 2007-05-27 17:29:29 +00:00
Robert Osfield
a49ec6e78d Updated calling of master camera's update callback 2007-05-27 15:24:41 +00:00
Robert Osfield
4e3e789acf Added testing to see if camera allows events before automatically attaching a trackball manipulator 2007-05-27 14:52:43 +00:00
Robert Osfield
f290ce193d Updated wrappers 2007-05-26 16:02:28 +00:00
Robert Osfield
005268e982 Fixes to help C# binding dev. 2007-05-26 15:49:35 +00:00
Robert Osfield
27a1406819 From Blake Williams, "I discovered why the \u2013CompositeViewer option for the osghud example does not work. The run() function adds a camera manipulator to each view that does not have one assigned, which causes the view with the HUD camera to point somewhere other than where it should. I just added a check before a new default camera manipulator is added to ensure that the view allows event focus before a camera manipulator is added." 2007-05-26 15:47:53 +00:00
Robert Osfield
6b75603ace From Charles Cole, "Attached are mods to the OpenFlight plug-in to help further implement
the specification.  With these mods, blink sequences are now created for
flashing light point nodes, either palletized (v.15.8 and later) or
non-palletized (15.7 and earlier).  Thanks to Brede for his
implementation of the palletized light point nodes.

There is still work to do on adding the capability to properly handle
light point system nodes, but this does add some capability that did not
previously exist.  So, I wanted to at least submit this and I will
hopefully provide the additional capability in the near future.

I've tested the code modifications with Visual Studio 2005.  I don't
have the means to test any other operating system, but I would suspect
that there shouldn't be any issue (famous last words).  I used the test
files that I uploaded to the users forum to test the changes.

In addition to the added capability, I changed the light point node
radius to the "actualPixelSize" value in the file.  Previously, the
radius was set to half the actual pixel size (see
LightPointRecords.cpp).  Not sure why this was the case.  But, it was
brought to my attention by a co-worker who created the OpenFlight files
and was testing them with different viewers.  If there's some history
for setting the radius to half the size, then this change can be
omitted."
2007-05-26 15:42:30 +00:00
Robert Osfield
6583b5b370 From Charles Cole, "he attached code
implements the LightPointSystem class to allow for the OpenFlight
plug-in to read and handle light point system nodes.  The behavior is
very similar to the old plug-in in that a MultiSwitch node is created to
handle the "enabled" flag bit set in the node record.  The code also
reverts the changes for the actualPixelSize as mentioned above.  And
lastly, the code requires the previously submitted changes for the
plug-in.

As for the other changes, I've tested the code with Visual Studio 2005
and the files that I posted in the users forum.

With all of the submitted changes, the OpenFlight plug-in should now be
capable of loading files with light point system nodes and the use of
palletized light points and non-palletized light points.
"
2007-05-25 19:35:19 +00:00
Robert Osfield
a8cae09c30 Added s/getOverlayBaseHeight methods 2007-05-25 16:00:38 +00:00
Robert Osfield
96f0e8bd54 Added some debug message to the set/getWindowSystemInterface function 2007-05-25 15:57:59 +00:00
Robert Osfield
8a1ac890f3 Introduce C entry point support for plugin setup for better static build support 2007-05-25 15:27:06 +00:00
Robert Osfield
1676ae839f Added C entry point graphicswindow_X11() to help with static build support 2007-05-25 15:26:13 +00:00
Robert Osfield
74d19eed34 Implemnet clampping of ovleray polytope to base plane 2007-05-25 10:14:05 +00:00
Robert Osfield
27173bdf73 Changed debug message to INFO 2007-05-25 10:13:36 +00:00
Robert Osfield
80d260c472 From Colin McDonald, "The writeImage method in ReaderWriterPNM.cpp had an error checking the
accepted file extensions, so that once the plugin was loaded in the
Registry it would grab any image file write request, regardless of the
file extension.  This was a particular problem if it was statically loaded."
2007-05-24 16:11:42 +00:00
Robert Osfield
a22a7f867e Improved the polytope cutting and project calculation 2007-05-24 14:20:02 +00:00
Robert Osfield
6bf7fec64e From Olaf, "there are more dubious calls to istream::readsome instead of
istream::read. IMHO it does make no sense here and potentially breaks
this plugin."
2007-05-24 09:49:22 +00:00
Robert Osfield
babee83194 From Serge Lages, support for install api directories, with tweaks from Robert Osfield 2007-05-24 08:51:55 +00:00
Robert Osfield
6918cc69e9 Fixed brackets 2007-05-23 19:30:16 +00:00
Robert Osfield
908da298bb From Anders Backman, add -DJAS_WIN_MSVC_BUILD for Win32 build 2007-05-23 15:24:16 +00:00
Robert Osfield
58fc56aabd Made the local shaders definitions static const char to avoid multiple definiations 2007-05-23 15:14:18 +00:00
Robert Osfield
7673184d01 Added insertion of center point into object polytope 2007-05-23 14:55:59 +00:00
Robert Osfield
6a6f57ad56 Added angular sorting of the points on the plane intersecting the cut plane. 2007-05-23 13:26:21 +00:00
Robert Osfield
d4fab04128 Updated wrappers 2007-05-23 12:35:37 +00:00
Robert Osfield
bfcaba55fb Added platform specific GraphicsWindow* headers to public headers listings 2007-05-23 12:21:20 +00:00
Robert Osfield
30a06a033e From Peter Hrenka, (note from Robert Osfield, renamed GenericPrimitiveFunctor mention below to TemplatePrimitiveFunctor).
"Since we desperately needed a means for picking Lines
and Points I implemented (hopefully!) proper geometrical tests
for the PolytopeIntersector.

First of all I implemented a new "GenericPrimiteFunctor"
which is basically an extended copy TriangleFunctor which also
handles Points, Lines and Quads through suitable overloads of
operator(). I would have liked to call it "PrimitiveFunctor"
but that name was already used...
I used a template method to remove redundancy in the
drawElements method overloads. If you know of platforms where
this will not work I can change it to the style used
in TriangleFunctor.

In PolytopeIntersector.cpp I implemented a
"PolytopePrimitiveIntersector" which provides the needed
overloads for Points, Lines, Triangles and Quads to
the GenericPrimitiveFunctor. This is then used in the
intersect method of PolytopeIntersector.

Implementation summary:
- Points: Check distance to all planes
- Lines: Check distance of both ends against each plane.
  If both are outside -> line is out
  If both are in -> continue checking
  One is in, one is out -> compute intersection point (candidate)
  Then check all candidates against all other polytope
  planes. The remaining candidates are the proper
  intersection points of the line with the polytope.
- Triangles: Perform Line-Checks for all edges of the
  triangle as above. If there is an proper intersection
  -> done.
  In the case where there are more than 2 polytope
  plane to check against we have to check for the case
  where the triangle encloses the polytope.
  In that case the intersection lines of the polytope
  planes are computed and checked against the triangle.
- Quads: handled as two triangles.

This is implementation is certainly not the fastest.
There are certainly ways and strategies to improve it.


I also enabled the code for PolytopeIntersector
in osgkeyboardmouse and added keybindings to
switch the type of intersector ('p') and the picking
coordinate system ('c') on the fly. Since the
PolytopeIntersector does not have a canonical
ordering for its intersections (as opposed to
the LineSegementIntersector) I chaged the
implementation to toggle all hit geometries.


I tested the functionality with osgkeyboardmouse
and several models and it seems to work for
polygonal models. Special nodes such as billboards
do not work.


The next thing on my todo-list is to implement
a an improved Intersection-Structure for the
PolytopeIntersector. We need to know
which primitives where hit (and where).

"
2007-05-23 11:05:59 +00:00