Commit Graph

1344 Commits

Author SHA1 Message Date
Robert Osfield
d75cd032b9 From Jean-Sebastien Guay, replaced M_PI with osg::PI. 2008-11-08 17:53:51 +00:00
Robert Osfield
720551d549 From Michael Platings, Converted std::fstream/ifstream/ofstream to osgDB::fstream/ifstream/ofstream and
fopen to osgDB::fopen to facilitate support for wide character filenames using UT8 encoding.
2008-11-07 15:08:08 +00:00
Robert Osfield
c7c1913561 From Ulrich Hertleinm "cmake 2.6 is having trouble on Mac OS X because example/CMakeLists.txt addes subdirectory osgviewerGLUT twice. I took the liberty to remove the second occurrence.
"
2008-11-06 13:40:35 +00:00
Robert Osfield
c80c7dd5b9 From Chris Denham, added transform to cube to test picking fixes 2008-11-06 13:36:25 +00:00
Robert Osfield
239c18eddb Removed redundent static ImageStream pointer 2008-11-05 16:06:25 +00:00
Robert Osfield
a063d1dfb0 Added --no-rescale, --rescale (default) and --shift-min-to-zero command line options for controlling how the pixel data is managed. 2008-11-05 15:59:48 +00:00
Robert Osfield
de4e08e868 Added --replace-rgb-with-luminance option 2008-11-05 15:04:38 +00:00
Robert Osfield
bc2e8034fe Fixed --images commandline parsing 2008-11-04 12:57:30 +00:00
Robert Osfield
9bba7bbee0 Refactored osgvnc example to utilise the new vnc plugin 2008-11-03 15:58:02 +00:00
Robert Osfield
521a951b58 Wrapped up the various client streaming methods + thread into VncImage classes. 2008-10-31 16:48:19 +00:00
Robert Osfield
f1cc01c6b8 Implemented keyboard and mouse dispatch from vnc client to vnc server. 2008-10-31 13:59:32 +00:00
Robert Osfield
bad9854d71 Added very basic osgvnc example that uses the LibVNCServer client libries for implementing a vnc client
as an osg::Image with the vnc data stream going to it.
2008-10-31 12:03:44 +00:00
Robert Osfield
4b28e22d34 From Lukas Diduch, added a multithread compsite viewer path, accessible using:
osgviewerQT --MTCompositeViewer --QOSGWidget cow.osg
2008-10-29 10:25:24 +00:00
Robert Osfield
649bc16753 From James Moliere, fixed display of axis 2008-10-29 10:12:02 +00:00
Robert Osfield
0b451491b0 From Chris Denham, changed nested Camera intersection test so that it requires the command line --relative-camera-scene to enable it 2008-10-27 19:59:05 +00:00
Robert Osfield
ff74744556 From Chris Denham, default scene that tests the use of in scene graph Camera which has a RELATIVE_RF ReferenceFrame. 2008-10-27 16:16:28 +00:00
Robert Osfield
b1c858d8f8 Fixed positioning of wings 2008-10-27 10:40:13 +00:00
Robert Osfield
10186190f6 Introduced support for controlling mipmapping of osgTerrain::ImageLayer and compression of osgTerrain::HeightFieldLayer. 2008-10-20 08:43:25 +00:00
Robert Osfield
36a93d9cf3 Converted M_PI* usage across to osg::PI 2008-10-14 16:44:14 +00:00
Robert Osfield
8c6f65caca From James Moliere,
"   The code below is to show how a heirarchy of objects can be made within a scenegraph.
    In other words, how there can be a parent/child relationship between objects such
    that when a parent is rotated or translated, the children move is respect to it's
    parent movement.  A robotic arm is used in this example because this is what I'm
    using OSG for."
2008-10-14 15:24:39 +00:00
Robert Osfield
e4057b65ee Removed geomoflife_frag.cpp experiement from CMakeList.txt file 2008-10-14 15:10:10 +00:00
Robert Osfield
3aebed206e From J.P Delport, game of life example that demonstrates ping pong render to texture rendering 2008-10-14 14:58:10 +00:00
Robert Osfield
907a51b198 Replaced usage of depreacted IntersectVisitor with IntersectionVisitor 2008-10-07 14:01:14 +00:00
Robert Osfield
1f4e712fd8 Improved the ImageSequence::setLength() settting. 2008-10-06 17:03:32 +00:00
Robert Osfield
3b4184295e Various improvements to the dicom loader to be able to handle a broader range of dicom files 2008-10-02 15:45:08 +00:00
Robert Osfield
66c857b645 Updated shaders 2008-09-29 18:30:17 +00:00
Robert Osfield
d4c6af753f Added support for using ImageSequence to animate volumes 2008-09-29 10:56:42 +00:00
Robert Osfield
38171cc1b9 Improved the isosurface shaders, and mde GLSL usage the default 2008-09-28 15:16:13 +00:00
Robert Osfield
d8cfc9b1f5 Improved GLSL isosurface support when using a transfer function 2008-09-26 15:47:31 +00:00
Robert Osfield
21865d3ec1 Added setting of various filters and setResizeNonPowerOfTwoHint(false) on normals maps etc. 2008-09-26 14:50:41 +00:00
Robert Osfield
5a9e957412 Added docs for read-threads <numthreads> command line options 2008-09-26 13:51:49 +00:00
Robert Osfield
026314bf83 Added --isosurface and --mip paths into osgvolume example, and added associted shaders 2008-09-26 11:29:00 +00:00
Robert Osfield
90ccb05fb1 From Mathias Froehlich, "for the rand functions stdlib.h is required ..." 2008-09-26 11:19:59 +00:00
Robert Osfield
a3d25add27 Added osg2cpp example into build 2008-09-25 14:41:27 +00:00
Robert Osfield
8c276a0b5e Created new osg2cpp utility that creates .cpp files from source shaders that can be included directly in application code, see osgvolume for an example. 2008-09-25 14:39:57 +00:00
Robert Osfield
134a2e69a0 Moved shaders into .cpp, with the shaders created by the new osg2cpp utility 2008-09-25 14:39:08 +00:00
Robert Osfield
4cb79dcddf From Jean-Sebastian Guay, fixed windows build 2008-09-24 16:03:47 +00:00
Robert Osfield
62331769ac Added shader based transfer function, enabled via --gpu-tf 2008-09-24 10:45:15 +00:00
Robert Osfield
169d9f550e Fixed transfer function parsing 2008-09-24 10:20:23 +00:00
Robert Osfield
edc966c4c2 Added "serialize" and plugin "preload" options in the "read-threads" code path. 2008-09-23 15:41:49 +00:00
Robert Osfield
1b02cf99dc Added read-threads <numThreads> command line and read thread test back end 2008-09-23 13:58:49 +00:00
Robert Osfield
b1c93f05f6 From Wojciech Lweandowski, added support for noew LispSM shadow technique (use --lispsm on CmdLine) and added IslandScene database (use -4 on CmdLine). 2008-09-23 09:59:23 +00:00
Robert Osfield
55d4756d31 Added support for reading raw data and transfer function from a volume header 2008-09-22 17:24:26 +00:00
Robert Osfield
65cb2e625f Added --page-and-discard, --page-and-retain, --preload and --length command line options 2008-09-22 16:18:02 +00:00
Robert Osfield
260334e4fe Added stats handler 2008-09-22 15:56:22 +00:00
Robert Osfield
21686c27af From Mathias Froehlich, "I did some performance test runs with the development gcc-4.4 version.
To make it compiel with future gcc's we sppear to need the attached missing
includes ..."
2008-09-18 10:52:35 +00:00
Robert Osfield
274aa49f8a From Christophe Loustaunau,"
I have found some errors on the example osgGeometryShaders. It's about the varying in the geometry shader.
take a look at the varying vec4 v_color.
In the vertex shader, v_color is initialized to gl_vertex
then in the geometry shader v_color is initialized to gl_PositionIn[0]
and in the fragment shader v_color is used as the fragment color.

Try to initialized v_color to vec4(1.0, 0.0, 0.0, 1.0) in the vertex shader and comment the line :
"    v_color = v;\n"  in the geometry shader, and you will see the lines as black !

It's because you have to use keywords in and out.

extract from : http://www.opengl.org/registry/specs/EXT/geometry_shader4.txt :

in - for function parameters passed into a function or for input varying
variables (geometry only)

out - for function parameters passed back out of a function, but not
initialized for use when passed in. Also for output varying variables
(geometry only).

Then for a geometry shader, a varying must be an array :
extract from : http://www.opengl.org/registry/specs/EXT/geometry_shader4.txt :

Since a geometry shader operates on primitives, each input varying variable needs to be
declared as an array. Each element of such an array corresponds to a
vertex of the primitive being processed. If the varying variable is
declared as a scalar or matrix in the vertex shader, it will be a
one-dimensional array in the geometry shader. Each array can optionally
have a size declared. If a size is not specified, it inferred by the
linker and depends on the value of the input primitive type.


Here is a patch based on the svn version of osg that correct that.
"
2008-09-17 17:25:39 +00:00
Robert Osfield
22eae68e48 From Mathias Froehlich, "This is a generic optimization that does not depend on any cpu or instruction
set.

The optimization is based on the observation that matrix matrix multiplication
with a dense matrix 4x4 is 4^3 Operations whereas multiplication with a
transform, or scale matrix is only 4^2 operations. Which is a gain of a
*FACTOR*4* for these special cases.
The change implements these special cases, provides a unit test for these
implementation and converts uses of the expensiver dense matrix matrix
routine with the specialized versions.

Depending on the transform nodes in the scenegraph this change gives a
noticable improovement.
For example the osgforest code using the MatrixTransform is about 20% slower
than the same codepath using the PositionAttitudeTransform instead of the
MatrixTransform with this patch applied.

If I remember right, the sse type optimizations did *not* provide a factor 4
improovement. Also these changes are totally independent of any cpu or
instruction set architecture. So I would prefer to have this current kind of
change instead of some hand coded and cpu dependent assembly stuff. If we
need that hand tuned stuff, these can go on top of this changes which must
provide than hand optimized additional variants for the specialized versions
to give a even better result in the end.

An other change included here is a change to rotation matrix from quaterion
code. There is a sqrt call which couold be optimized away. Since we divide in
effect by sqrt(length)*sqrt(length) which is just length ...
"
2008-09-17 16:14:28 +00:00
Robert Osfield
0598ac3b69 Updated osgwidget examples to use the new osg::clone() methods 2008-09-17 14:23:25 +00:00
Robert Osfield
6ea2adf1f5 Introduced beginings of osgVolume NodeKit. 2008-09-16 15:32:23 +00:00