Commit Graph

1810 Commits

Author SHA1 Message Date
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