Commit Graph

10779 Commits

Author SHA1 Message Date
Robert Osfield
bb723e14fa From David Callu, fix in FrameBufferObject when using Texture2Darray and GeometryShader. 2010-11-04 11:05:47 +00:00
Robert Osfield
d2a9f48054 From Per Fahlberg, "I have added support for PowerVR texture compression. osg::Texture and osg::Image have been modified to support the texture formats and I have added a plugin to load pvr files. All modified files are in the attached zip. " 2010-11-04 11:02:37 +00:00
Robert Osfield
4ced7dffc4 From Wang Rui, "additional FFmpegParameters class in the ffmpeg plugin for setting parameters before opening the video file, which benefits from getPluginStringData() as shown in the ReaderWriter implementation.
Now we can use ffmpeg to render webcam video (using the vfwcap device) under Windows:

osgmovie 0 -e ffmpeg -O "format=vfwcap frame_rate=25"

The number 0 just indicates a default device number in ffmpeg.

I think this can work under Linux, too, and should be a bit better than comparing the filename with a '/dev/' string. Just type:

./osgmovie /dev/yourcam -e ffmpeg -O "format=video4linux2 frame_rate=30 size=320x240""
2010-11-03 10:37:32 +00:00
Robert Osfield
afa563df57 From Wang Rui, "a new parsePluginStringData() method in the osgDB::Options class which will be automatically executed to parse option string to the string data map" 2010-11-03 10:37:02 +00:00
Robert Osfield
1beedce6fc From Jean-Sebastien Guay, "For a long time now I've wanted to be able to add custom values into the stats handler's graph. Here is my proposal of how I'd do this. It's surely not perfect and I'm open to suggestions, but I've already made more changes than I wanted to in order to be able to implement this...
The user calls statsHandler->addUserStatsLine() providing:

- the label they want for that line in the graph
- the text and bar colors they want in the graph
- the stats names they want queried (one for time taken, one for begin and one for end time) and a few settings for how these will be displayed.

Then all they have to do is call viewer->getViewerStats()->setAttribute(framenumber, name, value) for their three attributes each frame and they'll have their stats in the graph.

They can also give only a time taken attribute (or some other numerical value they want printed, which can be averaged or not), or only begin+end attributes, and the graph will accordingly display only the (average or not) numerical value or only the bars.

Along the way I cleaned up the existing code a bit:

* Each time the setUpScene() or createCameraTimeStats() methods added a line to the graph, they did pretty much the same thing, so I moved that into a separate method called createTimeStatsLine() which is called by setUpScene() and createCameraTimeStats().

* I moved the font, characterSize, startBlocks and leftPos variables to member variables, since they were being passed around everywhere but were set only once at the beginning.

* The geode on which stats lines are added is also kept in a member variable, and createCameraTimeStats() adds the per-camera lines to this geode instead of returning a new Group with a new Geode. This further reduces the number of variables the createCameraTimeStats() method needs as input.

"
2010-11-03 10:04:34 +00:00
Robert Osfield
bdf1912fda From Jean-Sebastien Guay, "For a while now I've been bugged (pun) by a problem in the stats graph I submitted a long time ago. When it scrolled, sometimes it would scroll too little, leading to an empty space at the left that would grow as time went by. I was in that code today for something else so I fixed it.
"
2010-11-03 09:51:12 +00:00
Robert Osfield
2d28026654 From David Fries, "Fix remote X11 crash querying GL_NUM_EXTENSIONS
In osg::isGLExtensionOrVersionSupported in src/osg/GLExtensions.cpp when
using indirect X11 rendering,
glGetIntegerv( GL_NUM_EXTENSIONS, &numExt );
is leaving numExt uninitilized causing the following glGetStringi to
return NULL when the extension number isn't present.  Passing NULL to
std::string() then crashes.  This is with the following nVidia driver.
OpenGL version string: 3.3.0 NVIDIA 256.35

I went ahead and initialized some of the other variables before
glGetInitegerv in other files as well.  I don't know for sure
which ones can fail, so I don't know which are strictly required.
"
2010-11-03 09:28:28 +00:00
Robert Osfield
079b1c293e From Chuck Seberino, "Here is a minor fix for the vrml plugin when building with Visual Studio 2010. 2010 has updated STL/TR1 libraries that create a naming conflict with the current source. The fix is to remove the 'using boost::next' line and use the fully-qualified boost::next to get rid of the ambiguity. Here is the patch and attached changes." 2010-11-02 14:00:50 +00:00
Robert Osfield
526b39060c From Brad Christiansen and Robert Osfield, "I have added the new function as suggested. The change was made against trunk from an hour or so ago. I haven't tested the performance yet (and probably won't get a chance till next week) but I have checked my terrains still work. I defaulted the equalization to off as I thought this was best until we can look into why there is the performance hit.
", note from Robert, tweaked the names and enabled the code path.
2010-11-02 12:15:18 +00:00
Robert Osfield
5da431a9a6 From Mikhail Izmestev, "There is bug in GLBufferObject::compileBuffer when changed not first buffer entry, then generated
new wrong offset.
"
2010-11-02 11:44:20 +00:00
Robert Osfield
170da45842 Fixed function name 2010-11-02 11:27:38 +00:00
Robert Osfield
316c1a88a9 From Javier Taibo, " In current SVN code, when exporting an osgParticle::Particle object to the .osg file format, it crashes if no drawable was set in the particle.
In the attached file (src/osgWrappers/deprecated-dotosg/osgParticle/IO_Particle.cpp) I have added a check for the existence of the drawable before writing it to the file.
"
2010-11-02 11:19:17 +00:00
Robert Osfield
112c272452 From John Ivar Haugland & Robert Osfield, fix for bug in VisualStudio where it adds an redundent '/n' on the end of the command line arguments for no reason. 2010-11-01 17:19:39 +00:00
Robert Osfield
cc93824605 From Alexander Irion, "When a osg::Geometry node is loaded from a ".osgb" file, there is no element buffer object created for the primitives element indices, although _useVertexBufferObjects is enabled. This bug decreases the rendering performance." 2010-11-01 17:05:53 +00:00
Robert Osfield
7b0a500ffc From Sukender, fix for incorrect for loop test. 2010-11-01 17:02:48 +00:00
Robert Osfield
fb4d6b16f9 From Jan Peciva, "attaching Matrix_implementation fix for two problems:
- using m.getPerspective( fovy, tmp, tmp, tmp ) to get only FOV does not work.
The reason is that getPerspective is taking tmp as reference - thus all the three variables points to the same memory location. Then, zNear (third parameter) is used inside the method, while zNear content was spoiled by zFar that was written to the same place, resulting in fovy set to nan. I consider that it is the right of programmers to use 3 times tmp as parameter and I fixed the code in the method. I have done the same for getFrustum and getLookAt.

- I fixed makeFrustum to accept infinite zFar. (Some graphics techniques like shadow volumes require placing zFar to infinity to avoid visual artifacts.)"

Note from Robert Osfield, change the local near & far variable names to temp_near and temp_far MS Visual Studio has a record of using near and far names.
2010-11-01 13:57:44 +00:00
Robert Osfield
2ce4b9d8e9 From Jean-Sebastien Guay, osgDB functions to expand wildcards - required to aid windows consule usage as this doesn't not automatically expand * usage. 2010-11-01 11:06:12 +00:00
Robert Osfield
cd336a7d73 From Jean-Sebastien Guay and Robert Osfield, cleaned up the way that unix/windows file separators are managed. 2010-11-01 10:52:20 +00:00
Robert Osfield
862a0c68e3 From Mathias Goldau, "Added very brief documentation when to use the triangle mesh class. I
generated the make doc_openscenegraph target to verify that this change does
not break something.
"
2010-11-01 10:31:30 +00:00
Robert Osfield
b5c57c3d68 From Mikhail Izmestev, "I have discovered problem with draggers from osgManipulator in HUD.
This problem caused because osgManipulator::Dragger uses matrices of top camera instead last
absolute Camera in NodePath.

I attached modified osgManipulator/Dragger.cpp file, where added code for finding last absolute
camera. With this changes draggers works in HUD.

Example for demonstrate this problem you can find in osg-users list [1].

Mikhail.

[1] http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/62636
"
2010-10-29 15:18:34 +00:00
Robert Osfield
0328691f76 From Sherman Wilcox, "there's a bug in the cmake file for the tiff plugin. See
attached. The problem was that the output files were not properly
setting the debug/release libs due to this cmake bug. What occurred was
the release lib was set in all configurations."
2010-10-29 09:56:09 +00:00
Robert Osfield
e47946086b 2010-10-29 09:35:54 +00:00
Robert Osfield
7672cc57c2 Added X11_X11_LIB to LIB_EXTRA_LIBS when build X11 version of osgViewer to enable use of Mesa's GLES/EGL implementation 2010-10-29 08:33:10 +00:00
Robert Osfield
95902cd275 Fixed warning 2010-10-29 08:31:54 +00:00
Robert Osfield
b3074ad92d Commented out unused ElapsedTimer 2010-10-28 15:52:52 +00:00
Robert Osfield
1b2c689122 Added use ObjectWrapper's FinishObjectReadCallback to fix VertexBufferObject handling in osg::Geometry
and a call to the TileLoaded callback in osgTerrain.
2010-10-28 14:04:57 +00:00
Robert Osfield
f1b660997b Added FinishedObjectReadCallback to ObjectWrapper which allows
wrappers to register their own handling of post processing of objects once they have been read.
2010-10-28 14:04:07 +00:00
Robert Osfield
b622a99178 Added handling of vertex buffer objects into osg::Geometry copy constructor. 2010-10-28 14:01:47 +00:00
Robert Osfield
ea98b1a9f8 Improved code style consistency 2010-10-28 14:01:10 +00:00
Robert Osfield
441d832536 Quitened down debug messages 2010-10-28 14:00:25 +00:00
Robert Osfield
cb08e7544e Fixed getEnableDepthWrites() naming. 2010-10-27 13:49:16 +00:00
Robert Osfield
13a8e92043 Added command line options:
--tristripper
--no-tristripper
--smoother
--no-smoother

--remove-duplicate-vertices / --rdv
--optimize-vertex-cache / --ovc
--optimize-vertex-order / --ovo
2010-10-26 14:59:12 +00:00
Robert Osfield
9978516bf7 Added number of primitive sets to on screen stats 2010-10-25 13:42:01 +00:00
Robert Osfield
30dbcf1c72 Added -o postfile option to allow the output of processed files
Disabled tri-stripping when simplifing to fix performance issue that introduces.
2010-10-23 09:51:11 +00:00
Robert Osfield
a2d99fc805 Added StateSetManipulator usage 2010-10-22 16:44:52 +00:00
Robert Osfield
123c0a36c4 Added support for enable VBO's and doing simplification. 2010-10-22 16:35:28 +00:00
Robert Osfield
89d09d7712 Cleaned up main loop, so it's more readable, seperating out the paging and non paging implementations 2010-10-22 12:28:50 +00:00
Robert Osfield
f91944fbbf Added paging support to osganalysis example 2010-10-22 12:19:22 +00:00
Robert Osfield
1a292ad8e3 Integrated IncementalCompileOperation into DatabasePager.
Improved various facilities in IncrementalCompileOperation.
2010-10-21 16:29:23 +00:00
Robert Osfield
2014e85259 Added new osganalysis example as a testbed for profiling peformance of various aspects of OSG/OpenGL and scene graphs. 2010-10-21 16:28:23 +00:00
Robert Osfield
6ed74470b2 Introduction of IncrementalCompileOperation support to DatabasePager. 2010-10-14 18:16:03 +00:00
Robert Osfield
00fe3c0417 Introduced SubloadCallback::generatdTextureObject() method. 2010-10-14 13:35:36 +00:00
Robert Osfield
297be2290a From Wang Rui, warning fix. 2010-10-14 12:20:51 +00:00
Robert Osfield
8640929a2e From Brad Christiansen, fix function entry points under Windows to address crash 2010-10-14 11:10:16 +00:00
Robert Osfield
82c01cb72e From Wang Rui, QT based OpenThreads implementation 2010-10-14 09:31:09 +00:00
Robert Osfield
b55f75111e Added support for using a custom osg::Geometry that attempts to force the OpenGL driver
to download the texture object to graphics card.

Calling IncrementalCompileOperation::assignForceTextureDownloadGeometry() assigns a geometry
to the job.
2010-10-13 15:03:02 +00:00
Robert Osfield
ffa75c9c84 Changed the _ARB cube map defines to non ARB versions. 2010-10-09 11:51:24 +00:00
Robert Osfield
a9dd08c3ba Removed redudent set up of GL_ cubemap defines as these are now also in include/osg/Texture 2010-10-09 11:27:45 +00:00
Robert Osfield
270a9fc47e Tempory fix for regression due to remove of glPushAttrib/glPopAttrib 2010-10-08 18:53:16 +00:00
Robert Osfield
2aa231cd11 Disabled the build of Qt examples when building against GLES1 & 2 as Qt GL includes OpenGL headers itself that cause conflict. 2010-10-08 18:13:10 +00:00