Commit Graph

3259 Commits

Author SHA1 Message Date
Robert Osfield
a6c7fee246 From Alok Priyadarshi, "1. Replaced APIENTRY to GL_APIENTRY which is used by OpenGL ES
headers. For desktop GL GL_APIENTRY has been defined as APIENTRY."
2010-04-28 21:22:44 +00:00
Robert Osfield
c019e2f76d Fixed typo 2010-04-28 21:10:29 +00:00
Robert Osfield
5435f6cf50 From Wang Rui, "Two small bugs were just found when I was writing examples for my book
in process: a wrong definition of the OSG_FATAL macro, and wrong logic
inside the KeySwitchMatrixManipulator::getDistance() function. I
believe both were slips."
2010-04-28 20:33:40 +00:00
Robert Osfield
0adf26ec6e From Wang Rui, "The osgManipulator serializers are ready now. I need to modify the
META_OSGMANIPULATOR_Object macro to ensure these classes could work
with their wrappers, and a few naming styles should be changed as
well. Fortunately everything seems to compile fine under Windows and
my new Ubuntu system.

And I finally find the problem of the
serializers/osgTerrain/Terrain.cpp, it just missed an "osg::Group"
before "osg::CoordinateSystemNode" indicator. With the small fix
attached now VPB could generate terrain with osgt/osgb formats."
2010-04-28 20:16:44 +00:00
Robert Osfield
8b8ca09ab1 Added support for passing options to the .dot plugin 2010-04-28 18:53:34 +00:00
Robert Osfield
dbbe73304a Added support for using graphviz dot for graphics visualization via <graph>filename</graph> token. 2010-04-28 14:56:38 +00:00
Robert Osfield
117d949d1f From Roland Smeenk and Robert Osfield, improvements to the indentation of comments. 2010-04-23 16:35:44 +00:00
Robert Osfield
5d0b84edd0 From Marcin Hajder, "This submission contains Texture2DMultisample osg implementation.
Texture2DMultismaple as name suggests provides means to directly access subsamples of rendered FBO target. (GLSL 1.5 texelFetch call).

Recently I was working on deferred renderer with OSG, during that I noticed there is no support for multisampled textures (GL_ARB_texture_multisample extension). After consultations with Paul Martz and Wojtek Lewandowski I added Texture2DMultisample class and made few necessary changes around osg::FrameBufferObject, osg::Texture and osgUtil::RenderStage classes."

and from follow email:

"Fixed. According to ARB_texture_multisample extension specification multisample textures  don't need TexParameters since they can only be fetched with  texelFetch."
2010-04-22 17:02:22 +00:00
Robert Osfield
9eebb2eb23 From Ulrich Hertlien with little bits from Robert Osfield and Chris Hanson, added provisionl support for controlling sync to vblank. 2010-04-21 17:16:13 +00:00
Robert Osfield
a475da35e3 From Mourad Boufarguine, "When compiling the example on VS9, the compiler complain about undefined GL_DEPTH_COMPONENT32F and GL_DEPTH_COMPONENT32F_NV. So I added them to include/osg/FrameBufferObject. The example builds fine and is working for me without crashs unless it is ran whithout argument. I added couple of lines to check for arguments number and print the example usage when needed." 2010-04-21 16:37:28 +00:00
Robert Osfield
7c38643a77 From Tim Moore, "I noticed that the "Materials" statistic in the camera scene stats display seemed to be identical to the number of drawables. In fact, it displays the nummat member of osgUtil::Statistics, but that variable has nothing to do with materials. nummat tracks the number of matrices associated with Drawable objects in a RenderBin; as I understand it, Drawables pretty much always have a model-view matrix tied to them in RenderBins, so this statistic doesn't seem very useful. So, I added statistics for the number of StateGraph objects in RenderBins and also for the number of Drawables in the "fine grain ordering" of RenderBins. The latter corresponds to the number of Drawables in the scene that are sorted by some criteria other than graphics state; usually that is distance for semi-transparent objects, though it could be traversal order. These two statistics give an idea of the number of graphic state changes happening in a visible scene: each StateGraph implies a state change, and there could be a change for each sorted object too. You can also subtract the number of sorted Drawables from the total number of Drawables and get an idea of how many Drawables are being drawn for each StateGraph.
"
2010-04-20 10:59:44 +00:00
Robert Osfield
92a6b0020d Changed the AbmientBias type from Vec2d to Vec2 as use of double is inappropriate. 2010-04-20 10:35:33 +00:00
Robert Osfield
a8c4fd8761 From Wang Rui, "The new osgShadow and osgFX serializers are attached, and some
modifications of the osgShadow header naming styles as well. The
osgDB::Serializer header is also changed to add new Vec2 serializer
macros because of the needs of osgShadow classes. It should compile
fine on both Windows and Linux. But I have only done a few tests to
generate .osgb, .osgt and .osgx formats with these new wrappers."
2010-04-20 10:29:04 +00:00
Robert Osfield
b1658ee6df From Farshid Lashkari, "I noticed that osg::State::getInitialViewMatrix returns the monocular view matrix when rendering in stereo. I've made some changes to osgUtil::RenderStage & SceneView so that it will return the correct view matrix depending on which eye is currently being rendered." & "I made a small change to the previous patch so that osg::State::getInitialViewMatrix works correctly with pre/post render stages as well." 2010-04-19 14:49:42 +00:00
Robert Osfield
a8332528f4 From Martins Innus,"Here's a fix to allow the serializer to compile on the Mac 10.4 SDK. The definition of GLint seems to be different accross the SDKs. Its defined as "long" in 10.4. I have no idea if this is the correct way to go about this, but it compiles on my end." 2010-04-19 12:09:21 +00:00
Robert Osfield
c0e9fcbb67 From Tim Moore, "This contains a couple of fixes to support changing FrameBufferObject configurations on the fly; the user changes the camera attachments and calls Renderer::setCameraRequiresSetUp(). The major part of this submission is a comprehensive example of setting up floating point depth buffers. The user can change the near plane value and cycle through the available combinations of depth format and multisample buffer formats." 2010-04-19 11:43:06 +00:00
Robert Osfield
488eac94f7 From Wang Rui, "Attached is the osgAnimation wrappers for serialize IO operations. A
few headers and the osgAnimation sources are also modified to make
everything goes well, including:

A new REGISTER_OBJECT_WRAPPER2 macro to wrap classes like
Skeleton::UpdateSkeleton.
A bug fix in the Seralizer header which avoids setting default values
to objects.
Naming style fixes in osgAnimation headers and sources, also in the
deprecated dotosg wrappers.
A bug fix for the XML support, to write char values correctly.
A small change in the osg::Geometry wrapper to ignore the
InternalGeometry property, which is used by the MorphGeometry and
should not be set by user applications.

The avatar.osg, nathan.osg and robot.osg data files all work fine with
serializers, with some 'unsupported wrapper' warnings when converting.
I'm thinking of removing these warnings by disabling related property
serializers (ComputeBoundingBoxCallback and Drawable::UpdateCallback),
which are seldom recorded by users.

By the way, I still wonder how would we handle the C4121 problem,
discussed some days before. The /Zp compile option is set to 16 in the
attached cmake script file. And is there a better solution now?"
2010-04-19 10:35:18 +00:00
Robert Osfield
c69ddd6bd5 Added BufferData::ModifiedCallback to provide a mechanism for tracking when a osg::Image::dirty() has been called to signify that an image has been modified. 2010-04-13 18:42:58 +00:00
Robert Osfield
88f1b8f19a From Michael Platings with tweaks from Robert Osfield, added Options::s/getPrecisionHint(..) to allow apps to hint to plugins about how to handle double precision geometry data. 2010-04-13 13:06:27 +00:00
Robert Osfield
51924431cd Fixed warnings 2010-04-13 09:42:53 +00:00
Robert Osfield
fccda08491 Added corner dirty options to TerrainTechnique, added experimental code paths in GeometryTechnique for accounting for neighbouring corner tiles - optionally compiled out in this check-in.
Changed the normal computation in GeometryTechnique so that it doesn't include diagonals, thus avoid normal jumps at corners.
2010-04-09 08:52:40 +00:00
Robert Osfield
c6c26d5d44 Change Terrain so that it subclassed from CoordinateSystemNode.
Implemented new update scheme of GeometryTechnique to avoid potential threading issues.

Added Terrain support to .ive.
2010-04-03 16:21:34 +00:00
Robert Osfield
656efbf03f Removed getNeighbours() method to avoid problems with introspection wrappers 2010-04-01 21:18:39 +00:00
Robert Osfield
a8bbf0a809 Added support for boundary equalization to GeometryTechnique 2010-04-01 21:06:56 +00:00
Cedric Pinson
35fa541350 Change time type from float to double in osgAnimation 2010-03-25 17:50:29 +00:00
Robert Osfield
ecf7a7e3e4 From Stephan Huber, "attached you'll find a small enhancement for GraphicsWindowCocoa. My
submision adds a getter for the pixel-format. I need this for some
custom software so I can integrate CoreVideo-playback with osg.
"
2010-03-25 14:14:46 +00:00
Robert Osfield
304214e0df Introduced the use of linear interpolation of evelvations when sampling 2010-03-25 11:11:35 +00:00
Robert Osfield
1319e270f6 Refactored the way that the RequestQueue's are pruned and highest prioty items taken from them so the operation is
now O(n) rather than O(nlogn) where n is the number of requests.  The refactoring also cleans up the access of the
request lists so that the code is more readable/maintainable.
2010-03-24 14:27:00 +00:00
Robert Osfield
d5aea9c0f2 Updated various serialization support for .osg, .osgt/b/x and .ive. 2010-03-16 18:44:27 +00:00
Robert Osfield
c4e82f0221 Added BlendingPolicy support into osgTerrain::Terrain. 2010-03-16 18:43:59 +00:00
Robert Osfield
1537af6235 Added osgTerrain::TerrainTile::set/getBlendingPolicy(BlendingPolicy) to enable control over whether the tile should have blending enabled on it. 2010-03-16 12:05:41 +00:00
Robert Osfield
d10ce23e62 Fixed recursive call due to missing _ 2010-03-15 20:09:23 +00:00
Robert Osfield
9015ff7084 Refactored Texture::Extensions to simplify it and make it more efficient. 2010-03-15 10:32:03 +00:00
Robert Osfield
7a44b43474 From Time Moore, "This submission implements 3 optimizations for meshes. INDEX_MESH turns DrawArrays style geometry into DrawElements, uniquifying the vertices in the process. This is useful for certain loaders, like ac3d, which just spit out DrawArrays. VERTEX_POSTTRANSFORM and VERTEX_PRETRANSFORM optimize mesh triangle and vertex order for the caches on a modern GPU, using Tom Forsyth's algorithm. I describe this and the big difference it makes (38% improvement on a very large mesh) in my blog,
http://shiny-dynamics.blogspot.com/2010/03/vertex-cache-optimization-for-osg.html."
2010-03-11 18:15:20 +00:00
Robert Osfield
6c07be375c Clean up of initialization of statics/use of getenv 2010-03-11 16:46:01 +00:00
Robert Osfield
9ab856323d Added export for PerContextShader. 2010-03-11 14:48:54 +00:00
Robert Osfield
1e1c79f257 Updated version 2010-03-10 16:31:15 +00:00
Robert Osfield
950d282f55 From Vincent Bourdier, addition of out of memory read result. 2010-03-10 14:28:18 +00:00
Robert Osfield
e082b01f26 From Wang Rui, "I've initially added the XML support of the new native osg format,
using osgDB::XmlParser. The extension for XML-formatted scenes is
.osgx, corresponding to .osgb for binary and .osgt for ascii. It could
either be rendered in osgviewer or edited by common web browsers and
xml editors because of a range of changes to fit the XML syntax. For
example, the recorded class names are slight modified, from
'osg::Geode' to 'osg--Geode'.

To quickly get an XML file:
# ./osgconv cow.osg cow.osgx

The StreamOperator header, InputStreram and OutputStream classes are
modified to be more portable for triple ascii/binary/XML formats. I
also fixed a bug in readImage()/writeImage() to share image objects if
needed.

The ReaderWriterOSG2 class now supports all three formats and
reading/writing scene objects (not nodes or images), thanks to
Torben's advice before.
"
2010-03-10 13:48:41 +00:00
Robert Osfield
6da42d9cd6 From Wang Rui, QWidgetImage class that enables QWidgets to be used as an interactive osg::Image that can be assigned to textures. 2010-03-10 13:24:53 +00:00
Robert Osfield
6ae2f4c6c6 From Sukender, "Here is my proposal. I fixed what Paul said, added some doxygen comments, added the function I told about, and removed the two "find('/')"-like calls to use only one." 2010-03-10 11:40:17 +00:00
Robert Osfield
bafe1d0b94 Added automatic updating of the OpenThreads version number from the CMake version numbers 2010-03-10 09:37:04 +00:00
Robert Osfield
c765a35650 From Wojcoech Lewandowski, "Attched are aimShadowCastingCamera() call changes, I have described in former post. Basically now MinimalShadowMap overrides first variant and keeps second. So both variants of aimShadowCastingCamera are clearly defined in MinimalShadowMap::ViewData scope. This way compilers have no problem and code looks less obscure. Changes made against the trunk." 2010-03-05 16:17:12 +00:00
Robert Osfield
86f491e649 Replaced use of unsigned int/enum mask combinations with int/enum mask combinations to avoid the need for casting enums to unsigned ints,
and to avoid associated warnings.

Update wrappers to reflect these changes.
2010-03-05 12:55:08 +00:00
Robert Osfield
273420bb1c Updated version and soversion numbers 2010-03-05 12:53:08 +00:00
Robert Osfield
5383297cbe Change Shader::getPCS(..) from protected to public scope to enable isCompiled() method to be accessible in applications.
Updated wrappers
2010-03-05 11:30:50 +00:00
Robert Osfield
4282b284e5 From Mathias Froehlich, Integration of osgText::Font with QFont to enable use of Qt fonts and selectors in osgText. 2010-03-04 12:43:09 +00:00
Robert Osfield
33b28a816e Added Export for new osgQt lib 2010-03-04 12:18:04 +00:00
Robert Osfield
1a1b7bd7a1 Moved QWebViewImage and QGraphicsViewAdapter into new osgQt utility library. 2010-03-04 12:15:35 +00:00
Robert Osfield
9f8a4be2cd Refactored DatabasePager so that it nolonger takes ref_ptr<PagedLOD>, but instead uses a custom version of observer_ptr<>.
This change should make it possible to delete PagedLOD's independantly from the DatabasePager, and also prevent issues of
consistency of the pager when subgraphs when are cached elsewhere in the application such as in the Registry filecache.
2010-03-03 16:40:19 +00:00