Commit Graph

1092 Commits

Author SHA1 Message Date
Robert Osfield
fd2ffeb310 Renamed osg::CameraNode to osg::Camera, cleaned up osg::View.
Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
2006-11-27 14:52:07 +00:00
Robert Osfield
d0df2df7ad Replaced the setTextureUnit(0) call in State::reset() with code that just
sets the member variables without requiring a graphics context.
2006-11-21 16:59:04 +00:00
Robert Osfield
2151573ccd From Michael Platings, Fixed Geometry cloning of the texture
coordinates and vertex attributes.
2006-11-16 16:25:29 +00:00
Robert Osfield
d0cc014f1b Further migration to using RenderInfo 2006-11-14 12:51:31 +00:00
Robert Osfield
7cb1bcbd7d From Farshid Lashkari, "This patch adds a CoordOriginMode to the osg::PointSprite attribute.
The mode needs to be changed to LOWER_LEFT when rendering point
sprites to pbuffers or FBOs, otherwise the points will be transformed
on the CPU."
2006-11-14 12:29:54 +00:00
Robert Osfield
c3f3093ecc From John Kelso, add support for default frame time for children of a Sequence node 2006-11-10 15:25:04 +00:00
Robert Osfield
c5c4c5da1d From Edgar Ellis, "
method may not take the node into consideration when computing its bound.

In this case of:
switch->insertChild(0, child, false);
switch->insertChild(1, child, true);

child will not be used in computeBound, but will be drawn.

Solution:
Changed compute bound to loop over children using an index instead of an
iterator. This behaviour matches that of the traverse method."

-----------------------------------------------
2006-10-30 12:14:00 +00:00
Robert Osfield
f257285efc From Chuck Seberion, added support reading ARB float format textures. 2006-10-14 21:50:29 +00:00
Robert Osfield
660cda57c8 From Terry Welsh, mplemented POINT_ROT_EYE. 2006-10-14 21:47:13 +00:00
Robert Osfield
97fc2dfa21 Fixed texture coordinates of cylinder ends. 2006-10-14 10:07:21 +00:00
Robert Osfield
842b96bbc9 From Colin McDonald, "I've included render bin checks in the StateSet::compare function, because
without them the Optimizer can incorrectly eliminate (otherwise identical)
StateSets from different render bins."
2006-10-02 15:59:43 +00:00
Robert Osfield
e0599f652e Added releaseGLObjects to NodeCallbacks, Drawable::DrawCallbacks and wired up
osgProducer to use it when doing cleanup_frame.
2006-10-02 15:38:31 +00:00
Robert Osfield
eb68735ff9 From Farshid Lashkari, "The ColorControl of osg::LightModel is never applied because it
incorrectly checks for a valid OpenGL version. Instead of checking if
the current version is exactly 1.2, it will check if the version is
greater than 1.2."
2006-10-02 13:40:58 +00:00
Robert Osfield
35d134f712 From Farshid Lashkari, added function for querring whether a mode is a texture related mode or not. 2006-09-21 10:01:27 +00:00
Robert Osfield
0dcf5271f1 Added missining initialization of _radius in constructors 2006-09-20 13:41:33 +00:00
Robert Osfield
cc202c1b6d Updates for fade text to work properly, but only in perspetive views at present. 2006-09-20 10:36:21 +00:00
Robert Osfield
def74d3471 Introduced new osg::View, and osg::RenderInfo classes into the core OSG to help
handle scenes with multiple views with elements that need coordinating on a per view basis.

Added beginings of new osgText::FadeText class (not functionality yet).
2006-09-18 20:54:48 +00:00
Robert Osfield
c7906d5412 Added a check for zero length line segment in bool LineSegment::intersect(const BoundingSphere& bs,float& r1,float& r2) const. 2006-09-12 12:35:20 +00:00
Robert Osfield
5915584b37 Revised the osg::ClampColor API to allow vertex, fragment and read color clamping to
be applied together.
2006-09-12 09:26:42 +00:00
Robert Osfield
daa54a3b09 From Farshid Lashkari,
"I've made some changes to osg which I think make it easier to control
the render order of CameraNode's. Instead of using the built-in orders
(PRE_RENDER, POST_RENDER, NESTED_RENDER), you can specify an integer
order. Values less than zero are pre rendered in order. Values greater
than zero are post rendered in order. And a value of 0 is equivalent
to NESTED_RENDER.

The changes should be fully backward compatible. Also, I changed the
RenderStageList type from a vector to a list because I needed to be
able to insert values anywhere in the list.

The reason I made these changes was because I wanted to be able to set
the render order of a CameraNode at runtime without having to reorder
it in the scenegraph."

and later in the final submission message (relating to what has been finally been merged)    :

"I've rethought my implementation and came up with something a little
better. The setRenderOrder will continue to take an enum, but will
have an optional orderNum parameter which can be both positive and
negative. I think this method is more intuitive and flexible."
2006-09-04 13:15:08 +00:00
Robert Osfield
f0277df858 Added osg::TexMat::s/getScaleByTextureRectangleSize feature that allows
one to use the osg::TexMat to automatically scale non dimensional tex coordinats to
the size of the last texture rectangle applied.
2006-09-04 12:46:49 +00:00
Robert Osfield
87a221445e Updated version numbers of the up comming 1.2 release 2006-08-31 20:54:28 +00:00
Robert Osfield
113c1dfc3e From Eric Wing, "Attached is a change for GLExtensions.cpp that allows OS X to use
dlopen/dlsym instead of NS*Symbol* functions for 10.3 or later. The
latter is now deprecated.

I'm not completely sure how to test the changes. But I compiled these
new changes in and ran the osgvertexprogram and osgshaders examples
and they seemed to display the same results as before.

With respect to the use of dlopen and dlsym, I was uncertain if the
usage should look like Sun or FreeBSD (or something else). Apple's man
pages discourage the use of RTLD_DEFAULT so I avoided the FreeBSD
implementation and copied the Sun implementation. I'm not sure if this
is correct/ideal or not."
2006-08-31 20:48:49 +00:00
Robert Osfield
179f6100a0 Added missing setDataType and setPacking functions 2006-08-25 15:49:29 +00:00
Robert Osfield
0900857333 From Farshid Lashkari,
"I was experiencing hard crashes of my application when using PBO's on
machines that don't support PBO's. I think osg incorrectly checks if
PBO's are supported.

I added a new method to the BufferObject::Extensions class which
returns if the "GL_ARB_pixel_buffer_object" string is supported. This
fixes the problem on my end. Machines without PBO support will
continue to work and machines with PBO support will still be able to
use it."
2006-08-25 08:48:16 +00:00
Robert Osfield
1413eea52c Add error message report to catch attempts to flip mipmap images. 2006-08-24 16:33:23 +00:00
Robert Osfield
be60b32add Fixed texture optimization problem associated with mixing already compiled scene graphs - resulting
in incorrect texture assignment.  Solution was to a compareTextureObjects() test to the Texture*::compare(..) method that
the osgUtil::Optimizer::StateSetVisitor uses to determine uniqueness.
2006-08-14 19:42:22 +00:00
Robert Osfield
a16568254c Moved reset to 0 of _createReuseMatrixIndex from CullVistor.cpp to CullStack.cpp so that
CullStack::reset works correctly for all subclasses - fixing a memory consumption issue with occluders
2006-08-12 18:19:43 +00:00
Robert Osfield
132f9ead45 Updated version number for 1.1.1 release 2006-08-12 08:29:16 +00:00
Robert Osfield
306743c903 Fixed bug in Group::setChild relating to the accounting for OccluderNode. 2006-08-11 12:53:57 +00:00
Robert Osfield
b832453c10 From Uwe Woessner, implementated by Robert Osfield, Fixed vertex attribute bug, changed _vertexAttribList[unit] -> _vertexAttribList[index] 2006-08-04 13:17:56 +00:00
Robert Osfield
7ef12b37b5 Changed:
static TextureGLModeSet s_textureGLModeSet;

To:

  static TextureGLModeSet& getTextureGLModeSet()
  {
      static TextureGLModeSet s_textureGLModeSet;
      return s_textureGLModeSet;
  }

to prevent static initialization problems under static builds.
2006-08-03 13:35:21 +00:00
Robert Osfield
0336231321 Moved extension function pointer initilization into a method, and the pointers from
being static to be local member variables.  This should avoid issues under Windows
with multiple graphics contexts have seperate entry points.
2006-08-02 16:14:17 +00:00
Robert Osfield
4d556c0ec4 Reworked the TextureObjectManager singleton so that it no longer reconstructed itself once deleted, and added checks to against a null manager to prevent calling code crashing. 2006-08-02 15:41:47 +00:00
Robert Osfield
564ee34f76 Added Matrix*::getRotate()/setRotate(Quat), deprecating Matrix*::get(Quat&), Matrix*::set(Quat&) 2006-07-31 17:31:21 +00:00
Robert Osfield
f977d7c606 Updated osgunittests with a matrix invert unit test, and added a conditional
calling of invert_4x4 or invert_4x3 depending on the the right hand column of the matrix.

Updated wrappers
2006-07-28 13:48:08 +00:00
Robert Osfield
a5ea4e0b33 From David Spilling, "Matrix_implementation.cpp modified as requested. I ran a version of it through a local version of osgunittests.cpp and it passes.
Note that firstly it always returns the positive real quaternion (positive w)

Note also that it will sometimes slightly differ from the results of the other methods because it assumes that the input matrix really is a rotation matrix - if it isn't, e.g. because of rounding error, then the output quaternion will be very slightly different. For example, the test matrix

0 1 0 0
1 0 0 0
0 0 0.999999 0
0 0 0 1

will return 0.707107 0.707107 0.0005033 0.0005033

whereas the previous methods return 0.707107 0.707107 0.0 0.0

However, since quaternions are rotations, the meaning of how to convert a matrix that isn't a rotation is a little unclear..."
2006-07-27 15:23:50 +00:00
Robert Osfield
3e8af92da1 From David Spilling, fix to Matrix::get(Quat&) 2006-07-27 11:14:28 +00:00
Robert Osfield
d9b6d87d5a Cleaned up per context buffers support 2006-07-26 15:29:26 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
419e185895 From Eric Wing, add alternate backdrop implementations.
From Robert Osfield, updated naming  and copy constructor methods.
2006-07-18 12:24:04 +00:00
Robert Osfield
a74801a0ee Added Optimizer::FlattenBillboardsVisitor. 2006-07-18 11:03:46 +00:00
Robert Osfield
2ef59b73e9 Change Unit to Units to keep consistent with OpenGL naming. 2006-07-17 11:43:26 +00:00
Robert Osfield
e8235f6967 Changed the Radeon defaults to 1, 128 for the factor and unit mulitpliers respectively. 2006-07-17 10:24:31 +00:00
Robert Osfield
9f81ef8561 Implemented Radeon workaround for polygonoffset 2006-07-14 14:38:55 +00:00
Robert Osfield
4bae225d39 Added s/getFactorMultiplier(), s/getUnitMultiplier(), areUnitAndMultipliersSet() and
setFactorAndUnitMultipliersUsingBestGuessForDriver() static methods to
osg::PolygonOffset to help implement workarounds for lack of portablity of
settings between different hardware.
2006-07-14 14:08:33 +00:00
Robert Osfield
0b32213394 From Eric Sokolowsky,
"If a texture is used that is not a multiple of four, and compression
was requested through the texture's internal format, the texture's
internal format reverts to a non-compressed type and a NOTICE is given.
At present, compressed textures must have a multiple of four in each
dimension."
2006-07-06 14:14:19 +00:00
Robert Osfield
865ee4429c From Eric Sokolowsky,
"Attached is some fixes for Image::readImageFromCurrentTexture. It was
failing when used with a new Image object (some of the fields were
not set before they were used, and some were set to the wrong values).
A new optional parameter was added to give the desired data type, which
defaults to GL_UNSIGNED_BYTE, so programs should only need a recompile
to work properly."
2006-07-06 14:02:14 +00:00
Robert Osfield
88609a5eee Updated version numbers for 1.1 release 2006-07-06 10:28:12 +00:00
Robert Osfield
d7f1c34df8 From Eric Sokolowsky, "The attached Texture.cpp fixes a problem when subloading compressed
textures.  Near the top of the function that implements texture
subloading, osg::Texture::applyTexImage2D_subload(), the local variable
compressed_image examines the _image's_ pixel format to see if it is
compressed. However, further on, in calls to getCompressedSize() the
_texture's_ pixel format is used. In my application's Texture2D class,
I use osg::Texture::USE_ARB_COMPRESSION to
osg::Texture2D::setInternalFormatMode(), which causes the internal format
to become one of the generic ARB_COMPRESSED types, which do not have a
specific size. Thus the recent warning message added to
osg::Texture::getCompressedSize() is triggered. The correct behavior is
to use the format mode from the Image class instead of the Texture class
within the subload implementation, and then the size is calculated
correctly."
2006-07-05 21:52:36 +00:00