Commit Graph

1975 Commits

Author SHA1 Message Date
Robert Osfield
8b06c30691 Fixed Coverity issue.
CID 11666: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glMultiTexCoord1dv is not initialized in this constructor nor in any functions that it calls.
Non-static class member _glVertexAttrib1dv is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:14:03 +00:00
Robert Osfield
d4be7a19eb Updated SO version as the osgText and osgQt libraries API have changed, albeit only by a small amount. 2011-05-13 19:19:00 +00:00
Robert Osfield
77057d06ab Warning and build fixes 2011-05-12 18:52:18 +00:00
Robert Osfield
f7699a3bfd Added newline to end of file 2011-05-12 18:40:18 +00:00
Robert Osfield
c9f5be090a Updated version number to 2.9.15 after dev release 2011-05-08 12:06:25 +00:00
Robert Osfield
cb5a8495a7 Updated SO version number for dev release 2011-05-06 09:26:14 +00:00
Robert Osfield
12b56726d2 Fixed Coverity reported issues.
CID 10392: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.

CID 10454: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.

CID 10505: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.

CID 10919: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.

CID 10920: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
2011-05-06 09:21:04 +00:00
Robert Osfield
41eb850578 Fixed Coverity reported issue.
CID 11447: Unchecked dynamic_cast (FORWARD_NULL)
Dynamic cast to pointer "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))" can return null.
Assigning null: "first" = "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))".

The clone() implementation is written using macro's so that it always returns the type of Object
being cloned so it's normally safe to assume that a dynamic_cast<> will always return a valid pointer as long
as the new T that involves creates a valid object.  However, if the class being cloned doesn't correctly
implement the clone() method then their potential for the dynamic_cast to fail and will return a NULL and will
result in a memory leak of the object of paraent class that the clone would have defaulted to.

I've tightened up the CopyOp.cpp code to check the return type and added better handling of the clone in the
osg::clone() methods so thay don't have any potential mememory leaks and report warnings to OSG_WARN when
problems are encountered.  It may be more apporpriate to throw an exception so will need to ponder this
issue further.
2011-04-28 16:33:14 +00:00
Robert Osfield
7c49e69042 Updated version after 2.9.13 dev release 2011-04-26 15:24:21 +00:00
Robert Osfield
a793958836 From Johannes Baeuerele, "I have extended the pvr reader plugin to support etc1 compression(GL_ETC1_RGB8_OES). The changes attached to this submission are based on today's trunk.
The pvr format which can be used as a wrapper for different compressed and uncompressed formats supports this compression algorithm. The original pvr compression uses the pvrtc format. The handling of pvrtc is already implemented in the pvr plugin. PVR provides wrapper functionality for some formats, e.g. etc or even dxt/dds.

Our target system (gles2) is able to use the etc compression format. With minor changes in the submitted files, there is no need to write a separate plugin. However the original pvr texture compression formats are not supported on our target, which is the reason for this extension.

The changes mainly consist in the definition on new enum values in the classes and headers of ReaderWriterPVR,Image and Texture. I also found some locations where the handling of the original pvr textures was not implemented. These are also part of this submission."
2011-04-21 17:04:50 +00:00
Robert Osfield
634344aef5 From Marius Heise, "here is a patch that implements Win32 HW-synced swapping using wglJoinSwapGroupNV, wglBindSwapBarrierNV and the existing traits. It was tested with multiple ATI FirePro S400 cards.
I also fixed the vsync implementation introduced with rev.11357 that was crashing with the Windows Error #170. So I removed your temporary /* */ around the vsync condition..."
2011-04-21 13:34:03 +00:00
Robert Osfield
478e0f3ebf From Jorge Ciges, "1rst - Changes in Cmake: They make possible "make install" with the android building.
2nd - Script to use a 3rd party directory with basic libraries: libjpeg,libpng,libtiff,giflib,freetype,curl,gdal.

3rd - Change in the GLES library loading for Android. That should make GLES2 work properly.

4rth- Included two defines RGB8_OES and RGBA8_OES as a substitute in GLES for RGB8 and RGBA8

5th - OpenGL and GLSL version identification changed to recognize GLES  versions properly
"
2011-04-21 12:53:22 +00:00
Robert Osfield
70aa087f6e Added releaseGLObjects(State*) support into osg::FrameBufferObject, osg::RenderBin and osg::RenderStage
to ensure proper clean up of FBO's on closing a graphics context.
2011-04-20 11:45:01 +00:00
Robert Osfield
581e6fb630 Ran svn propset -R svn:eol-style native . on the OpenSceneGraph 2011-04-19 11:40:22 +00:00
Robert Osfield
8ffa50a88e Added IncrementalCompileOperation::compileAllForNextFrame(uint) method and supporting
functionality that  tell the IncrementalCompileOperation to compile all pending objects during next draw traversal,
for specified number of frames.
2011-04-18 12:35:19 +00:00
Robert Osfield
e7e860b742 Added support for explitly requesting DXT1a and DXT1c compression 2011-04-11 19:11:25 +00:00
Robert Osfield
31926f3329 Added OSG_EXPORT to declaration of View::Slave. 2011-03-15 13:30:27 +00:00
Robert Osfield
5447e70b68 Updated versions for next OSG dev release 2011-03-09 11:06:36 +00:00
Robert Osfield
b24353b12c From Rafa Gaitan and Jorge Izquierdo, build support for Android NDK.
"- In order to build against GLES1 we execute:
$ mkdir build_android_gles1
$ cd build_android_gles1
$ cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NDK=<path_to_android_ndk>/
-DOSG_GLES1_AVAILABLE=ON -DOSG_GL1_AVAILABLE=OFF
-DOSG_GL2_AVAILABLE=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DJ=2
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF
$ make
 If all is correct you will have and static OSG inside:
build_android_gles1/bin/ndk/local/armeabi.

- GLES2 is not tested/proved, but I think it could be possible build
it with the correct cmake flags.
- The flag -DJ=2 is used to pass to the ndk-build the number of
processors to speed up the building.
- make install is not yet supported."
2011-03-08 16:35:37 +00:00
Robert Osfield
1525f3cd4e Added support for an View::Slave::UpdateSlaveCallback 2011-03-01 14:48:48 +00:00
Robert Osfield
6f09acace9 Moved ProgramBinary into osg::Program scope 2011-02-14 15:01:56 +00:00
Robert Osfield
1d55efb721 From Michael Platings, I've added initial support to osg for glGetProgramBinary and glProgramBinary. This means that shader programs can now be cached to disk and later reloaded, which is much faster than linking shaders from source code. This should mean significantly shorter load times for people who use lots of combinations of shaders. 2011-02-14 12:54:21 +00:00
Robert Osfield
4b4754c3cf Implementated experimental reuse of PBO's after download 2011-02-07 14:19:58 +00:00
Robert Osfield
6496e35421 Moved GraphicsCostEstimator ref pointer into osg::State 2011-02-03 12:42:23 +00:00
Robert Osfield
88ce98b47d Moved GraphicsCostEstimator from osgUtil into core OSG library 2011-02-03 12:22:09 +00:00
Robert Osfield
abea92ee91 From Mathias Froehlich, build fixes 2011-01-24 21:12:25 +00:00
Robert Osfield
6d1944b9e2 From Matthew Johnson-Roberson, "Small fix for operation thread to protect the access to _operations vector by functions getNumOperationsInQueue() and empty(). It is simply an addition of OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
to protect against accessing while writing which was segfaulting in VPB
specifically in void ThreadPool::run(osg::Operation* op)
in the waiting loop

while (_operationQueue->getNumOperationsInQueue() >= _maxNumberOfOperationsInQueue)
"
2011-01-20 12:32:20 +00:00
Robert Osfield
45bd464942 Added getNum methods 2011-01-17 09:10:14 +00:00
Robert Osfield
7c30f204e8 Updated so version number 2011-01-13 18:49:12 +00:00
Robert Osfield
f61a6aa4e7 Refactored the way that the DatabasePager passes the Terrain decorator node onto the TerrainTile.
The DatabasePager now passes the Terrain pointer into the ReaderWriter's via osgDB::Options object,
rather than pushing a NodePath containing the Terrain onto NodeVisitor.  This
change means that the DatabasePager nolonger needs to observer the whole NodePath and
will be lighter and quicker for it.

The change also means that ReadFileCallback can now run custom NodeVisitor's on the scene graph without
having to worry about TerrainTile's constructing scene graphs prior to the Terrain being assigned.

Also changed is the NodeVisitor::DatabaseRequestHandler which now requires a NodePath to the node that you wish
to add to rather than just the pointer to the node you wish to add to.  This is more robust when handling scenes
with multiple parental paths, whereas previously errors could have occurred due to the default of picking the first
available parental path.  This change means that subclasses of DatabasePager will need to be updated to use this new
function entry point.
2011-01-12 19:29:24 +00:00
Robert Osfield
652c274d09 From Chris Hanson, "As an extension to this excellent work:
http://forum.openscenegraph.org/viewtopic.php?t=7285

 This file adds the same string API wrapper to the State object for other older apps that
track Uniforms by string. The original comment about performance is preserved."
2011-01-11 17:18:44 +00:00
Robert Osfield
d644a6dfe3 Added osg::Geometry::verifyArray(std::ostream&) method to enable checks to be done on osg::Geometry to see if the arrays
are big enough to handle the primitives used in the geometry.

Added usage of verifyArray into osgfilecache so that it reports any problems on reading files in paged database.
2011-01-03 19:41:06 +00:00
Robert Osfield
410b4fd109 Converted FrameStamp::g/setFrameNumber from int to uint 2010-12-22 20:11:05 +00:00
Robert Osfield
c9c329e7c4 Moved the GL3 include to within the code block that handles GL1/GL2 2010-12-20 12:17:40 +00:00
Robert Osfield
95feb34ffa Fixed the size computation 2010-12-15 19:44:29 +00:00
Robert Osfield
8b8dda86af Removed no longer used static member variables 2010-12-15 16:30:48 +00:00
Robert Osfield
65f95fe3fe Added methods for checking sizes of various buffer object/texture object pool sizes. 2010-12-14 19:29:01 +00:00
Robert Osfield
4b4b438d44 Removed redundent MinimumNumberOfTextureObjectsToRetainInCache static variable 2010-12-14 15:28:31 +00:00
Robert Osfield
543b2ee56e Added resizeGLObjectBuffers(uint) and relaseGLObjects(State*) to BufferData. 2010-12-13 17:09:31 +00:00
Robert Osfield
c959bab0a6 From Wojciech Lewandowski, "As suggested I have added missing method to PerContextProgram. Tested with our programs.
I see that we should expect some performance penalty for using this method.  It won’t be painful in my current case because I have only a few animated characters. But I suspect  some day I will have to fix osgCal to use int UniformIds natively for larger crowds."
2010-12-12 09:22:09 +00:00
Robert Osfield
08d21d8777 Introuced a local typedef of the index array type to keep the functor parameters consistent 2010-12-12 08:54:58 +00:00
Robert Osfield
067695bec4 Updated version number for 2.9.11 dev release 2010-12-08 11:01:37 +00:00
Robert Osfield
06509b9769 Introduced bool Texture2D::textureObjectValid(State) and bool SubloadCallback::textureObjectValid(Texture2D&,State&) method to make it tell Texture2D::apply() whether the texture object is still valid or whether it's no longed valid for the any changes to the image attached to the Texture 2010-12-03 14:18:16 +00:00
Robert Osfield
65aee287e7 From Mathias Froehlich, "Attached are most of the fixes that are required to build osg on solaris and
hpux. I have skipped irix this time as irix is too dead to keep osg building
there.

As usual, solaris does not like member templates in stl containers.
Some headers missing and link problems due to missing libraries."
2010-12-02 14:13:54 +00:00
Robert Osfield
60457486b0 From Wang Rui, Compile fixes 2010-11-30 08:12:06 +00:00
Robert Osfield
e5a9eaa711 From Tim Moore, "Here is initial support for uniform buffer objects. The binding between a buffer object and an indexed target is implemented as a new StateAttribute, UniformBufferBinding. I've included an example program based on the code in the ARB_uniform_buffer_object specification.
A few things remain to do:
* The binding between a uniform block in a shader program and a buffer indexed target number is fixed, like a vertex attribute binding. This is too restrictive because that binding can be changed without relinking the program. This mapping should be done by name in the same way that uniform values are handled i.e., like a pseudo state attribute;

* There's no direct way yet to query for the offset of uniforms in uniform block, so only the std140 layout is really usable. A helper class that implemented the std140 rules would be quite helpful for setting up uniform blocks without having to link a program first;

* There's no direct support for querying parameters such as the maximum block length, minimum offset alignment, etc. Having that information available outside of the draw thread would make certain instancing techniques easier to implement."
2010-11-29 17:43:27 +00:00
Robert Osfield
ebfcb17744 From Marin Platings and Robert Osfield, fix of Uniform unique ID by making osg::Object::setName() virtual. 2010-11-26 13:54:11 +00:00
Robert Osfield
d7b161078a From Thomas Hogarth and Stephan Huber, "attached you'll find part one of iphone-support. It includes
* support for NPOT-textures on IOS
* support for FBOs (only renderToTexture for now) on IOS (should work
for other OpenGL ES 1/2 targets, too)
* FileUtils-support for IOS"
2010-11-25 16:06:04 +00:00
Robert Osfield
cdfbb7a753 From Michael Platings, To address performance bottleneck that occurs when using large number of uniforms introduced a name to uniqued ID scheme for Uniforms so comparisons can be done on a uint rather than a string. 2010-11-25 12:30:38 +00:00
Robert Osfield
4b4e02e45b From Hartwig Wiesmann, "in the files Image, Observer and TerrainTechnique unused parameters exist resulting in a couple of compiler warnings (depending on the compiler settings though).
The attached patches comment out the unused parameter names.
"
2010-11-25 12:07:59 +00:00
Robert Osfield
043ae090a5 From Tim Moore, Fix for drivers that don't properly support timer extensions.
""
2010-11-24 10:38:28 +00:00
Robert Osfield
d7747685b3 From Holger Helmich, Tessellation shader support 2010-11-23 14:50:31 +00:00
Robert Osfield
9b70348ced Fixed typo of commercial 2010-11-22 11:22:03 +00:00
Robert Osfield
6b711582de From Sukender, fix for precision of Plane::asVec4() 2010-11-19 18:07:17 +00:00
Robert Osfield
ade360819e Updated SO version to reflect changes in API of osgText 2010-11-19 09:57:34 +00:00
Robert Osfield
be9003d90c From Wang Rui, "The latest modification of osg/State uses the GLuint64EXT type, which
belongs to GL_EXT_timer_query and should be decalared to avoid
compiling errors if the extension is not supported. I've attached this
small fix."
2010-11-11 10:53:23 +00:00
Robert Osfield
68f37c4dcb From Tim More and Robert Osfield, implementation of ARB_timer_query based GPU timing stats syncronization.
Initial email from Tim : "I've implemented using a timestamp, available with ARB_timer_query and OpenGL 3.3, to gather GPU stats. This is nice because it can accurately fix the GPU draw time with respect to the other times on the stats graph, rather than having to estimate the wall time of the end of GPU drawing. This also prevents anomalies like the GPU phase starting before the draw phase..."
Changes to Tim's submission by Robert:  Removal of need for swap buffer callback in ViewerBase.cpp, by
integrating a osg::State::frameCompleted() method that does the stats timing collection.  Introduction of a
GraphicsContext::swapBuffersCallbackOrImplementation() method that calls the State::frameCompleted() and
the swap buffers callback or the swapImplementation as required.
2010-11-10 16:58:58 +00:00
Robert Osfield
752a5e2a3c From Javier Taibo, "ere is the new code with Billboard "rotate around axis" functionality.
A new AutoRotateMode was added. I named it ROTATE_TO_AXIS to be
consistent with the other AutoRotateModes, even though it changes from
how is called in Billboard (AXIAL_ROT).

  Setters and getters for rotation axis and normal were also added to the
AutoTransform class interface.

  The implementation is mainly a copy-paste from Billboard code.
"
2010-11-05 17:24:50 +00:00
Robert Osfield
2aaf0ed297 From Fabien Lavingotte and Robert Osfield, Fixed handling of texture pool size when TextureObject::setAllocate(..) is called. 2010-11-04 17:53:58 +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
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
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
b622a99178 Added handling of vertex buffer objects into osg::Geometry copy constructor. 2010-10-28 14:01:47 +00:00
Robert Osfield
1a292ad8e3 Integrated IncementalCompileOperation into DatabasePager.
Improved various facilities in IncrementalCompileOperation.
2010-10-21 16:29:23 +00:00
Robert Osfield
00fe3c0417 Introduced SubloadCallback::generatdTextureObject() method. 2010-10-14 13:35:36 +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
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
9984281553 Refactored the Texture3D extension setup in osg::Texture3D and gluBuild3DMipmaps and gluBuild3DMipmapLevels. 2010-10-08 11:20:56 +00:00
Robert Osfield
d23ce985a1 Introduced osg namespace to new local GLU functions 2010-10-07 11:53:28 +00:00
Robert Osfield
12e6a23451 Introduced new gluScaleImage function that uses a PixelStorageModes structure to pass in details on image packing,
rather than relying upon glGet's to get the values.
2010-10-07 10:51:22 +00:00
Robert Osfield
6a00d7d356 Added #define for Windows build 2010-10-06 18:29:23 +00:00
Robert Osfield
29bc5995e7 Added #define's and local include<osg/Image> to fix Windows GL 1.1 build against 2010-10-06 16:36:30 +00:00
Robert Osfield
8a6b0f0cef From Jean-Sebasien Guay, fix windows compile error 2010-10-06 16:29:16 +00:00
Robert Osfield
89f7726383 Copied libutil and libtess implementations in form Mesa 7.9/src/glu into the src/osg/glu,
changed extensions from .c to .cpp and got compiling as C files as part of the osg core library.

Updated and cleaned up the rest of the OSG to use the new internal GLU.
2010-10-06 14:44:52 +00:00
Robert Osfield
e5bc43f04c From Magnus Kessler, "After a closer look at this particular issue, I used some grep and sed magic
to fix all occurrences of "macro's" and "paramter".
"
2010-09-30 16:57:02 +00:00
Robert Osfield
0eded3efbe From WojciechLewandowski, Added DispaySettings::SwapMethod and support for it in GraphicsContext::Traits 2010-09-30 14:25:27 +00:00
Robert Osfield
f6517d2f8b From Alexander Wiebel, "I did some spell checking in my spare time. Here come 20 files." 2010-09-24 14:53:10 +00:00
Robert Osfield
73a4e775c0 From Jean-Sebastien Guay, "Changeset 10833 renames discardAllDeletedGLObjects() to discardAllGLObjects() in src/osg/GLObjects.cpp, but the declaration of the function in include/osg/GLObjects remained. So an app using an old version of OSG that called this function would now fail with a linker error instead of a compile error as it should.
Removed the declaration. Also fixed a small typo in the following doxygen comment."
2010-09-24 14:40:56 +00:00
Robert Osfield
eb3d76f291 From Mikhail Izmestev, "This patch fixes operator >> used with std::istream without std::ios::skipws flag. This allow using boost::lexical_cast with osg vectors types, because boost's lexical_cast disable std::ios::skipws flag of std::istream before using operator >>.
"
2010-09-24 14:38:01 +00:00
Robert Osfield
93ad63405f From Alexander Wiebel, "I came across some functions in Vec* that I thought could benefit from some
doxygen documentation. Additionally, I made the comment on value_type more
meaningful (in my opinion)."
2010-09-16 10:33:51 +00:00
Robert Osfield
c6a1b7e97f From Magnus Kessler, "I'm resubmitting a slightly different version of the changes you left out for
osg/Camera. The ::glName issue masked the fact that the "(..)" isn't handled
well in doxygen and leads to "(." in the generated files.

I'm also submitting a minor documentation fix to osgGA/DriveManipulator to get
it out of my patch queue ;)"
2010-09-16 09:49:22 +00:00
Robert Osfield
cc471b1103 From Magnus Kessler, "Attached are a number of files where I have tried to fix up some of the
documentation. I have accumulated them over some time, but rebased onto the
subversion trunk."
2010-09-15 12:00:12 +00:00
Robert Osfield
df7df0739a From Lukasz Izdebski, "I made some changes in OcclusionQueryNode file.
I move declaration of classes TestResult, QueryGeometry from cpp to header file and made a void createSupportNodes() a virtual method.

Now is possible to inherit from class OcclusionQueryNode."
2010-09-15 11:27:31 +00:00
Robert Osfield
d044d135f5 From Jan Peciva, "please, find attached improved Stencil and StencilTwoSided classes.
Goals:
- to handle INCR_WRAP values nicely if not supported by OpenGL (old hardware)
- to support two side stenciling of OpenGL 2.0. Current implementation does not work on ATI as it uses Nvidia extension.

Ready for commit:
- Stencil and Stencil.cpp - please, review them

Ready with "hack":
- StencilTwoSided.cpp: please, see the line 113 in apply():

      glEnable(GL_STENCIL_TEST_TWO_SIDE);

This line used to be in getModeUsage() as

      usage.usesMode(GL_STENCIL_TEST_TWO_SIDE);

but it produces OpenGL errors on ATI as it is unknown value there (it is Nvidia extension).
Problems with my "glEnable" solution:
- it enables two side stenciling forever, and it will disturb any other single-side stenciling in the scene graph.
"
2010-09-15 09:56:16 +00:00
Robert Osfield
551d2b6479 From Ulrich Hertlein, "not sure how severe this is but I believe there's a bug in
Texture.cpp:applyTexImage2D_subload:

<code>
unsigned char* data = = (unsigned char*)image->data();
if (needImageRescale) {
 // allocates rescale buffer
 data = new unsigned char[newTotalSize];

 // calls gluScaleImage into the data buffer
}

const unsigned char* dataPtr = image->data();
// subloads 'dataPtr'

// deletes 'data'
</code>

In effect, the scaled data would never be used.

I've also replaced bits of duplicate code in Texture1D/2D/2DArray/3D/Cubemap/Rectangle
that checks if the texture image can/should be unref'd with common functionality in
Texture.cpp.

"
2010-09-14 13:19:55 +00:00
Robert Osfield
d55ada3790 Moved GL_RED and associated GL defines that aren't defined by GLES into the include/osg/Image to aid portability. 2010-09-14 13:19:12 +00:00
Robert Osfield
a171c88cf1 From Lukasz Izdebski, "Texture: added support for GL_EXT_texture_compression_rgtc, I added support (read and write ) for BC4 BC5 Block Compression to dds file format." 2010-08-16 14:11:49 +00:00
Robert Osfield
5d48a68cba From Alexander Wiebel, "Documentation of PrimitiveSet" 2010-08-16 09:35:59 +00:00
Robert Osfield
74a9ccb49d From David Fries, merge from a series of related submission emails:
"enable thread locking in libavcodec

This is required for a multithreaded application using ffmpeg from
another thread."

"Prevent the audio from videos from hanging on exit if they are paused.
The video decoder already has similar logic."

"Add a way to retrieve the creation time for MPEG-4 files."

"fmpeg, improve wait for close logic

Both audio and video destructors have been succesfully using the logic,
if(isRunning())
{
  m_exit = true;
  join();
}
since it was introduced,

but the close routines are using,
m_exit = true;
if(isRunning() && waitForThreadToExit)
{
  while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); }
}
which not only is it doing an unnecessary busy wait, but it doesn't
guaranteed that the other thread has terminated, just that it has
progressed far enough that OpenThreads has set the thread status as
not running.  Like the destructor set the m_exit after checking
isRunning() to avoid the race condition of not getting to join()
because the thread was running, but isRunning() returns false.

Now that FFmpeg*close is fixed, call it from the destructor as well
to have that code in only one location."
2010-08-09 17:02:31 +00:00
Robert Osfield
534af3aeaf Removed the erroneous subclassing from osg::Observer 2010-08-08 15:44:03 +00:00
Robert Osfield
930f5ab620 From Jeremy Moles, "The version of GCC I use (4.4.3-4ubuntu5) gives the following warning
about the Observer header:

/home/cubicool/local/include/osg/Observer: In copy constructor
?osg::ObserverSet::ObserverSet(const osg::ObserverSet&)?:
/home/cubicool/local/include/osg/Observer:66: warning: base class ?class
osg::Referenced? should be explicitly initialized in the copy
constructor

I've been fixing this by hand by using the attached Observer header; it
does exactly what the warning requests. Purely cosmetic, I believe, but
other than that OSG seems to compile w/ -W -Wall just fine."
2010-07-31 10:22:37 +00:00
Robert Osfield
64b26ebeb5 Added debug State::print(std::ostream&) method and extra debug messages in ShaderComposer and ShaderAttribute.
Added better shader composition testing in the osgshadercomposition example.
2010-07-10 17:14:59 +00:00
Robert Osfield
46b221a832 Added compile/release and resize of GL objects to ShaderAttribute.
Removed the StateAttribute::compose() method.

Fixed the default type value in ShaderAttribute
2010-07-06 12:19:26 +00:00
Robert Osfield
74ae526bb5 Added support for passing on uniforms from StateAttribute 2010-07-06 10:55:54 +00:00
Robert Osfield
751b0498fe Added basic code injection fields to osg::Shader,
creation of main shader to ShaderComposer and
collection of ShaderComponent to osg::State.
Also added very basic shader set up in osgshadecomposition example.
2010-07-05 16:32:58 +00:00
Robert Osfield
9f8670f50d Implement basic cache in ShadeComposer 2010-07-02 14:18:59 +00:00
Robert Osfield
a55c4b7d70 Added basic ShaderComponent class and beginnings osgshadercomposition example 2010-07-02 12:04:20 +00:00
Robert Osfield
5cac233764 Added beginnings of shader composition with the shells of the ShaderComposer and ShaderAttribute classes. This aren't
functional yet, but a useful placeholders for future fucntionality.
2010-06-24 17:15:27 +00:00
Robert Osfield
4ae8eb607f Updated version number for next dev release 2010-06-21 10:33:46 +00:00
Robert Osfield
da60a3c615 From Jan Peciva, additional comments, and standarisation of throw and handling of mouse wheel. 2010-06-14 15:20:47 +00:00
Robert Osfield
7f7f1f7d0e Changed types from unsigned int to int's to address warnings, and changed the extension requirements so the GLES2 builds with FBO's where supported 2010-06-01 18:20:38 +00:00
Robert Osfield
656a1b6da5 From Frederic Bouvier, "here is my proposal. It is supposed to be used like this :
osg::Camera* c = createCamera();
   c->attach( osg::Camera::COLOR_BUFFER0, texture3d, 0,
osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER );

it works also for cubemap textures and 2d texture arrays
"
2010-06-01 14:12:03 +00:00
Robert Osfield
4a047f2a82 From Michael Platings, introduced osg::State::applyModelViewMaitrx(const osg::Matrix& matrix) method and associated osg::State::_modelViewCache to enable osgText::Text3D to be refactored in away that avoids creating/destroying matrices 2010-06-01 13:33:58 +00:00
Robert Osfield
054d5606fb From Tim Moore, "This is a patch that allows a ref_ptr to be constructed using an observer_ptr argument, which is locked. This is shorthand for declaring the ref_ptr and then passing it to observer_ptr::lock().
"
2010-06-01 11:28:04 +00:00
Robert Osfield
6ba8341683 From Wang Rui, "The Notify header doesn't include the OSG_ALWAYS macro, which is used
in the quicktime plugin. The file attached is to fix that small
problem."
2010-06-01 09:23:21 +00:00
Robert Osfield
d8511fa5ca From Tim Moore, fixed typo and removed redundent include 2010-06-01 09:21:42 +00:00
Robert Osfield
975b95dd33 From Torben Dannhauer, "I added radial fog functionality be using the OpenGL extension 'GL_NV_fog_distance'." 2010-05-31 16:53:41 +00:00
Robert Osfield
6548e4a5a8 Added OSG_DEBUG_DP macro 2010-05-28 17:17:34 +00:00
Robert Osfield
d26a8474e7 Changed the ref_ptr<T> observer_ptr<>::lock() method to be
bool observer_ptr<>::lock(ref_ptr<T>&) to avoid the temporary ref_ptr<>'s
being created and destroyed on the stack along with the associated ref/unref() operations
2010-05-28 08:57:48 +00:00
Robert Osfield
e826bfeb3c Refactored osgQt so that QWebViewImage is now entirely implementated in the header, and osgQt itself no longer compiles it,
leaving it to only applications that require it to include the header and it's implementation and with ith the QWebKit dependency.
2010-05-22 15:45:02 +00:00
Robert Osfield
0d2723b984 From Hartwig Wiesmann, "I have added some doxygen documentation to the plane class.
"
2010-05-20 17:02:45 +00:00
Robert Osfield
9cf330d7ff Introduced a alternative implementation of observer_ptr<> that uses ObserverSet rather than an local WeakReference object. 2010-05-20 13:38:28 +00:00
Robert Osfield
b979b585f2 From Tim Moore, fix for deadlock 2010-05-19 13:14:57 +00:00
Robert Osfield
62d69c686f Fixed warning 2010-05-19 08:22:10 +00:00
Robert Osfield
b3ac6484c1 From Martin Naylor, "Please find attached the modified observer_ptr include for fixing a compiler
issue for Windows and VS2008."
2010-05-19 08:08:49 +00:00
Robert Osfield
7ed822fd79 From Tim Moore, typo fix. 2010-05-18 18:01:02 +00:00
Robert Osfield
61121daaab Updated wrappers 2010-05-17 18:37:32 +00:00
Robert Osfield
65c09c8e0d From Tim Moore, improved doxygen comments 2010-05-17 14:43:41 +00:00
Robert Osfield
ccd9f31309 Removed signalUnreffed interface 2010-05-17 14:21:53 +00:00
Robert Osfield
f832198128 From Tim Moore, refactore WeakReference/Referenced to avoid signalling the observers when do a unref_nodelete. 2010-05-17 09:03:44 +00:00
Robert Osfield
554adfc8e6 Refactored Observer/ObserverNodePath and DatabasePager to improve their robustness. 2010-05-14 12:24:13 +00:00
Robert Osfield
2b2ea4487a From Tim Moore, new more robust observer_ptr<> implementation 2010-05-14 12:14:14 +00:00
Robert Osfield
68a1ed2dcf Fixes for building OSG with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF.
Fixed copy and paste error in Camera::getImplicitBufferAttachmentResolveMask().
2010-05-12 11:37:27 +00:00
Robert Osfield
7ef776ec5f Fixed warnings 2010-04-30 19:41:24 +00:00
Robert Osfield
c2a59415ce Changed DisplaySetting::instance() to return a ref_ptr<>& rathern than a raw C pointer to enable apps to delete the singleton or assign their own. 2010-04-30 11:48:30 +00:00
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
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
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
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
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
51924431cd Fixed warnings 2010-04-13 09:42:53 +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
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
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
bbca791251 From Michael Platings, "Here's the all-new, all-dancing DAE plugin, with support for reading
osgAnimation. It's been tested with the majority of the samples in the
COLLADA test repository and works with all of them either as well as, or
better than, the version of the plugin currently in SVN.

Known issue: vertex animation (AKA morphing) doesn't work at present,
but that's a relatively unpopular method of animating so it's not high
on my priority list."

Follow up email:
"I've been informed that the previous DAE submission didn't build on
unix, so here's the submission again with the fixes.  Thanks to Gregory Potdevin and Benjamin Bozou.
Also, my apologies to Roland for not crediting his part in making DAE
animation happen, my work was indeed built on top of his work. Thanks
also to Marius Heise and of course Cedric Pinson."

Changes by Robert Osfield, fixed compile issues when compile without C* automatic conversion enabled in ref_ptr<>
and constructor initialization fixes to address some warnings under gcc.
2010-02-26 14:41:50 +00:00
Robert Osfield
d50eacd07e From Paul Martz, "The changes are very similar to Magne's, except they now take the near plane into account. The changes are:
* Change OcclusionQueryNode::getPassed to take a NodeVisitor rather than the distance from BS center to the eye point. Change where CullVisitor calls this method to use the new parameters.
 * getPassed now exits early and returns true to avoid blinking / blink-in of geometry for the first frame or for out-of-range LOD children coming back into view.
 * getPassed now considers the distance from the near plane to the bounding sphere (rather than eye point to bounding sphere) when determining if the viewer is "inside" the bounding sphere or not."
2010-02-26 10:13:28 +00:00
Robert Osfield
8059c4a745 From Chris Hanson, comment fix. 2010-02-25 18:03:14 +00:00
Robert Osfield
9a45538db9 Added an empty() method 2010-02-22 17:41:35 +00:00
Robert Osfield
bb21136d92 Added missing _ptr = rp._ptr to constructor. 2010-02-22 08:39:33 +00:00
Robert Osfield
b1001c2a9c Moved implementation of Observer destructor and constructor from header into .cpp to avoid possible issues with imports/exports under Windows build. 2010-02-19 20:18:48 +00:00
Robert Osfield
8b67830f6e Added check against OSG_GL3_AVAILABLE to avoid issues with GL3 build under linux 2010-02-19 20:14:12 +00:00
Robert Osfield
eca4361c4a Clean up observer_ptr<> and removed the eronous casting of ptr in objectDeleted. 2010-02-19 19:50:55 +00:00
Robert Osfield
b807fc83fe Added mutex lock to destructor. 2010-02-19 16:04:33 +00:00
Robert Osfield
8f11af8d3e Replaced local mutex with getObserverMutex(). 2010-02-19 15:41:42 +00:00
Robert Osfield
530c947c94 Added an InitGlobalMutexes to enforce early construction and hence late destruction of singleton mutexes. 2010-02-19 09:02:24 +00:00
Robert Osfield
b5c5ae7185 Added newline. 2010-02-18 22:53:15 +00:00
Robert Osfield
b09757bdb8 Refactored the osg::Referenced observerset code so that it now uses a dedicated ObserverSet class,
which utilises a global recursive mutex that is dedicated to manage Observer and ObserverSet.

The new global mutex for observers avoids problems with deadlocks that were occurring previously when
an osg::Refenced object was being deleted at the same time as on osg::ObserverNodePath.
2010-02-18 21:21:12 +00:00
Robert Osfield
6196652ef0 Replaced use of observer_ptr<> with straight C pointer to avoid thrashing of an observer_ptr<> every frame.
Changed include to point to new Observer header
2010-02-18 21:18:49 +00:00
Robert Osfield
ab66740fb0 Added new setNodePathTo() method 2010-02-18 09:00:37 +00:00
Robert Osfield
26a9e499a4 Fixed crash 2010-02-16 14:05:49 +00:00
Robert Osfield
a8e26f3a0c Threads safety fixes based on suggestions from Tim Moore. 2010-02-16 11:10:49 +00:00
Robert Osfield
ff38da1290 Refactor various NodeTracker and MatrixManipulator classes to use the osg::ObserverNodePath and osg::oberserver_ptr<> classes 2010-02-15 20:15:32 +00:00
Robert Osfield
4a567d9954 Introduced new osg::ObserverNodePath class that robustly manages a NodePath in a thread safe manner,
making it easier for users to track a NodePath even when nodes in the path get deleted.
2010-02-15 20:14:32 +00:00
Robert Osfield
644b2e15d1 Refactored the osg::Observer to introduce a new bool Observer::objectUnreferenced(void*) method that adds
the extra capability of making it possible for Observers to assume ownership of a object that would otherwsie be deleted.

Added a thread safe ref_ptr<T> observer_ptr<T>::lock() method for robust access to an observed object.  This
makes observer_ptr<> more equivilant to boosts weak_ptr.
2010-02-15 20:12:53 +00:00
Robert Osfield
d6179e7eb5 Added osg:: qualifyer to OSG_NOTIFY macro 2010-02-15 11:36:05 +00:00
Robert Osfield
a673abac3d Introduced OSG_WARN, OSG_NOTICE, OSG_INFO, OSG_DEBUG convinience macros that map to OSG_NOTIFY(osg::WARN) etc.
Introduced the OSG_NOTIFY_DISABLE Cmake variable + include/osg/Config #define to control whether the OpenSceneGraph build
should disable the notification system completely.  By setting OSG_NOTIFY_DISABLE to ON in CMake and then rebuilding the
the OSG you can get a slightly smaller (~1%) and more slightly efficient library which can be good for shipping applications,
but with downside of reduced ability to detect runtime problems and their causes.
2010-02-12 11:45:00 +00:00
Robert Osfield
c5d0ff600b Fixed typo 2010-02-10 12:48:21 +00:00
Robert Osfield
f17e401347 Convert NOTIFY to OSG_NOTIFY to avoid problems with polution of users apps with the NOTIFY macro 2010-02-10 12:44:59 +00:00
Robert Osfield
5792bc6d99 Introduced NOTIFY macro to help out with avoiding using of streams with notification level is below the user defined cutoff. This addition has been introduced to help out with avoid threading performance issues with the Microsoft ostream implementation. 2010-02-09 17:39:43 +00:00
Robert Osfield
be46c61eb1 Added extra elaspedTime_*() methods to help with reporting times in milliseconds etc. 2010-02-09 17:38:02 +00:00
Robert Osfield
f3575e6a40 Added #defines for GL3 build 2010-02-03 09:35:05 +00:00
Robert Osfield
921d8b5a02 From Juan Hernando, fixed typo in handling of RGBA and BGRA data 2010-01-26 16:50:26 +00:00
Robert Osfield
144d3e7af3 From Lars Nilsson, "Attached is a small program doing intersection calculations, both with and without KdTree. The geometry is a TRIANGLE_STRIP consisting of five vertices, all with the same rather high Z-value. If the intersection calculation uses KdTree, it fails. When I changed osg::Vec3 to osg::Vec3d in a few places in osg::KdTree it finds the correct intersection point."
From Robert Osfield, I didn't merge the change of parameter type of IntersectKdTree::intersect() as the internal maths is all done in Vec3s. Keeping Vec3 here hasn't effected the test results.
2010-01-26 13:05:05 +00:00
Robert Osfield
6f3966038f From Serge Lages, "Here is a patch to allow setting an audio volume with the AudioSink interface, I've also modified the ffmpeg plugin code to implement the ImageStream's setVolume method with its AudioSink." 2010-01-18 12:43:02 +00:00
Robert Osfield
f53c3c1036 Updated so version 2010-01-14 15:15:08 +00:00
Robert Osfield
8541761fe7 For backwards compatiblity add a staic void BufferObject::deleteBufferObject(unsigned int contextID,GLuint globj) method. 2010-01-13 18:46:52 +00:00
Robert Osfield
d891a56e8d From Wang Rui, "Attached are two simple modifications of osg::Sequence and
osg::Texture1D classes, for the reason of implementing the I/O
serialization feature. In the Sequence header, I've added some more
convenient functions: setTimeList/getTimeList,
setLoopMode/getLoopMode, setBegin/getBegin, setEnd/getEnd,
setSpeed/getSpeed and setNumRepeats/getNumRepeats.

In the Texture1D header, fixed:

inline void setTextureWidth(int width) const ...

to:

inline void setTextureWidth(int width) ..."

Notes from Robert Osfield, have gone a little further with these changes and have removed some of the original get methods that were out of step with the way the rest of the OSG manages the set/get property pairs.
2010-01-13 13:30:14 +00:00
Robert Osfield
a31aa512d7 From Rob Radtke, "I recently ran into some issues trying to save/load a scene graph as a .ive file. The problems came about because the scene graph contained depth textures in it. I have attached a patch (against the current revision: 10919) that fixes the issues that I encountered. Both attachments contain the same patch--one is a .zip file that contains the modified files and the other is a text patch file. Here is a summary of the changes I made:
1) Add getShadowComparison() accessor function to osg::Texture class
2) Modify ReaderWriterTiff::writeTifStream() and _readColor() (in Image.cpp) to handle pixelFormat==GL_DEPTH_COMPONENT as if it were GL_LUMINANCE
3) Modify the Texture classes of the ive and osg plug-ins so that they save/load the following Texture members: _use_shadow_comparison, _shadow_compare_func and _shadow_texture_mode
"
2010-01-08 11:32:55 +00:00
Robert Osfield
248a0813db From Lilith Bryant, "As discussed previously on the users list. Fixes the redundant calls to
glActiveTexture on every State::apply after more than one texunits have been
used.

This is against 2.9.6 (I think SVN head is the same)

Quick Synopsis:

New functions:

State::applyModeOnTexUnit
State::applyAttributeOnTexUnit
State::applyModeMapOnTexUnit
State::applyAttributeMapOnTexUnit
State::applyModeListOnTexUnit
State::applyAttributeListOnTexUnit

All copies of the normal versions, but they also set the active tex unit if
absolutely necessary (i.e. only if they call something OpenGL).

State::apply (*2)
State::applyTextureAttribute

Changed to call the above functions and no longer call setActiveTextureUnit
themselves.

State::setActiveTextureUnit

Made inline, so the benefit of having applyModeOnTexUnit (etc) inline
is retained.
"
2010-01-07 16:49:12 +00:00
Robert Osfield
5d9bf9f4d5 Added virtual pause() method into osg::AudioSink to support pausing of a movie thread and it's associated audio.
Updated osgmovie plugin to use the pause support.
2010-01-07 14:35:17 +00:00
Robert Osfield
47af634399 Refactored the way that osg::Image/ImageSequence manages the update callback that needs to be attached to Textures to make it possible to use the Image::update() mechansim in other subclasses from osg::Image.
To enable the automatic attachment of the required update callback to call osg::Image::update(..) subclasses from osg::Image will
need to implement the osg::Image::requestUpdateCall() and return true, and implement the osg::Image::update(NodeVisitor*) method to recieve the update call during the update traversal.
2010-01-07 12:14:47 +00:00
Robert Osfield
aec8c8ac10 Updated version to 2.9.7 in prep for next dev release 2009-12-15 11:47:38 +00:00
Robert Osfield
22de011107 Renamed osg::GraphicsContext::OperationQueue typedef to GraphicsOperationQueue to avoid naming conflict with osg::OperationQueue 2009-12-14 13:42:00 +00:00
Robert Osfield
6e7c02b5d8 Added a Geometry::compileGLObjects() to handle compilation of VBO + EBO's. 2009-12-09 13:51:02 +00:00
Robert Osfield
17b8ee1508 From Thomas Halgarth, mods for Iphone GL headers 2009-12-08 17:41:18 +00:00
Robert Osfield
248386861b From Sukender, "I experienced as some users before: I tried to rescale an image without a valid rendering context... And had problems to unserstand what the "GL_OUT_OF_MEMORY" meant! So I added a few comments for future users." 2009-12-08 17:25:45 +00:00
Robert Osfield
02d0f08eb1 Added virtual declaration for a range of osg::Image method to allow easier customization. 2009-12-08 15:38:50 +00:00
Robert Osfield
36b5e59019 From Paul Martz, "This change address the following issue: an app opens a Viewer on a multidisplay system, configured to setUpViewAcrossAllDisplays, with a non-default clear mask. In this case, OSG failed to propagate the clear mask to the slave Cameras, resulting in the clear mask being ignored. To fix this issue, this revision adds a new CullSettings::VariablesMask bit, CLEAR_MASK, to explicitly control inheritance of the clear mask. This bit is set by default, which means that the clear mask now inherits by default, whereas previously it did not." 2009-11-27 15:32:43 +00:00
Robert Osfield
6ebeff658a Implement deleteAllTextureObject/BufferObjects functionality.
Cleaned up warnings.
2009-11-27 11:43:18 +00:00
Robert Osfield
ab8d93a181 Introduced preliminary osg::deleteAllGLObjects() and osg::discardAllGLObjects() functions and associated support into Texture and BufferObjects 2009-11-26 12:33:07 +00:00
Robert Osfield
383a5222bd Rewrote the Vec *= Vec and Vec /= Vec implementations using inline Vec componentMultiply(Vec,Vec) and Vec componentDivide(Vec,Vec) to avoid confusion about the what the operation does. 2009-11-24 13:28:07 +00:00
Robert Osfield
3599be9708 From Wojciech Lewandowski, "I have extended a list of texture targets that can be used with shadow comparison. These targets are avaialble in in OpenGL 3.x shadow sampler variants. Changes are based on current SVN." 2009-11-24 13:24:30 +00:00
Robert Osfield
87452fe1b9 From Chris Hanson, " Adds support for Vec /= Vec and Vec *= Vec operators to Vec2/Vec3/Vec4 double and float
classes."
2009-11-23 10:01:44 +00:00
Robert Osfield
d81d71fd97 Updated version 2009-11-23 09:54:28 +00:00
Robert Osfield
5a0186555b From Lilin Xiong, added missing OSG_EXPORT 2009-11-19 17:27:21 +00:00
Robert Osfield
c481f022e9 From Wojciech Lewandowski, "Building on earlier Paul's submission "[osg-users] Main branch MSFBO support change", I have added implicit buffer mask variables to DisplaySettings for setting global defaults for Camera FBOs. These mask variables are named after variables in Camera class. In Paul's submission they were named _renderBufferMask & _resolveBufferMask but I renamed them to _implicitBufferAttachmentRenderMask & _implicitBufferAttachmentResolveMask. DisplaySettings implementation includes reading of environment vars and command line options. Setters and getters follow typical OSG naming convention. I also updated names of ImplictBufferAttachment enum bits to match changed naming scheme.
DisplaySettings now define COLOR and DEPTH as defaults for implicit buffers. Consequently Camera by default uses the same defaults through USE_DISPLAY_SETTINGS_MASK. However, particular Camera mask can be easily overriden through Camera::setImplicitBufferAttachmentMask method. I hope, that in this way we can have global control over implicit buffer defaults, and we can still retain fine grained control at Camera level.

I have also replaced original unsigned ints used to store masks to signed ints because complier resolves enums as signed integer (I got a number of warnings with unsigned int)."
2009-11-19 10:10:50 +00:00
Robert Osfield
2191e6a48d Moved the set of include/osg/Version into Cmake 2009-11-18 16:24:01 +00:00
Robert Osfield
2f854d4978 Fixed primCount default value 2009-11-18 12:50:03 +00:00
Robert Osfield
b7cabac990 From Mathias Froechlich, "Attached the collected fixes I needed to compile with all of them.
Most notable the __hpux define stuff. The __hpux__ variant seems to be not
defined which resulted in a compile error at this time. Consequently I have
replaced all occurances of __hpux__ with __hpux. And huge surprise: now osg
plugins are found and loaded correctly ...
The next notable one is the MSVC_IDE fix which makes the nmake Makefiles cmake
generator target behave like the ide one. Showed up because I started to do
scripted builds with nmake instead of devenv...
The rest is the usual bunch of stuff that just happens during normal
coding ..."
2009-11-18 12:15:29 +00:00
Robert Osfield
4262d10217 Added osg::ShaderBinary::readShaderBinaryFile(..) static method 2009-11-18 11:25:28 +00:00
Robert Osfield
370deba546 <iterator>, <stdlib.h> and <ctype.h> includes required for QNX compiler 2009-11-17 14:06:07 +00:00
Robert Osfield
52fbe9723f Added new osg::ShaderBinary class, and support for it in osg::Shader. 2009-11-16 12:32:41 +00:00
Robert Osfield
8238396099 Added missing export 2009-11-13 09:56:47 +00:00