Commit Graph

7365 Commits

Author SHA1 Message Date
Robert Osfield
c57d989fef From Jean-Sebastien Guay, added new version of feetype into search list 2007-12-21 17:56:41 +00:00
Robert Osfield
5a79032599 Added copyright notice and tweaked genwrapper 2007-12-21 17:33:00 +00:00
Robert Osfield
41b52b3d1f Updated wrappers 2007-12-21 17:26:19 +00:00
Robert Osfield
4c46475ca2 From Paul Martz, "added include<alogrithm> to prevent VS8 compile error" 2007-12-21 16:18:54 +00:00
Robert Osfield
39f4419183 Removed OperationArrayFunctor for wrappers to avoid compile errors assocaited with them 2007-12-21 15:54:14 +00:00
Robert Osfield
095288bb47 Removed inappropriate inline 2007-12-21 15:46:50 +00:00
Robert Osfield
6b59b1739f Updated wrappers 2007-12-21 15:04:56 +00:00
Robert Osfield
b052e18f6e From Paul Martz, .osg support for OcclusionQueryNode 2007-12-21 14:49:49 +00:00
Robert Osfield
4889342c4a From Paul Martz, Introduced osg::OcclusionQueryNode with support for OpenGL occlusion query extension 2007-12-21 14:45:16 +00:00
Robert Osfield
5f7a2968ac From Bryan Thrall, "UFOManipulator ignores any attached CoordinateFrameCallback; the
attached files fix this (based on 2.2 release).
"
2007-12-21 14:21:21 +00:00
Robert Osfield
8733bb1799 From Mathias Froehlich, "Something to extend the texture subloading blacklist.
... we have problems with that on solaris."
2007-12-21 14:16:40 +00:00
Robert Osfield
9a41178439 From John Kelso,"Attached is the ive reader/writer for the 2.x version of the osg::Sequence
node. "
2007-12-21 14:13:40 +00:00
Robert Osfield
0f2959ce69 From Jeremy Moles, "Here is a implementation of setScreeResolution and
setScreenRefreshRate for systems support Xrandr. The include CMakeFile
makes this optional, and turns it OFF by default, in which case any
person trying to use these functions under Linux will be instructed to
build osgViewer w/ Xrandr support.
"
2007-12-21 13:32:13 +00:00
Robert Osfield
8abeaa1272 Added return 2007-12-21 13:31:25 +00:00
Robert Osfield
9ae1ffe13b From Jean-Sebastien Guay, "When using osg::Sequence you can stop the sequence by setting the mode
to STOP. Subsequently, you can restart it from the beginning by
setting the mode to START. This does not work as expected. The _now
time is not updated while the mode is STOP, which causes the items in
the sequence to flash by very quickly when the mode is set to START.

For example, if the mode was set to STOP and left that way for 30
seconds, and there are 10 items in the sequence, when the mode is set
to START all the items will flash by (in 3 loops) while the _now time
catches up with the real time, and then the sequence will go on at the
rate it should.

This is a simple fix for that, which updates the _now time regardless
of the mode the sequence is in."
2007-12-21 13:18:13 +00:00
Robert Osfield
cf1a30841a From David Callu, various classes in support of VirtualPlanetBuilder 2007-12-21 13:07:54 +00:00
Robert Osfield
2e62206117 From David Callue, added support for reading/writing Vec*dArray to .ive plugin 2007-12-21 12:36:40 +00:00
Robert Osfield
815121b0e8 Updated wrappers 2007-12-20 17:30:31 +00:00
Robert Osfield
2cab28c3b8 Added support for min to max level ranges for Layers in support of VirtualPlanetBuilder usage of this. 2007-12-20 15:51:13 +00:00
Robert Osfield
2c0842c7b7 Added an optional use of doubles for computing error metrics to help investigate precision issues seen in VPB when working with small segments of geographic data. 2007-12-20 15:50:07 +00:00
Robert Osfield
f8253ca4bd Reset the the _lineSpacing to 0.0f to fix the line spacing when word wrapping takes place 2007-12-20 15:40:14 +00:00
Robert Osfield
53be383843 From Wojciech Lewandowski, "By complete coincidence I just have read an old OSG submission mail related
to bugfixes in osg::Polytope.setToUnitFrustum and setToBoundingBox  It was
sent at beginning of december. I read it when purging my Thrash emails and
found it there this because it was wrongly classified as SPAM.

What stroke me in this email was the fact that there was once an error in
Polytope class. Since I adopted CustomPolytope (osgSim OverlayNode.cpp) for
my minimal shadow area computations I checked my code for this error. And I
found it in CustomPolytope::setToUnitFrustum method.
CustomPolytope::setToBoundingBox seemed OK.

So I went back to the origin and fixed this error in OverlayNode.cpp as
well. I have not tested it in OverlayNode though (I don't know how) so
please look at this carefully. But it seems to work fine with my shadow
calculations."
2007-12-20 14:40:28 +00:00
Robert Osfield
3ffe7de6a3 Reorder includes in an attempt to avoid compile problems under Cygwin. 2007-12-20 10:48:23 +00:00
Robert Osfield
da872bb279 Updated AUTHORS files 2007-12-17 21:52:29 +00:00
Robert Osfield
06b2d1ee60 Updated ChangeLog for 2.3.0 release 2007-12-17 21:35:33 +00:00
Robert Osfield
a1ce3ffd9d Updated version number for 2.3.0 dev release 2007-12-17 21:08:52 +00:00
Robert Osfield
9a2bc98d3a From Paul Obermeier, "Please find enclosed the following 2 bug fixes:
File osgShadow/Version.cpp, Line 25:

const char* osgShaodowGetLibraryName()

should be:

const char* osgShadowGetLibraryName()


File CMakeModules/OsgMacroUtils.cmake, Line 224:

SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})

should be:

SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")

Otherwise setting CMAKE_DEBUG_POSTFIX to an empty string instead of "d" in
the main CMakeLists.txt does not work under Linux.
"
2007-12-17 18:38:21 +00:00
Robert Osfield
d7a2728fea From David Cullu, added various mathematical operators 2007-12-17 17:43:57 +00:00
Robert Osfield
49696d776a From Stephan Huber, "attached you'll find an updated carbon-implementation, which implements
the missing functionality for setWindowName and useCursor
"
2007-12-17 10:24:20 +00:00
Robert Osfield
e883663072 Updated wrappers 2007-12-17 10:22:41 +00:00
Robert Osfield
9507ee6c7d From Wojiech Leandowski, "I earlier wrote about my hassles with archives under Windows. I implemented
64 bit binary compatible OSGA archive reader/writer using mixed
stdio/iostream calls. But during this work I learned that it can be made in
much simpler way.

Attached is result of this new attempt. I hope its appropriate for inclusion
into OSG codebase. It was compiled and tested with latest SVN OSG, Windows
XP 32 bit and Windows Vista business 64 bit. OSG was built using VS 2005
Express SP1 for 32 bit environment and VS 2005 Std for 64 bit.
---
Solution description (there were two problems involved):
---
Problem 1: implicit conversions beetween file positions and 32 bit int. This
could be considered a MS compiler bug because this 32 bit int was
additionally implicitly converted to/from 64 bit. As far as I know compiler
is allowed to make only one implict conversion (but maybe this rule does not
refer to simple types).

Its actually possible to address OSGA files above 4 GiB range using 32 bit
windows iostreams. MS Iostreams in practice offer the same level of
functionality as stdio functions. There are functions fsetpos and fgetpos in
stdio lib which use 64 bit file pointers (fpos_t). These functions are
internally called by seekp( streampos ), seekg( streampos ), tellp(), and
tellg() methods. So its also possible to change and retrieve file postions
using iostream calls. But the problem lies in implicit handling of streampos
type.

streampos type is actually a template class used as seekp, seekg parameter
and returnd from tellp, tellg. Its capable of storing 64 bit file pointers.
But streampos can be also converted to/from simple type streamoff. It has
proper constructor and cast operator. In Win 32 environment streamoff is
defined as long (~32 bit int). So when seekp, and tellp arent used with
exact streampos objects but OSGA_Archive::pos_type complier makes implicit
casts to 32 bit int types loosing important bits of information.

So above problem could be easily handled by making conversion calls
explicit. My code defines 2 functions used to convert back and forth beetwen
64 bit OSGA_Archive::pos_type and std::streampos objects:

       OSGA_Archive::pos_type ARCHIVE_POS( const std::streampos & pos );
       std::streampos STREAM_POS( OSGA_Archive::pos_type & pos );

Rest of the OSGA implementation code was modified to call these conversions
explicitly with seekp, seekg, tellp, tellg.

---
Problem 2: seekp and seekg have two variants. Only one of these variants is
actually 64 bit proof.

When I solved my first problem and made use of explicit streampos conversion
functions, OSGA archive was able to read my example 11 GiB archive. But
there were still problems with write and append. I found that the reason for
this was pair of seekp( 0, std::ios_base::end ) and tellp() calls. It turned
out that use of seekp, seekg( offset, direction ) function variants was
setting file pos pointer to EOF when file was larger than 4GiB. But I
noticed that one arg seekp, seekg ( streampos ) versions worked correctly.
So the solution was to change OSGA write logic a little, and replace
seekp( offset, direction ) with seekp( absolute_pos ) calls.
I achieved this by modifing IndexBlock write method to record and restore
file pos after IndexBlock was written. This modification has the effect that
put pointer is generally kept at the end of file, so there is no need to
repostion to the end before writing the files. This allowed me to get rid of
those problematic seekp( 0, std::ios_base::end ) calls.

There was one place where I could not easily get rid of seekp( 0,
std::ios_base::end ). It was situation where existing OSGA was opened for
appending. I resolved this by computing file length by finding max position
from index block and file block endings. Then I replaced former seekp( 0,
std::ios_base::end ) with  seekp( STREAM_POS( found_file_length ).
---

Description of these changes may sound bit hacky but in practice these were
fairly simple and straightforward modifications. I hope they pass your
review. There is one complex preprocessor condition which I based on few
lines taken from boost positioning.hpp. Boost licence does allow such
reproduction. In case of problems this condition may be easily simplified to
windows only implementation.
"
2007-12-17 09:58:55 +00:00
Robert Osfield
3fcba1bc51 From Jean-Sebastien Guay, "Some clients at my new job noticed that picking did not work with the
osg::Capsule subclass of osg::Shape in an osg::ShapeDrawable. Other
shapes worked fine. So I have fixed this. Code attached.

My modification is in the PrimitiveShapeVisitor, and is based on the
DrawShapeVisitor - I added methods called createCylinderBody and
createHalfSphere, and used them in apply(Cylinder&) and
apply(Capsule&). In my testing they work fine, tested even with
transforms and moving around the scene.
"
2007-12-16 17:57:19 +00:00
Robert Osfield
6eaa273116 Added check to make set up a sequencegroup only happen when required. 2007-12-16 17:53:16 +00:00
Robert Osfield
1e996afe81 From Wojciech Lewandowski, "osgSim::BlinkSequence has sequenceGroup unitialized by default (=NULL ref_ptr). By looking at the code I figured out that unset sequenceGroup is completely correct and thus allowed.
But writing BlinkSequence with empty sequence group caused a crash when IVE was accessing baseTime from NULL address.
 
Atttached is a fix for this situation.
"
2007-12-16 17:46:57 +00:00
Robert Osfield
b76b85770f From Wojiech Lewandowski, "There was a bug in ShadowMap camera view matrix computation. View matrix was wrong when light was directional and shadowed scene was not centered at zero coord. I fixed that and also modified cast distance to much smaller value. With former range it was possible to generate shadows with lowest LODs. " 2007-12-16 17:41:46 +00:00
Robert Osfield
f1154f99bf Fixed HeightField coordinates set up 2007-12-16 17:33:05 +00:00
Robert Osfield
0cdc3e9506 Added intializers. 2007-12-16 17:01:40 +00:00
Robert Osfield
4a79644810 Added support for automatically setting the coordinate system of a shapefile by reading associate .prj file 2007-12-16 16:18:58 +00:00
Robert Osfield
998ba32501 Added parsing of parameters to Viewer constructor. 2007-12-16 13:29:02 +00:00
Robert Osfield
fddcebd479 Added StateSetManipulator for testing purposes, and fixed typo 2007-12-16 13:25:40 +00:00
Robert Osfield
e29423bba9 Removed used of ref_ptr<>'s internally to avoid ciricular calls on destruction. 2007-12-16 13:20:38 +00:00
Robert Osfield
becf6c22ea Added initilizers of variables to FreeTypeFont3D constructors.
Removed unused FreeTypeFontBase class
2007-12-16 12:36:52 +00:00
Robert Osfield
32e43cb789 Fixed handling of DISPLAY variable, and mapped the rest of Producer config settings 2007-12-15 17:16:11 +00:00
Robert Osfield
6d945df96d Commented out rendendent warnings 2007-12-15 17:15:19 +00:00
Robert Osfield
43611a6ff5 commented out rendudent warning 2007-12-15 17:15:05 +00:00
Robert Osfield
8b21b87d96 Added setting of ambient bias uniform 2007-12-15 15:22:00 +00:00
Robert Osfield
af922cc355 Added separate unform variable to keep track of abmient contribution. 2007-12-15 15:19:18 +00:00
Robert Osfield
2ab66d9948 Tweaked the abmient lighting contribution so that the OpenGL vertex lighting has
the ambient light source switched off, and use the fragment shader to add this
contribution back in.
2007-12-15 15:17:51 +00:00
Robert Osfield
9f63b89e6a Refectored the loading of Locator out into its own separate file 2007-12-14 17:40:11 +00:00
Robert Osfield
f7e91fa28e Added Locator::s/getTransformScaledByResolution(bool) to assist with VPB integration 2007-12-13 17:51:43 +00:00