Commit Graph

1299 Commits

Author SHA1 Message Date
Robert Osfield
9d010e14fe From Paul Martz, "his pretty much wraps up the OcclusionQueryNode work. I might make some additional modifications if testing reveals any issues, otherwise it's ready for 2.4." 2008-01-10 11:02:21 +00:00
Robert Osfield
11db24e6b3 From Colin McDonald, build fixes for Solaris. 2008-01-08 18:13:06 +00:00
Robert Osfield
e73134d6fb Removed non standard and redundent /*EOF*/ 2008-01-08 14:38:58 +00:00
Robert Osfield
578f385760 From Mike Weiblen, support for geometry shaders, and osgeometryshaders example to demonstrate them. 2008-01-08 14:29:44 +00:00
Robert Osfield
ff565128af Introduced new osg::discardDeletedOpenGLObjects() methods, and usage of it in
GrpahicsContext::close() to handle cases where deletingOpenGLObjects is no possible,
such as when GraphicsWindowEmbedded is used.
2008-01-08 13:24:29 +00:00
Robert Osfield
5832dadb68 From Glenn Waldron, "I found that osg::Sequence::setDuration(speed,reps) was not changing the animation speed factor as expected. The one-line fix (line 312) is attached" 2008-01-04 15:33:21 +00:00
Robert Osfield
35d9107d81 Added catch for handling cases where undefined settings for dislayNum and screenNum are used 2008-01-04 13:57:36 +00:00
Robert Osfield
b222d4201c From Paul Martz, "The osgocclusionquery example contained some duplicate code that was also in the core OSG occlusion query code. This change removes the need for that." 2007-12-26 22:00:28 +00:00
Robert Osfield
93127866a8 From Sid Byce, fixes for compiling with gcc 4.3 2007-12-24 15:19:52 +00:00
Robert Osfield
e39bb04c62 From Jason Daly, "I'm still having a problem with SWING animations on sequences. Here's
the fix again, merged with this morning's svn (including the other
Sequence fixes from J-S)."
2007-12-24 14:45:31 +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
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
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
be5f709bdb From Mike Garrity, "There was an on again/off again thread on OSG users about
creating subclasses of osg::Array that referenced data
stored an application's internal data structures. I took
a stab at implementing that and ran into a couple of
downcasts in Geometry.cpp. Enclosed is my take at fixing
those along with a simple example of how to do this."
2007-12-11 15:55:02 +00:00
Robert Osfield
42723fec8f From Joseph Steel, "he change is to initializeExtensionProcs() to
verify the version of the OpenGL implementation before attempting to get the
MaxTextureCoords parameter."
2007-12-11 11:57:32 +00:00
Robert Osfield
880682f138 From Mathias Froelich, "I have cleaned up the state set handling of the osg::ClipNode.
Previously the complete StateSet was cleared, even the non clipping releted
state attributes and modes in this stateset on a call to
setLocalSetateSetModes.
With this change only those modes/attributes are changed that need to be
changed. That is, if a clip plane is removed from the ClipNode, only this
assiciated mode is removed from the state set, instead of throwing away the
whole state set.

In this way we have less surprising results if the state set of a clip node is
used for more state than just the clip state.
"
2007-12-11 11:55:15 +00:00
Robert Osfield
298e07fc72 From Mathias Froechlich, "I have extended the StateSet api with a
StateSet::removeAssociatedModes(const StateAttribute*)

and a

StateSet::removeAssociatedTextureModes(unsigned, const StateAttribute*)

call. These funktions are just missing for a complete api IMO."
2007-12-11 11:42:02 +00:00
Robert Osfield
4e5ce63c85 From Per Fahlberg, "Attached is a fix allowing removal of shaders from a program after it is
first compiled. It will also allow new shaders to be attached after the
program is first compiled."
2007-12-11 11:21:13 +00:00
Robert Osfield
c43606e3fe From Richard Schmidt, fix on ordering to be standard OpenGL way. 2007-12-10 20:33:22 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
0c4648e027 Added include<string.h> to fix compile errors under gcc 4.3 2007-12-10 10:16:13 +00:00
Robert Osfield
df2f9f5f7c From Ralf Karn, fixed "invalid enumerant" warning on TEXTURE_2D_ARRAY_EXT initialization 2007-12-09 16:14:07 +00:00
Robert Osfield
a0c2349438 From Mario Guimaraes, "Currently, in the StateSet::merge method, the rhs state attributes and
modes are not merged into the lhs state when the rhs is PROTECTED. The
changes I'm providing here address this problem."
2007-12-08 17:10:07 +00:00
Robert Osfield
2d4ef642e6 from Paul Matz, "Understood. Well, I think it's reasonable to assume that the non-env var
case is the more tested case, and therefore it is correct to set
_supportsVertexBufferObjects to the same value as _fastPath. So here's a
change that does the same thing for the env var case."
2007-12-08 17:00:38 +00:00
Robert Osfield
13e8af6305 From Robert Osfield and Richard Schmidt, made fixes inspired by an original submission from Richard which
highlighted problems with Light, ClipPlane and Hint usage in osg::State's usage of cloneType
and reassignment of target/num in StateSet/these StateAttributes.
2007-12-08 13:29:31 +00:00
Robert Osfield
1b1c5bbdd1 Added support for new double Vec*Array classes in various functors. 2007-12-04 14:46:46 +00:00
Robert Osfield
a909a62b85 Added double Vec*Array support 2007-12-04 14:44:21 +00:00
Robert Osfield
da9b845558 Added a check against the makeCurrent() return type to make sure that OpenGL
calls are only made if the makeCurrent() is successful.
2007-11-21 10:18:10 +00:00
Robert Osfield
6ad176042c Fixed bug in addSlave 2007-11-03 10:32:18 +00:00
Robert Osfield
316b36fab7 Added getColor method to allow easy reading of individual pixels. 2007-10-31 12:55:15 +00:00
Robert Osfield
8b46a624c2 Fixed errors is setup of VBO/EBO's. 2007-10-19 09:58:11 +00:00
Robert Osfield
cc2a0290a4 Fix for setting scene data after slaves have been added. 2007-10-19 08:42:44 +00:00
Robert Osfield
60052a0488 Fixed getOrCreateVertexBufferObject(). 2007-10-19 08:39:07 +00:00
Robert Osfield
7086aeeebc Removed log2 and replaced the places where is was used with a new Image::computeNumberOfMipmapLevels method. 2007-10-01 08:50:58 +00:00
Robert Osfield
5e504026a5 Changed copy constrcutor to a default constrcutor and std::copy to avoid
problems with dodge Sun compiler.
2007-09-27 10:42:56 +00:00
Robert Osfield
bd68958877 From Art Tevs, "Following
two lines has to be included into the Image.cpp in the
computeNumComponents(...) method:

case(GL_RGBA16F_ARB): return 4;
case(GL_RGBA32F_ARB): return 4;"
2007-09-24 09:26:21 +00:00
Robert Osfield
5c36fbb18f From David Callu, added findSlaveIndexForCamera method 2007-09-21 19:43:06 +00:00
Robert Osfield
3bfaee3654 Added support for basic viewer configuration files 2007-09-21 15:34:25 +00:00
Robert Osfield
7ea3632dfc Added support for bool in ArgumentParser::Parameter.
Added support for using Input::read(...) methods using ArgumentParser::Paramter
to adapter to multiple paramter types.
2007-09-19 15:29:57 +00:00
Robert Osfield
34af300957 Removed unncessary typedefs 2007-09-13 10:16:19 +00:00
Robert Osfield
0c5d6da793 Fixed warnings of casting void* by refactoring the type and extensiosn setup. 2007-09-13 10:15:48 +00:00
Robert Osfield
b2fe3d475b Fixed uint/int comparison warning. 2007-09-13 10:10:35 +00:00
Robert Osfield
041afdc303 Replaced allocateMipmap code with warning message as mipmaps aren't support for TextureRectangle. 2007-09-11 16:56:21 +00:00
Robert Osfield
291d253161 From Mathias Froenlich, "have a problem with the SunOS CC.
It does not like that the prototype of ClipNode::setStateSetModes() differs
from implementation of that function in  the constness of the second
parameter.
On SunOS it compiles fine, but I get link errors when the variant that is
declared in the header is referenced.

The attached src/osg/ClipNode.cpp file removes the const qualifier from the
implementation to match exactly the prototype in the header file.
The file is based on revision 7386 as of today.
"
2007-09-11 13:39:55 +00:00
Robert Osfield
175c3ce806 From Art Trevs, "File Changes:
- GL2Extensions, Program and Program.cpp

Features:
- Support for fragment output binding. (e.g. You can now specify in the fragment shader varying out vec3 fragOut; fragOut = vec3(1,0,1); to write to the fragOut variable. In your program you call glBindFragDataLocation(program, 1, "fragOut") to bind the fragOut variable with the MRT 1 - GL_COLOR_ATTACHMENT1_EXT)

- new methods Program::add/removeBindFragDataLocation Program::getFragDataBindingList

"
2007-09-11 13:34:41 +00:00
Robert Osfield
5e83ae4821 From Art Trevs, "Features of the patch are:
- Implementation of integer textures as in EXT_texture_integer

- setBorderColor(Vec4) changed to setBorderColor(Vec4d) to pass double values
as border color. (Probably we have to provide an overloading function to
still support Vec4f ?)

- new method Texture::getInternalFormatType() added. Gives information if the
internal format normalized, float, signed integer or unsigned integer. Can
help people to write better code ;-)

"

Futher changes to this submission by Robert Osfield, changed the dirty mipmap
flag into a buffer_value<> vector to ensure safe handling of multiple contexts.
2007-09-11 12:04:58 +00:00
Robert Osfield
98763cc4c5 From Rafa Giatan, "Changed int to GLsizei in the input parameter of the method
osg::Texture2DArray::applyTexImage2DArray_subload inside
Texture2DArray (lines 214 and 257), Otherwise it gives a compile
error on MacOSX."
2007-09-11 10:16:21 +00:00
Robert Osfield
bea07b5f72 From Mike Wittman and Robert Osfield, added support for SO_VERSION number in
runtime version info.  Added checks for OpenThreads version.
2007-09-11 10:10:43 +00:00
Robert Osfield
409cdd0b28 Intoduced a new setGLExtensions template method to do a copy of void* pointer to
local function pointer to avoid compiler warnings related to case void*.

Moved various OSG classes across to using setGLExtensions instead of getGLExtensions,
and changed them to use typedef declarations in the headers rather than casts in
the .cpp.

Updated wrappers
2007-09-10 15:19:23 +00:00
Robert Osfield
91983cbe71 Fixed typo 2007-09-08 07:04:27 +00:00