Compare commits

...

186 Commits

Author SHA1 Message Date
Robert Osfield
d011ca4e8d Updated ChangeLog for 3.6.3 release 2018-09-14 11:16:53 +01:00
Robert Osfield
3a6b13c46e Updated version number and date for 3.6.3 stable release 2018-09-14 10:41:24 +01:00
Robert Osfield
88afccd85e Updated ChangeLog for 3.6.3-rc3 2018-09-13 08:52:21 +01:00
Robert Osfield
d6d6c3cda2 Updated for 3.6.3-rc3 2018-09-13 08:47:17 +01:00
Robert Osfield
ca134dca2d Standardized the glTexStorage*() calls to use osg::maximum(_numMipmapLevels,1) of rnumber of mipmaps to keep the usage consistent.
Fixed the erronous Texture2DArray glTexStorage call so that it used the _numMipmapLevels as above to resolve bug in allocation.
2018-09-12 17:45:49 +01:00
Robert Osfield
66246703bf Warning fixes 2018-09-11 15:32:44 +01:00
Robert Osfield
fb09be05a9 Fixed warning 2018-09-11 12:29:40 +01:00
Robert Osfield
41fa8fecd1 Updated for 3.6.3-rc2 2018-09-11 12:23:01 +01:00
Robert Osfield
2213011caa Updated rc number 2 for 3.6.3-rc2 2018-09-11 11:56:04 +01:00
OpenSceneGraph git repository
c2f0da31f2 Merge pull request #620 from LaurensVoerman/txt_SCREEN_COORDS
fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set.
2018-09-11 11:29:36 +01:00
Robert Osfield
2e14bd52bf Fixed hang using a ReentrantMutex 2018-09-11 11:23:34 +01:00
Robert Osfield
4ea833cc6b Fixed build 2018-09-11 10:13:49 +01:00
Robert Osfield
7fae3b67cd Fixed build 2018-09-11 09:31:35 +01:00
Robert Osfield
8780347f2f Cleaned up code 2018-09-11 09:05:16 +01:00
gwaldron
22e6f6038f osgText: fixed thread-safety issues in Glyph and Font 2018-09-11 08:53:40 +01:00
mp3butcher
385cfa0cbf fix examples context creation for X11
(when display not :0.0)
2018-09-11 08:40:02 +01:00
OpenSceneGraph git repository
960f4d1ef2 Merge pull request #619 from mathieu/topic/SaveInlinedImages
Added saving of inline Images without having the physical image file.
2018-09-11 08:34:20 +01:00
Robert Osfield
257c2deb86 Added greater control of how cubemap is set up and controlled 2018-09-11 08:11:27 +01:00
Laurens Voerman
4dc6a6c4cd fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set. 2018-09-07 15:09:15 +02:00
Mathieu MARACHE
2e38e4751c Added saving of inline Images without having the physical image file.
The can be read from and inlined image file
2018-09-07 14:05:50 +02:00
Robert Osfield
dfdb946d60 Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2018-09-06 12:30:18 +01:00
Robert Osfield
2f056dcaa9 Updated for 3.6.3-rc1 2018-09-06 12:29:44 +01:00
Robert Osfield
d07fe93f34 Fixed memory leak with assignment of default value to ObjectSerializer 2018-09-06 11:53:35 +01:00
OpenSceneGraph git repository
05297f439c Merge pull request #616 from eligovision/OpenSceneGraph-3.6_particles
ParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRI…
2018-09-05 18:06:25 +01:00
Robert Osfield
34d58d447d Fixed copy constructor 2018-09-05 18:01:33 +01:00
Konstantin S. Matveyev
637e1cc33b ParticleSystem: Using of GL_TRIANGLES for GLES2 and upper; GL_QUADS otherwise 2018-09-05 19:00:29 +03:00
OpenSceneGraph git repository
5d6ab3e6b7 Merge pull request #617 from aluaces/Image_scaleImage_typo
Fix typo in the initial check of Image::scaleImage().
2018-09-05 14:04:57 +01:00
Alberto Luaces
69667a478f Fix typo in the initial check of Image::scaleImage(). 2018-09-05 13:38:09 +02:00
Konstantin S. Matveyev
f00b7180cb ParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRIANGLES) 2018-09-05 14:05:29 +03:00
Jason Beverage
6ae1139630 Protect the _programSet in Shader with a mutex.
This prevents thread safety issues when Shader objects are used in
multiple programs.
2018-09-05 09:34:54 +01:00
Robert Osfield
a06fcbe5d9 Updated ChangeLog 2018-09-05 09:33:24 +01:00
Robert Osfield
5f9c6a0170 Changed the ShapeDrawable::build() methpd so that it does run when the ShadpwDrawabe is a KdTree. 2018-09-04 15:26:30 +01:00
Robert Osfield
2a4dd6e03b Updated SO version as XmlNode::Input changes change the ABI 2018-09-04 14:13:32 +01:00
Robert Osfield
afe5644b9f Added support for reading UTF-8 encoded of xml files 2018-09-04 12:42:31 +01:00
Robert Osfield
ae3133522d Changed the logic for whether to call setUpThreading() in setThreadingModel() to make it possible to changed threadings even if the threading model starts of as SingleThreaded 2018-09-03 12:30:02 +01:00
Robert Osfield
5040c583b4 Updated version number to 3.6.3 in prep for next naintainance release 2018-09-03 11:19:50 +01:00
Robert Osfield
61967a7d1a Merge branch 'OpenSceneGraph-3.6-TexStorage' into OpenSceneGraph-3.6 2018-09-03 10:16:45 +01:00
Robert Osfield
bcba3928e6 Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor 2018-09-03 09:41:59 +01:00
Robert Osfield
006ca64f4b Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor 2018-09-03 09:37:36 +01:00
Robert Osfield
77fd07eaa9 Replaced the glSGetProcAddressARB code with the dlsym() usage as the NVidia driver looks to be returning non NULL pointers for invalid function names. 2018-08-28 12:01:35 +01:00
Robert Osfield
8b8c427afe Replaced the glSGetProcAddressARB code with the dlsym() usage as the NVidia driver looks to be returning non NULL pointers for invalid function names. 2018-08-28 11:52:42 +01:00
Robert Osfield
f55b864d59 Enabled point sprite validty modes. 2018-08-22 11:21:30 +01:00
Robert Osfield
d18c498322 Enabled point sprite validty modes. 2018-08-22 11:13:11 +01:00
Robert Osfield
4f7f34a6b0 Merged fix for PointSprite modes validity checks from master. 2018-08-22 10:43:15 +01:00
Robert Osfield
29789f898b Merged fix for PointSprite modes validity checks from master. 2018-08-22 10:42:18 +01:00
plevy
dd9312ae35 Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows Build
Change GL_RGBA16F to  GL_RGBA16F_ARB to fix Windows build.
2018-08-22 07:48:55 +01:00
plevy
78e050db43 Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows Build
Change GL_RGBA16F to  GL_RGBA16F_ARB to fix Windows build.
2018-08-22 07:48:22 +01:00
Robert Osfield
250dcc5b6c Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build 2018-08-21 09:20:49 +01:00
Robert Osfield
f2dfd78914 Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build 2018-08-21 09:19:50 +01:00
OpenSceneGraph git repository
1819bb32ae Merge pull request #606 from mp3butcher/OpenSceneGraph-3.6-TexStorage
Open scene graph 3.6 tex storage
2018-08-20 10:08:09 +01:00
mp3butcher
e043c3db33 complete TexStorage support 2018-08-20 05:11:43 +02:00
mp3butcher
587e65e674 add more extensions 2018-08-20 05:11:29 +02:00
mp3butcher
274b6894af remove redondant variable and test 2018-08-19 22:46:10 +02:00
Robert Osfield
29e87780f5 Removed check as this is better outside of the function 2018-08-17 16:53:13 +01:00
Robert Osfield
58a51cbc41 Created a GLenum Texture::selectSizedInternalFormat(const osg::Image* image=0) const method to help clean up set up of glTexStorage.
Fixed typo.
2018-08-17 12:20:59 +01:00
Robert Osfield
7ae7a994b4 Merged changes to InternalPixelRelations sizedInternalFormats[] from master 2018-08-17 10:31:46 +01:00
Robert Osfield
3808b298d1 Fixed memory leak associated with VertexArrayStte objects not getting released on destruction of Geometry/Drawables. 2018-08-16 19:24:56 +01:00
Robert Osfield
ed13576d03 From Chris White, Cygwin build fix 2018-08-08 14:42:04 +01:00
Vic-Min
15f2ae8d15 Renamed USE_DEPRECATED_API to OSG_USE_DEPRECATED_API 2018-08-08 14:37:28 +01:00
OpenSceneGraph git repository
9ab5aafd02 Merge pull request #583 from emminizer/flt-registry-cache
OpenFlight: Replace internal caches with osgDB::ObjectCache use.  Fix…
2018-07-31 16:58:41 +01:00
Daniel Emminizer
2e0e78144f OpenFlight: Replace internal caches with osgDB::ObjectCache use. Fixes unbounded memory growth when using readNode(std::istream&, ...) method. 2018-07-31 11:45:33 -04:00
Robert Osfield
ffb68bec7c Removed unneccessary FIX ME statement. 2018-07-31 09:14:02 +01:00
Robert Osfield
79bc4c3843 Fixed check against dataType changes 2018-07-27 17:34:30 +01:00
Alex Burton
a7747972dc updated osgviewerWX to remove deprecated calls in wxWidgets 3.x 2018-07-27 17:12:07 +01:00
OpenSceneGraph git repository
467baa8c00 Merge pull request #573 from emminizer/fix-flt-typo
FLT: Fix texture unit typo and code style from PR 568.
2018-07-09 17:55:38 +01:00
Daniel Emminizer
4d6c4a7f1f FLT: Fix texture unit typo and code style from PR 568. 2018-07-09 06:34:41 -04:00
Robert Osfield
fb40a0d1db Updated ChangeLog for 3.6.2 release 2018-06-29 10:56:35 +01:00
Robert Osfield
975b62c735 Updated date for 3.6.2 releases 2018-06-29 10:56:01 +01:00
Robert Osfield
dff2faa63b Updates for 3.6.2 stable release 2018-06-29 10:54:13 +01:00
Robert Osfield
500d3947ef Fixed isPointSpriteModeSupported assignment bug 2018-06-29 10:53:23 +01:00
Robert Osfield
2b7b051421 Removed the gl3.h usage for GL3 case as these headers were replaced by glcorearb.h, it's probably better to just fallback to gl.h and have the OSG get the extentions at runtime. 2018-06-29 09:52:47 +01:00
Robert Osfield
8a05850048 UPdated ChangeLog 2018-06-28 07:34:49 +01:00
Robert Osfield
469d743bec Updated for rc3 2018-06-28 07:06:59 +01:00
Larry-Hu
c1dfc39706 Remove call to nonexistent member seekpos() of std::fpos in VS 2017 version 15.8 or later 2018-06-28 06:54:57 +01:00
OpenSceneGraph git repository
aa5e25db8d Merge pull request #568 from emminizer/fix-flt-texture-export-gl3
OpenFlight: Textures now correctly export in GLCORE mode.
2018-06-27 20:59:09 +01:00
Daniel Emminizer
33cb2e6f70 OpenFlight: Textures now correctly export in GLCORE mode. 2018-06-27 12:57:20 -04:00
Robert Osfield
11e4a995c4 Updated for 3.6.2-rc2 2018-06-27 09:17:00 +01:00
Robert Osfield
27fc282bb5 Fixed relaseGLObjects() calls 2018-06-27 09:06:58 +01:00
Robert Osfield
9d897c2555 Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2018-06-26 20:50:55 +01:00
Robert Osfield
cbcf7015bb Replaced creation of a temporary Settings object on the heap with creation on the stack to improve performance 2018-06-26 20:46:49 +01:00
OpenSceneGraph git repository
4d5c1ff14e Merge pull request #566 from emminizer/fix-gl_rb-in-gluscaleimage
GL_RG is now a supported format in gluScaleImage().
2018-06-26 20:17:07 +01:00
Robert Osfield
d01edcb540 Added GLExtensions::isPointSpriteModeSupported to allow it to be enable for GL versions that support GL_POINT_SPRITE_ARB/GL_POINT_SPRITE_OES 2018-06-26 20:10:51 +01:00
Daniel Emminizer
bfa8d157c1 GL_RG is now a support format in gluScaleImage(). 2018-06-26 14:44:34 -04:00
Robert Osfield
44b3bcc3fc Moved osg::clampProjectionMatrix() template from CullVisitor.cpp into include/osg/CullSettings to make it easier to implement custom clampProjectionMatrix callbacks 2018-06-25 20:02:30 +01:00
Robert Osfield
89e186014e Updates for 3.6.2-rc1 2018-06-20 13:59:10 +01:00
Calum Robinson
40bde873bc Fix z near calculation for lines 2018-06-20 12:28:06 +01:00
OpenSceneGraph git repository
12db2f8011 Merge pull request #558 from LaurensVoerman/submit-ffmpeg3.2
resolve av sync failure with ffmpeg 3.2 and up
2018-06-19 11:50:38 +01:00
Laurens Voerman
e18a03abc3 resolve av sync failure with ffmpeg 3.2 and up 2018-06-19 10:47:23 +02:00
弥继平
2205506aa3 Fixed the position of the viewport for the camera
The position of viewport doesn't setup properly, some part of viewer is out of CMFC_OSG_MDIView,  and not visible.
2018-06-18 19:38:27 +01:00
Laurens Voerman
15c6b7a196 remove include/osgQt from doxyfiles; add osgPresentation and osgUI 2018-06-14 14:45:49 +01:00
OpenSceneGraph git repository
9171f12069 Merge pull request #555 from emminizer/fix-noisy-flt-loading
FLT: Missing optional attr files on textures no longer generates a co…
2018-06-14 14:44:16 +01:00
Daniel Emminizer
acf359777e FLT: Missing optional attr files on textures no longer generates a console warning. 2018-06-14 07:33:08 -04:00
Robert Osfield
a9f91a875b Changed version to 3.6.2 in prep for next release 2018-06-14 08:54:21 +01:00
Robert Osfield
4665a2f033 To handle calling Array::setBinding() after Geometry::set*Array() call, to the Geometry::addVertexBufferObjectIfRequired(osg::Array* array) added treatment of array->getBinding()==Array::BIND_UNDEFINED as BIND_PER_VERTEX as a safe fallback. 2018-06-14 08:51:00 +01:00
Robert Osfield
673292b995 Moved Stae::setUseVertexAttributeAliasing(bool) implementation to .cpp an added call to _globalVertexArrayState->assignAllDispatchers(); to ensure state is consistent 2018-06-13 12:23:29 +01:00
Robert Osfield
b1d64ee476 Updated LICENSE to use the WxWidgets-3.1 and updates to the LGPL-2.1-only that updates addresses and tighten up language used.
Functionality the OSGPL-1.0 is the same as OSGPL-0.0, All the OpenSceneGraph users can use either OSGPL-0.0 or OSGPL-1.0.
2018-06-03 10:30:55 +01:00
Robert Osfield
5fb1e9c120 Removed deprecated xine plugin to simplify licensing (xine plugin is GPL'd) 2018-05-31 15:11:19 +01:00
Robert Osfield
801069d4cc As the author of all the files in osgPresentation and present3D have rectified the license notices to reflect their intended license rather than histoical license they had prior to being merged into the OpenSceneGraph project. OSGPL was always intended but missed during merge.
Replaced the GPL notices with OSGPL usge in present3D and include/osgPresentation as this was intended when Present3D was merged back into OpenSceneGraph but missed.
2018-05-31 14:45:37 +01:00
Robert Osfield
d3706a24e4 Updated for 3.6.1 2018-05-28 08:58:21 +01:00
Philippe Renon
0a4a31d17b Notify: silence warning about unused argument 2018-05-28 07:54:42 +01:00
Robert Osfield
3838267770 Updated ChangeLog 2018-05-23 19:54:10 +01:00
Robert Osfield
2c39714dff Updates for 3.6.1-rc7 2018-05-23 19:53:12 +01:00
Robert Osfield
4291636619 Updated REMOVE_SERIALIZER( ImageAttachment ); block to use 154 version to retain compatibility with binaries made with 153 SOVERSION prior to the Imageattachement change 2018-05-23 17:02:28 +01:00
Robert Osfield
189e4e3a64 Implemented StateGraph reuse in in scene graph Canera's RenderStage. 2018-05-23 14:30:31 +01:00
Robert Osfield
a6ef1cd66b Fixed warning of RenderLeaf's having multiple references in CullVisitor::createOrReuseRenderLeaf() but forcing a clean up of the StateGraph at the end of RenderStage::draw() 2018-05-23 14:13:27 +01:00
Robert Osfield
f2012eeeb8 Added check to make sure that glEnablei and glDisablei are only called when the capability is non zero to fix GL invalid value error. 2018-05-23 07:47:15 +01:00
Robert Osfield
e2aeab2b60 Fixed type of Timer_t under Windows 2018-05-23 06:32:42 +01:00
Robert Osfield
dce4b81728 Updates for rc6 2018-05-22 09:04:48 +01:00
gwaldron
e4adb509e0 osgText: perform pixel size computation in double-precision to prevent coordinate jitter 2018-05-21 20:04:45 +01:00
Robert Osfield
eae5f9b958 Moved the rotation to before the scale 2018-05-21 18:14:18 +01:00
Robert Osfield
9c6951e4ba Fixed typos 2018-05-21 13:18:29 +01:00
Robert Osfield
dce6684c59 Restored the REGISTER_WINDOWINGSYSTEMINTERFACE macro to the include/osg/GraphicsContext header and removed the OSGVIEWER_EXPORT as this was causing compatibility issues with osgQt.
In GraphicsWindowWin32 replaced REGISTER_WINDOWINGSYSTEMINTERFACE usage with locally implemented equivilant with the required OSGVIEWER_EXPORT.
2018-05-21 13:10:40 +01:00
Robert Osfield
43058ac1d5 Updated ChangeLog and README.md for rc5 2018-05-20 13:39:44 +01:00
Robert Osfield
55c0afbe3a Restructed SCREEN auto scaling so that it's removes the rotation of the modelview matrix so that the XY coords of the text map directly to window xy coords for all text alignment types 2018-05-20 13:22:58 +01:00
Robert Osfield
b34461febe Updates in prep for 3.6.1-rc5 2018-05-18 15:49:28 +01:00
Robert Osfield
e3c47b60e0 Moved REGISTER_WINDOWINGSYSTEMINTERFACE from include/osg/GraphicsContext to include/osgViewer/GraphicsWindow and added OSGVIEWER_EXPORT 2018-05-18 14:58:53 +01:00
Robert Osfield
7602b868f4 Added GL_RED and GL_RG support to _readColor()/Image::getColor(); 2018-05-18 13:55:01 +01:00
Robert Osfield
880a100a60 Cleaned up the WindowingSystemInterface registration 2018-05-18 12:52:50 +01:00
Robert Osfield
3b563ab21b Fixed create of graphics context by explicting adding USE_GRAPHICSWINDOW to force the WindowingSystemInterface to initialize 2018-05-18 12:47:34 +01:00
Robert Osfield
a86c6dc2c6 Quitened down unsupport compression output when passing in a file with a non rgb extension 2018-05-18 12:42:20 +01:00
Robert Osfield
1476f829c4 Introduced a local StateGraph hierarchy into CullVisitor::apply(osg::Camera&) and RenderBin to fixed RTT Camera bug where multiple RTT Camera end up with the rendering back end results assigned to them which occured when RTT Camera's share the same StateSet or null StateSet. 2018-05-18 10:00:10 +01:00
Robert Osfield
26acc9a6b1 Fixed support for update and event callbacks on StateSet/Uniform/StateAttributes on View(er) Cameras. 2018-05-14 09:46:39 +01:00
Robert Osfield
510a231e14 Renamed the counter used to enable traversal order sorting 2018-05-14 08:43:08 +01:00
Robert Osfield
3bbbbd07ea Improved the handling of precision 2018-05-14 08:24:02 +01:00
Robert Osfield
640b03b671 Fixed crash when using ShapeDrawable with a TriangleMesh or ConvexHull shape due to missing texture coords 2018-05-13 11:52:06 +01:00
Robert Osfield
7a3e0445ba Updated for rc 2018-05-13 09:23:38 +01:00
Robert Osfield
00a946bc2e Removed _traverseNumber variable that was duplicating the one in NodeVisitor base class 2018-05-13 09:18:31 +01:00
Robert Osfield
66251abd38 Updates for 3.6.1-rc4 2018-05-12 12:47:08 +01:00
Robert Osfield
312ce9ad05 Build fixes for OSG_USE_REF_PTR_IMPLICIT_OUTPUT set to OFF 2018-05-12 12:41:42 +01:00
Robert Osfield
362e355db2 Rewrote TextBase::computeMatrix(..) computation of the scaling factor with slower but easier to understand and more robust code 2018-05-12 11:40:25 +01:00
Robert Osfield
cf2e3227cc Removed use of deprecated cmake policy 2018-05-12 07:51:51 +01:00
Robert Osfield
01f69e6b10 Moved constructors and destructors to .cpp 2018-05-11 11:16:43 +01:00
Robert Osfield
a211ea4e68 Revert "Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging"
This reverts commit 0fc7aa8cc0.
2018-05-11 11:11:48 +01:00
Robert Osfield
fcde92ad89 Fixed crash the occurred when passing in a osgDB::Options to the ObjectCache that doesn't have any references to it. 2018-05-11 09:00:22 +01:00
Robert Osfield
0fc7aa8cc0 Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging 2018-05-11 08:58:30 +01:00
Robert Osfield
be363ef8d4 Fixed build when OSG_ENVVAR_SUPPORTED is disabled and quietened down warnings using OSG_UNUSED* macros 2018-05-10 18:58:29 +01:00
Robert Osfield
b1daa6a693 Changed the ordering of the build include directory and the source include directory to avoid build issues on systems where a different version of the OSG has been built in-source then another built out-of-source resulting in conflicts 2018-05-10 18:50:17 +01:00
Robert Osfield
05793cb104 Fixed typo 2018-05-10 16:59:56 +01:00
Robert Osfield
a5c421863e Updates for 3.6.1-rc3 2018-05-06 07:47:23 +01:00
Robert Osfield
e79edabf98 Restructed the handling of SCREEN_COORD scaling to better handle window resizing 2018-05-05 15:47:28 +01:00
Robert Osfield
d95993554e Added C++ specific path for calling std::map<>::erase() to avoid issues with std::map<>::erase implementation that invalidates iterators 2018-05-05 12:31:00 +01:00
Robert Osfield
f49e1d32c9 Replaced std::auto_ptr<> usage as it's deprecated in C++11 and will be removed in C++17 2018-05-05 12:28:45 +01:00
OpenSceneGraph git repository
a15d4532fa Merge pull request #545 from emminizer/fix-gl3-text-bad-mode
Text only applies GL_TEXTURE_2D modes when fixed function is availabl…
2018-05-04 16:11:31 +01:00
Daniel Emminizer
27955ae8e9 Text only applies GL_TEXTURE_2D modes when fixed function is available. Prevents GL3 Core Profile console spam. 2018-05-04 06:44:13 -04:00
Robert Osfield
c078968f66 Added non const version of State::getActiveDisplaySettings() 2018-05-04 10:54:02 +01:00
Robert Osfield
f90edd0d9f Added check for null to prevent null entries getting into the cache 2018-05-04 09:44:43 +01:00
Robert Osfield
62a9f87f45 Added osg::MakeString class to make it easier to create std::string's using std::ostream style << usage. 2018-05-04 09:31:57 +01:00
Robert Osfield
f510613d55 Fixed null pointer warning 2018-05-04 09:22:54 +01:00
Björn Blissing
645704dfd3 Check existence of path before reading image
When loading texture images inside the FBX plugin check that the path
exists before trying to read the image. This is done to avoid
unnecessary warnings inside the readRefImageFile function.
2018-05-03 16:13:24 +01:00
Robert Osfield
13d56b8b37 Updated ChangeLog 2018-05-02 09:14:04 +01:00
Robert Osfield
c5990c4f65 Updates for the 3.6.1-rc2 2018-05-02 09:10:54 +01:00
Robert Osfield
94c4baccad Updated SO version to reflect change in ABI 2018-04-30 11:55:17 +01:00
OpenSceneGraph git repository
bb1e208d30 Merge pull request #542 from psyinf/fix_particle_system_header
FIX: <osgParticle> removed unimplemented functions from header
2018-04-30 11:44:02 +01:00
Sebastian Messerschmidt
fce55993bc FIX: <osgParticle> removed unimplemented functions from header 2018-04-30 11:16:02 +02:00
Robert Osfield
31c9dbc881 Fixed particle update bug where a ParticleSystem wouldn't start when loaded during the frame loop due to the _last_frame value not being set. 2018-04-27 11:25:46 +01:00
Robert Osfield
c9b0fcaa32 Updated ChangeLog, README.md and rc number for 3.6.1-rc1 2018-04-26 10:21:53 +01:00
Robert Osfield
37a63d37e2 Split up #pragma so that there only three parameters per line to aovid Intel driver bug crash 2018-04-26 09:52:32 +01:00
Robert Osfield
1daacced5a Renamed text.vert and text.frag to osgText_Text.vert and .frag to avoid name overlapping with user shaders. 2018-04-26 09:52:32 +01:00
Julien Valentin
cea33e40df add wrapper for osg::DrawIndirectBufferObject 2018-04-25 09:49:56 +01:00
Robert Osfield
2b3ac015bb Renamed CMake variable + C++ #define to OSG_GL_CONTEXT_VERSION 2018-04-24 17:06:07 +01:00
Robert Osfield
1aa0a80de7 Added OSG_GL_CONTEXT_STRING cmake variable to set include/osg/GL headers that sets Traits::glContextVersion. 2018-04-24 16:22:13 +01:00
OpenSceneGraph git repository
4dd1156444 Merge pull request #537 from openscenegraph/revert-536-default-gl3-context
Revert "When GL3 build is enabled, default context requested is version 3.3, …"
2018-04-24 15:38:02 +01:00
OpenSceneGraph git repository
c10f298dc6 Revert "When GL3 build is enabled, default context requested is version 3.3, …" 2018-04-24 15:37:44 +01:00
OpenSceneGraph git repository
e8c0033f5f Merge pull request #536 from emminizer/default-gl3-context
When GL3 build is enabled, default context requested is version 3.3, …
2018-04-24 15:36:11 +01:00
Robert Osfield
31c29f4318 Refactored the handling of glyph and shadow alpha values to make the text and shadow clearer for fonts with narrow glyphs 2018-04-24 15:33:03 +01:00
Robert Osfield
e0be94389e Refactored the handling of text bounding box to provide more stable bounding box computation 2018-04-24 13:52:53 +01:00
Daniel Emminizer
d660b29ef0 When GL3 build is enabled, default context requested is version 3.3, enabling core profile by default. 2018-04-24 06:31:32 -04:00
Alberto Luaces
490d3a8f21 Small fix for uncaught typo. 2018-04-23 11:03:37 +01:00
Alberto Luaces
02c310982e Fix typos and spelling. 2018-04-23 11:03:37 +01:00
OpenSceneGraph git repository
c3008512f1 Merge pull request #534 from emminizer/fix-msvc-includes
Fix includes for MSVC 2015 build.
2018-04-23 11:02:03 +01:00
Daniel Emminizer
22d2fae30c Fix includes for MSVC 2015 build. 2018-04-20 13:16:43 -04:00
Robert Osfield
dac9ed17f1 Updated ChangeLog 2018-04-20 15:58:27 +01:00
Robert Osfield
709194c88c Replaced osgUtil::IntersectVisitor usage with osgUtil::InteresectionVisitor 2018-04-20 14:32:34 +01:00
Robert Osfield
8de8af6850 Removed TriStripVisitor for default set of Optimizer passes as it doesn't generate efficient scene graphs 2018-04-20 11:48:46 +01:00
Robert Osfield
7bda8083fb Added osgUtil::optimizeMesh(osg::Node* node) convinience method 2018-04-20 11:48:39 +01:00
Robert Osfield
a082b57c3f Removed usage of the osgUtil::TriStripVisitor is it generates osg::Geometry that perform very poorly when using VBO and VAO's vs GL DisplayLists.
With DisplayLists being deprecated in GL and VBO and VAO becoming standard it's best to standardize on using the osgUtil::MeshOptimizers instead of TripStrupVisitor
2018-04-20 11:44:44 +01:00
Robert Osfield
547340659f Fixed the set*Binding() methods so that they assign BufferObjects when required 2018-04-19 19:43:14 +01:00
Robert Osfield
29d12ddcbc Fixed messages 2018-04-19 19:42:51 +01:00
Robert Osfield
f95fdd4d4e Fixed the GLBufferObject size computation so that it takes into account padding. 2018-04-19 19:41:51 +01:00
Robert Osfield
bf6db4eee7 Replaced the use of osgUtil::TriStripVisitor with ogUtil::MeshOptimizer usage to improve performance.
Fixed set setColorArray assignement to pass in the color binding
2018-04-19 19:36:19 +01:00
Robert Osfield
fe39589771 Fixed the handle of boundary equalization 2018-04-18 10:15:01 +01:00
Robert Osfield
d88f0c4cd1 Added --equalize-boundaries -e command line option to call terrain->setEqualizeBoundaries(true) 2018-04-18 10:03:52 +01:00
Robert Osfield
a2a026e116 Updated version number in prep for future 3.6.1 release. 2018-04-16 17:53:38 +01:00
Robert Osfield
38ad6ed3b3 Fixed inline Drawable::draw(..) method 2018-04-16 17:18:49 +01:00
Robert Osfield
9d72bf4712 Fixed Geometry::drawImplmentation() handling of VBO's to prevent them from being used when display lists are used. 2018-04-16 17:18:37 +01:00
Robert Osfield
15429198b8 Replaced osgViewer::GraphicsWindow dynamic_cast as it's not neccessary. 2018-04-15 08:25:57 +01:00
372 changed files with 3123 additions and 5291 deletions

View File

@@ -1,6 +1,6 @@
OpenSceneGraph Library 3.6.0
OpenSceneGraph Library 3.6.3
568 Contributors:
569 Contributors:
Firstname Surname
-----------------
@@ -10,10 +10,10 @@ Stephan Huber
Paul Martz
Laurens Voerman
Farshid Lashkari
Mathias Fr<EFBFBD>hlich
Mathias Frhlich
Marco Jez
Wang Rui
Jean-S<EFBFBD>bastien Guay
Jean-Sbastien Guay
Ulrich Hertlein
Mike Weiblen
Sukender
@@ -67,11 +67,11 @@ Norman Vine
Chris Denham
Sherman Wilcox
Serge Lages
Romano Jos<EFBFBD> Magacho da Silva
Romano Jos Magacho da Silva
Mourad Boufarguine
Alberto Farre
Glenn Waldron
Andr<EFBFBD> Garneau
Andr Garneau
Adrian Egli
Sebastian Messerschmidt
Randall Hopper
@@ -86,7 +86,7 @@ Michael Gronager
Martin Naylor
Joakim Simonsson
David Spilling
Daniel Sj<EFBFBD>lie
Daniel Sjlie
Bryan Thrall
Andreas Ekstrand
Rafa Gaitan
@@ -123,7 +123,7 @@ Gordon Tomlinson
Frederic Marmond
Frederic Bouvier
Carlo Camporesi
Bj<EFBFBD>rn Blissing
Bjrn Blissing
Alexander Sinditskiy
Vladimir Chebaev
Thibault Genessay
@@ -143,7 +143,7 @@ Uwe Woessner
Tony Horrobin
Thom DeCarlo
Tatsuhiro Nishioka
Tanguy Fautr<EFBFBD>
Tanguy Fautr
Sean Spicer
Ryan Kawicki
Richard Schmidt
@@ -202,7 +202,7 @@ Phil Atkin
Pawel Ksiezopolski
Patrick Neary
Nathan Monteleone
Miha Rav<EFBFBD>elj
Miha Ravelj
Miguel Escriva
Mattias Linde
Mark Sciabica
@@ -234,8 +234,8 @@ Christian Ruzicka
Christian Buchner
Charles Cole
Blake Williams
Bj<EFBFBD>rn Hein
Aur<EFBFBD>lien Chatelain
Bjrn Hein
Aurlien Chatelain
Antoine Hue
Andrew Bettison
Andreas Henne
@@ -264,7 +264,7 @@ Paul Obermeier
Nguyen Van Truong
Nathan Cournia
Morten Haukness
Morn<EFBFBD> Pistorius
Morn Pistorius
Michael Mc Donnell
Michael Henheffer
Michael Guerrero
@@ -297,7 +297,7 @@ Guillaume Taze
Guillaume Chouvenc
Giuseppe Donvito
Gill Peacegood
Giampaolo Vigan<EFBFBD>
Giampaolo Vigan
Gerrick Bivins
George Tarantilis
Ferdi Smit
@@ -305,7 +305,7 @@ Eduardo Poyart
Edgar Ellis
Dmitry Marakasov
Dimi Christopoulos
Diane Delall<EFBFBD>e
Diane Delalle
David Longest
David Ergo
Daniel Trstenjak
@@ -337,7 +337,7 @@ Vasily Radostev
Valery Bickov
Valeriy Dubov
Vaclav Bilek
Tyge L<EFBFBD>vset
Tyge Lvset
Troy Yee
Torben Dannahauer
Tony Vasile
@@ -387,7 +387,7 @@ Piotr Rak
Pierre Bourdin
Philipp Svehla
Philipp Siemoleit
Philipp M<EFBFBD>chler
Philipp Mchler
Philip Lamb
Petr Salinger
Peter Bear
@@ -412,7 +412,7 @@ Nick Thu
Nick Black
Mojtaba Fathi
Mirko Viviani
Mikkel Gj<EFBFBD>l
Mikkel Gjl
Mike Krus
Mike Garrity
Mick Thu
@@ -465,7 +465,7 @@ Juan Hernando
Josh Portway
Jonathan Greig
John Tan
John Hedström
John Hedstrm
John Grant
John Farrier
John Donovan
@@ -523,11 +523,11 @@ David Jung
Danny Valente
Daniel Stien
Dan Minor
C<EFBFBD>sar L. B. Silveira
Csar L. B. Silveira
Cyril Brulebois
Curtis Rubel
Cory Slep
Cl<EFBFBD>ment B<EFBFBD>sch
Clment Bsch
Clay Fowler
Claus Steuer
Chuck Sembroski
@@ -537,6 +537,7 @@ Christophe Herreman
Christian Noon
Christian Kaser
Christian Ehrlicher
Chris White
Chris McGlone
Chris Djali
Carlos Garcea

View File

@@ -3,8 +3,8 @@
#
SET(OPENSCENEGRAPH_MAJOR_VERSION 3)
SET(OPENSCENEGRAPH_MINOR_VERSION 6)
SET(OPENSCENEGRAPH_PATCH_VERSION 0)
SET(OPENSCENEGRAPH_SOVERSION 156)
SET(OPENSCENEGRAPH_PATCH_VERSION 3)
SET(OPENSCENEGRAPH_SOVERSION 158)
# set to 0 when not a release candidate, non zero means that any generated
@@ -26,25 +26,10 @@ if(COMMAND cmake_policy)
# tell CMake to prefer CMake's own CMake modules when available
# only available from cmake-2.8.4
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 8) OR
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3))
if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3)
cmake_policy(SET CMP0017 NEW)
endif()
# cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names
# quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below."
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 6) OR
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6 AND ${CMAKE_PATCH_VERSION} GREATER 0))
cmake_policy(SET CMP0008 OLD)
endif()
# nicer version check - but needs at least CMake 2.6.2? Worth upgrading the requirements?
#if("${CMAKE_VERSION}" VERSION_GREATER 2.8.10)
# or even easier (available in cmake-2.6)
#if(POLICY CMPxyzw)
endif()
IF(APPLE)
@@ -330,13 +315,14 @@ IF(UNIX AND NOT ANDROID)
ENDIF()
INCLUDE_DIRECTORIES(${OpenSceneGraph_SOURCE_DIR}/include/)
# Make the headers visible to everything
IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
ENDIF()
INCLUDE_DIRECTORIES(${OpenSceneGraph_SOURCE_DIR}/include/)
INCLUDE_DIRECTORIES(SYSTEM ${OPENGL_INCLUDE_DIR})
# Common global definitions
@@ -556,9 +542,13 @@ ELSE()
OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." ON)
ENDIF()
SET(OSG_GL_CONTEXT_VERSION "1.0" CACHE STRING "GL Context String to pass when creaing graphics contexts")
# Map the OSG_GL*_AVAILABLE settings to OpenGL header settings
IF (OSG_GL3_AVAILABLE)
SET(OSG_GL_CONTEXT_VERSION "3.3")
IF (APPLE)
SET(OPENGL_HEADER1 "#include <OpenGL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "#include <OpenGL/gl3.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
@@ -571,7 +561,7 @@ IF (OSG_GL3_AVAILABLE)
SET(OPENGL_HEADER1 "#include <GL/glcorearb.h>" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
ELSE()
SET(OPENGL_HEADER1 "#include <GL3/gl3.h>" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER1 "#include <GL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
ENDIF()
@@ -762,7 +752,6 @@ ELSE()
FIND_PACKAGE(COLLADA)
FIND_PACKAGE(FBX)
FIND_PACKAGE(ZLIB)
FIND_PACKAGE(Xine)
FIND_PACKAGE(OpenVRML)
FIND_PACKAGE(GDAL)
FIND_PACKAGE(GTA)

760
ChangeLog
View File

@@ -1,3 +1,763 @@
Fri, 14 Sep 2018 10:41:24 +0100
Author : Robert Osfield
Updated version number and date for 3.6.3 stable release
Thu, 13 Sep 2018 08:52:21 +0100
Author : Robert Osfield
Updated ChangeLog for 3.6.3-rc3
Thu, 13 Sep 2018 08:47:17 +0100
Author : Robert Osfield
Updated for 3.6.3-rc3
Wed, 12 Sep 2018 17:45:49 +0100
Author : Robert Osfield
Standardized the glTexStorage*() calls to use osg::maximum(_numMipmapLevels,1) of rnumber of mipmaps to keep the usage consistent. Fixed the erronous Texture2DArray glTexStorage call so that it used the _numMipmapLevels as above to resolve bug in allocation.
Tue, 11 Sep 2018 15:32:44 +0100
Author : Robert Osfield
Warning fixes
Tue, 11 Sep 2018 12:29:40 +0100
Author : Robert Osfield
Fixed warning
Tue, 11 Sep 2018 12:23:01 +0100
Author : Robert Osfield
Updated for 3.6.3-rc2
Tue, 11 Sep 2018 11:56:04 +0100
Author : Robert Osfield
Updated rc number 2 for 3.6.3-rc2
Tue, 11 Sep 2018 11:29:36 +0100
Author : OpenSceneGraph git repository
Merge pull request #620 from LaurensVoerman/txt_SCREEN_COORDSfix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set.
Tue, 11 Sep 2018 11:23:34 +0100
Author : Robert Osfield
Fixed hang using a ReentrantMutex
Tue, 11 Sep 2018 10:13:49 +0100
Author : Robert Osfield
Fixed build
Tue, 11 Sep 2018 09:31:35 +0100
Author : Robert Osfield
Fixed build
Tue, 11 Sep 2018 09:03:01 +0100
Author : Robert Osfield
Cleaned up code
Mon, 10 Sep 2018 08:00:41 -0400
Author : gwaldron
osgText: fixed thread-safety issues in Glyph and Font
Sat, 8 Sep 2018 18:18:33 +0200
Author : mp3butcher
fix examples context creation for X11 (when display not :0.0)
Tue, 11 Sep 2018 08:34:20 +0100
Author : OpenSceneGraph git repository
Merge pull request #619 from mathieu/topic/SaveInlinedImagesAdded saving of inline Images without having the physical image file.
Tue, 11 Sep 2018 08:11:27 +0100
Author : Robert Osfield
Added greater control of how cubemap is set up and controlled
Fri, 7 Sep 2018 15:09:15 +0200
Author : Laurens Voerman
fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set.
Fri, 7 Sep 2018 14:04:41 +0200
Author : Mathieu MARACHE
Added saving of inline Images without having the physical image file.The can be read from and inlined image file
Thu, 6 Sep 2018 12:30:18 +0100
Author : Robert Osfield
Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6
Thu, 6 Sep 2018 12:29:44 +0100
Author : Robert Osfield
Updated for 3.6.3-rc1
Thu, 6 Sep 2018 11:50:21 +0100
Author : Robert Osfield
Fixed memory leak with assignment of default value to ObjectSerializer
Wed, 5 Sep 2018 18:06:25 +0100
Author : OpenSceneGraph git repository
Merge pull request #616 from eligovision/OpenSceneGraph-3.6_particlesParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRI…
Wed, 5 Sep 2018 18:01:33 +0100
Author : Robert Osfield
Fixed copy constructor
Wed, 5 Sep 2018 19:00:29 +0300
Author : Konstantin S. Matveyev
ParticleSystem: Using of GL_TRIANGLES for GLES2 and upper; GL_QUADS otherwise
Wed, 5 Sep 2018 14:04:57 +0100
Author : OpenSceneGraph git repository
Merge pull request #617 from aluaces/Image_scaleImage_typoFix typo in the initial check of Image::scaleImage().
Wed, 5 Sep 2018 13:27:35 +0200
Author : Alberto Luaces
Fix typo in the initial check of Image::scaleImage().
Wed, 5 Sep 2018 14:00:09 +0300
Author : Konstantin S. Matveyev
ParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRIANGLES)
Tue, 4 Sep 2018 10:35:38 -0400
Author : Jason Beverage
Protect the _programSet in Shader with a mutex. This prevents thread safety issues when Shader objects are used in multiple programs.
Wed, 5 Sep 2018 09:33:24 +0100
Author : Robert Osfield
Updated ChangeLog
Tue, 4 Sep 2018 15:26:30 +0100
Author : Robert Osfield
Changed the ShapeDrawable::build() methpd so that it does run when the ShadpwDrawabe is a KdTree.
Tue, 4 Sep 2018 14:13:32 +0100
Author : Robert Osfield
Updated SO version as XmlNode::Input changes change the ABI
Tue, 4 Sep 2018 12:19:14 +0100
Author : Robert Osfield
Added support for reading UTF-8 encoded of xml files
Mon, 3 Sep 2018 12:30:02 +0100
Author : Robert Osfield
Changed the logic for whether to call setUpThreading() in setThreadingModel() to make it possible to changed threadings even if the threading model starts of as SingleThreaded
Mon, 3 Sep 2018 11:19:50 +0100
Author : Robert Osfield
Updated version number to 3.6.3 in prep for next naintainance release
Mon, 3 Sep 2018 10:16:45 +0100
Author : Robert Osfield
Merge branch 'OpenSceneGraph-3.6-TexStorage' into OpenSceneGraph-3.6
Mon, 3 Sep 2018 09:37:36 +0100
Author : Robert Osfield
Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor
Mon, 3 Sep 2018 09:37:36 +0100
Author : Robert Osfield
Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor
Tue, 28 Aug 2018 11:22:57 +0100
Author : Robert Osfield
Replaced the glSGetProcAddressARB code with the dlsym() usage as the NVidia driver looks to be returning non NULL pointers for invalid function names.
Tue, 28 Aug 2018 11:22:57 +0100
Author : Robert Osfield
Replaced the glSGetProcAddressARB code with the dlsym() usage as the NVidia driver looks to be returning non NULL pointers for invalid function names.
Wed, 22 Aug 2018 11:13:11 +0100
Author : Robert Osfield
Enabled point sprite validty modes.
Wed, 22 Aug 2018 11:13:11 +0100
Author : Robert Osfield
Enabled point sprite validty modes.
Wed, 22 Aug 2018 10:42:18 +0100
Author : Robert Osfield
Merged fix for PointSprite modes validity checks from master.
Wed, 22 Aug 2018 10:42:18 +0100
Author : Robert Osfield
Merged fix for PointSprite modes validity checks from master.
Tue, 21 Aug 2018 09:38:03 -0400
Author : plevy
Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows BuildChange GL_RGBA16F to GL_RGBA16F_ARB to fix Windows build.
Tue, 21 Aug 2018 09:38:03 -0400
Author : plevy
Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows BuildChange GL_RGBA16F to GL_RGBA16F_ARB to fix Windows build.
Tue, 21 Aug 2018 09:19:50 +0100
Author : Robert Osfield
Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build
Tue, 21 Aug 2018 09:19:50 +0100
Author : Robert Osfield
Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build
Mon, 20 Aug 2018 10:08:09 +0100
Author : OpenSceneGraph git repository
Merge pull request #606 from mp3butcher/OpenSceneGraph-3.6-TexStorageOpen scene graph 3.6 tex storage
Mon, 20 Aug 2018 05:10:11 +0200
Author : mp3butcher
complete TexStorage support
Mon, 20 Aug 2018 04:50:14 +0200
Author : mp3butcher
add more extensions
Sun, 19 Aug 2018 22:46:10 +0200
Author : mp3butcher
remove redondant variable and test
Fri, 17 Aug 2018 16:51:55 +0100
Author : Robert Osfield
Removed check as this is better outside of the function
Fri, 17 Aug 2018 12:20:59 +0100
Author : Robert Osfield
Created a GLenum Texture::selectSizedInternalFormat(const osg::Image* image=0) const method to help clean up set up of glTexStorage. Fixed typo.
Fri, 17 Aug 2018 10:31:46 +0100
Author : Robert Osfield
Merged changes to InternalPixelRelations sizedInternalFormats[] from master
Thu, 16 Aug 2018 19:23:17 +0100
Author : Robert Osfield
Fixed memory leak associated with VertexArrayStte objects not getting released on destruction of Geometry/Drawables.
Wed, 8 Aug 2018 14:42:04 +0100
Author : Robert Osfield
From Chris White, Cygwin build fix
Wed, 8 Aug 2018 15:05:53 +0300
Author : Vic-Min
Renamed USE_DEPRECATED_API to OSG_USE_DEPRECATED_API
Tue, 31 Jul 2018 16:58:41 +0100
Author : OpenSceneGraph git repository
Merge pull request #583 from emminizer/flt-registry-cacheOpenFlight: Replace internal caches with osgDB::ObjectCache use. Fix…
Tue, 31 Jul 2018 11:45:33 -0400
Author : Daniel Emminizer
OpenFlight: Replace internal caches with osgDB::ObjectCache use. Fixes unbounded memory growth when using readNode(std::istream&, ...) method.
Tue, 31 Jul 2018 09:13:20 +0100
Author : Robert Osfield
Removed unneccessary FIX ME statement.
Fri, 27 Jul 2018 17:34:30 +0100
Author : Robert Osfield
Fixed check against dataType changes
Wed, 25 Nov 2015 09:36:15 +1100
Author : Alex Burton
updated osgviewerWX to remove deprecated calls in wxWidgets 3.x
Mon, 9 Jul 2018 17:55:38 +0100
Author : OpenSceneGraph git repository
Merge pull request #573 from emminizer/fix-flt-typoFLT: Fix texture unit typo and code style from PR 568.
Mon, 9 Jul 2018 06:34:41 -0400
Author : Daniel Emminizer
FLT: Fix texture unit typo and code style from PR 568.
Fri, 29 Jun 2018 10:56:35 +0100
Author : Robert Osfield
Updated ChangeLog for 3.6.2 release
Fri, 29 Jun 2018 10:56:01 +0100
Author : Robert Osfield
Updated date for 3.6.2 releases
Fri, 29 Jun 2018 10:54:13 +0100
Author : Robert Osfield
Updates for 3.6.2 stable release
Fri, 29 Jun 2018 10:53:23 +0100
Author : Robert Osfield
Fixed isPointSpriteModeSupported assignment bug
Fri, 29 Jun 2018 09:52:47 +0100
Author : Robert Osfield
Removed the gl3.h usage for GL3 case as these headers were replaced by glcorearb.h, it's probably better to just fallback to gl.h and have the OSG get the extentions at runtime.
Thu, 28 Jun 2018 07:34:49 +0100
Author : Robert Osfield
UPdated ChangeLog
Thu, 28 Jun 2018 07:06:59 +0100
Author : Robert Osfield
Updated for rc3
Wed, 27 Jun 2018 21:21:31 -0700
Author : Larry-Hu
Remove call to nonexistent member seekpos() of std::fpos in VS 2017 version 15.8 or later
Wed, 27 Jun 2018 20:59:09 +0100
Author : OpenSceneGraph git repository
Merge pull request #568 from emminizer/fix-flt-texture-export-gl3OpenFlight: Textures now correctly export in GLCORE mode.
Wed, 27 Jun 2018 12:57:20 -0400
Author : Daniel Emminizer
OpenFlight: Textures now correctly export in GLCORE mode.
Wed, 27 Jun 2018 09:17:00 +0100
Author : Robert Osfield
Updated for 3.6.2-rc2
Wed, 27 Jun 2018 09:06:58 +0100
Author : Robert Osfield
Fixed relaseGLObjects() calls
Tue, 26 Jun 2018 20:50:55 +0100
Author : Robert Osfield
Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6
Tue, 26 Jun 2018 20:46:49 +0100
Author : Robert Osfield
Replaced creation of a temporary Settings object on the heap with creation on the stack to improve performance
Tue, 26 Jun 2018 20:17:07 +0100
Author : OpenSceneGraph git repository
Merge pull request #566 from emminizer/fix-gl_rb-in-gluscaleimageGL_RG is now a supported format in gluScaleImage().
Tue, 26 Jun 2018 20:10:51 +0100
Author : Robert Osfield
Added GLExtensions::isPointSpriteModeSupported to allow it to be enable for GL versions that support GL_POINT_SPRITE_ARB/GL_POINT_SPRITE_OES
Tue, 26 Jun 2018 14:44:34 -0400
Author : Daniel Emminizer
GL_RG is now a support format in gluScaleImage().
Mon, 25 Jun 2018 20:02:30 +0100
Author : Robert Osfield
Moved osg::clampProjectionMatrix() template from CullVisitor.cpp into include/osg/CullSettings to make it easier to implement custom clampProjectionMatrix callbacks
Wed, 20 Jun 2018 13:59:10 +0100
Author : Robert Osfield
Updates for 3.6.2-rc1
Tue, 19 Jun 2018 17:09:56 +0100
Author : Calum Robinson
Fix z near calculation for lines
Tue, 19 Jun 2018 11:50:38 +0100
Author : OpenSceneGraph git repository
Merge pull request #558 from LaurensVoerman/submit-ffmpeg3.2resolve av sync failure with ffmpeg 3.2 and up
Tue, 19 Jun 2018 09:21:02 +0200
Author : Laurens Voerman
resolve av sync failure with ffmpeg 3.2 and up
Tue, 19 Jun 2018 00:33:03 +0800
Author : 弥继平
Fixed the position of the viewport for the cameraThe position of viewport doesn't setup properly, some part of viewer is out of CMFC_OSG_MDIView, and not visible.
Thu, 14 Jun 2018 14:31:28 +0200
Author : Laurens Voerman
remove include/osgQt from doxyfiles; add osgPresentation and osgUI
Thu, 14 Jun 2018 14:44:16 +0100
Author : OpenSceneGraph git repository
Merge pull request #555 from emminizer/fix-noisy-flt-loadingFLT: Missing optional attr files on textures no longer generates a co…
Thu, 14 Jun 2018 07:33:08 -0400
Author : Daniel Emminizer
FLT: Missing optional attr files on textures no longer generates a console warning.
Thu, 14 Jun 2018 08:54:21 +0100
Author : Robert Osfield
Changed version to 3.6.2 in prep for next release
Thu, 14 Jun 2018 08:51:00 +0100
Author : Robert Osfield
To handle calling Array::setBinding() after Geometry::set*Array() call, to the Geometry::addVertexBufferObjectIfRequired(osg::Array* array) added treatment of array->getBinding()==Array::BIND_UNDEFINED as BIND_PER_VERTEX as a safe fallback.
Wed, 13 Jun 2018 12:23:29 +0100
Author : Robert Osfield
Moved Stae::setUseVertexAttributeAliasing(bool) implementation to .cpp an added call to _globalVertexArrayState->assignAllDispatchers(); to ensure state is consistent
Sun, 3 Jun 2018 10:27:00 +0100
Author : Robert Osfield
Updated LICENSE to use the WxWidgets-3.1 and updates to the LGPL-2.1-only that updates addresses and tighten up language used.Functionality the OSGPL-1.0 is the same as OSGPL-0.0, All the OpenSceneGraph users can use either OSGPL-0.0 or OSGPL-1.0.
Thu, 31 May 2018 15:11:19 +0100
Author : Robert Osfield
Removed deprecated xine plugin to simplify licensing (xine plugin is GPL'd)
Thu, 31 May 2018 14:45:37 +0100
Author : Robert Osfield
As the author of all the files in osgPresentation and present3D have rectified the license notices to reflect their intended license rather than histoical license they had prior to being merged into the OpenSceneGraph project. OSGPL was always intended but missed during merge. Replaced the GPL notices with OSGPL usge in present3D and include/osgPresentation as this was intended when Present3D was merged back into OpenSceneGraph but missed.
Mon, 28 May 2018 08:58:21 +0100
Author : Robert Osfield
Updated for 3.6.1
Sun, 27 May 2018 14:21:57 +0200
Author : Philippe Renon
Notify: silence warning about unused argument
Wed, 23 May 2018 19:54:10 +0100
Author : Robert Osfield
Updated ChangeLog
Wed, 23 May 2018 19:53:12 +0100
Author : Robert Osfield
Updates for 3.6.1-rc7
Wed, 23 May 2018 17:02:28 +0100
Author : Robert Osfield
Updated REMOVE_SERIALIZER( ImageAttachment ); block to use 154 version to retain compatibility with binaries made with 153 SOVERSION prior to the Imageattachement change
Wed, 23 May 2018 14:30:31 +0100
Author : Robert Osfield
Implemented StateGraph reuse in in scene graph Canera's RenderStage.
Wed, 23 May 2018 14:13:27 +0100
Author : Robert Osfield
Fixed warning of RenderLeaf's having multiple references in CullVisitor::createOrReuseRenderLeaf() but forcing a clean up of the StateGraph at the end of RenderStage::draw()
Wed, 23 May 2018 07:47:15 +0100
Author : Robert Osfield
Added check to make sure that glEnablei and glDisablei are only called when the capability is non zero to fix GL invalid value error.
Wed, 23 May 2018 06:32:42 +0100
Author : Robert Osfield
Fixed type of Timer_t under Windows
Tue, 22 May 2018 09:04:48 +0100
Author : Robert Osfield
Updates for rc6
Mon, 21 May 2018 13:26:04 -0400
Author : gwaldron
osgText: perform pixel size computation in double-precision to prevent coordinate jitter
Mon, 21 May 2018 18:14:18 +0100
Author : Robert Osfield
Moved the rotation to before the scale
Mon, 21 May 2018 13:18:29 +0100
Author : Robert Osfield
Fixed typos
Mon, 21 May 2018 13:10:40 +0100
Author : Robert Osfield
Restored the REGISTER_WINDOWINGSYSTEMINTERFACE macro to the include/osg/GraphicsContext header and removed the OSGVIEWER_EXPORT as this was causing compatibility issues with osgQt.In GraphicsWindowWin32 replaced REGISTER_WINDOWINGSYSTEMINTERFACE usage with locally implemented equivilant with the required OSGVIEWER_EXPORT.
Sun, 20 May 2018 13:39:44 +0100
Author : Robert Osfield
Updated ChangeLog and README.md for rc5
Sun, 20 May 2018 13:22:58 +0100
Author : Robert Osfield
Restructed SCREEN auto scaling so that it's removes the rotation of the modelview matrix so that the XY coords of the text map directly to window xy coords for all text alignment types
Fri, 18 May 2018 15:49:28 +0100
Author : Robert Osfield
Updates in prep for 3.6.1-rc5
Fri, 18 May 2018 14:58:53 +0100
Author : Robert Osfield
Moved REGISTER_WINDOWINGSYSTEMINTERFACE from include/osg/GraphicsContext to include/osgViewer/GraphicsWindow and added OSGVIEWER_EXPORT
Fri, 18 May 2018 13:53:39 +0100
Author : Robert Osfield
Added GL_RED and GL_RG support to _readColor()/Image::getColor();
Fri, 18 May 2018 12:52:50 +0100
Author : Robert Osfield
Cleaned up the WindowingSystemInterface registration
Fri, 18 May 2018 12:47:34 +0100
Author : Robert Osfield
Fixed create of graphics context by explicting adding USE_GRAPHICSWINDOW to force the WindowingSystemInterface to initialize
Fri, 18 May 2018 12:42:20 +0100
Author : Robert Osfield
Quitened down unsupport compression output when passing in a file with a non rgb extension
Fri, 18 May 2018 10:00:10 +0100
Author : Robert Osfield
Introduced a local StateGraph hierarchy into CullVisitor::apply(osg::Camera&) and RenderBin to fixed RTT Camera bug where multiple RTT Camera end up with the rendering back end results assigned to them which occured when RTT Camera's share the same StateSet or null StateSet.
Mon, 14 May 2018 09:34:04 +0100
Author : Robert Osfield
Fixed support for update and event callbacks on StateSet/Uniform/StateAttributes on View(er) Cameras.
Mon, 14 May 2018 08:43:08 +0100
Author : Robert Osfield
Renamed the counter used to enable traversal order sorting
Mon, 14 May 2018 08:24:02 +0100
Author : Robert Osfield
Improved the handling of precision
Sun, 13 May 2018 11:52:06 +0100
Author : Robert Osfield
Fixed crash when using ShapeDrawable with a TriangleMesh or ConvexHull shape due to missing texture coords
Sun, 13 May 2018 09:23:38 +0100
Author : Robert Osfield
Updated for rc
Sun, 13 May 2018 09:18:31 +0100
Author : Robert Osfield
Removed _traverseNumber variable that was duplicating the one in NodeVisitor base class
Sat, 12 May 2018 12:47:08 +0100
Author : Robert Osfield
Updates for 3.6.1-rc4
Sat, 12 May 2018 12:41:42 +0100
Author : Robert Osfield
Build fixes for OSG_USE_REF_PTR_IMPLICIT_OUTPUT set to OFF
Sat, 12 May 2018 11:40:25 +0100
Author : Robert Osfield
Rewrote TextBase::computeMatrix(..) computation of the scaling factor with slower but easier to understand and more robust code
Sat, 12 May 2018 07:51:51 +0100
Author : Robert Osfield
Removed use of deprecated cmake policy
Fri, 11 May 2018 11:15:45 +0100
Author : Robert Osfield
Moved constructors and destructors to .cpp
Fri, 11 May 2018 11:11:48 +0100
Author : Robert Osfield
Revert "Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging"This reverts commit 0fc7aa8cc096e59b9366df60c1fdbd0803ac4481.
Fri, 11 May 2018 09:00:22 +0100
Author : Robert Osfield
Fixed crash the occurred when passing in a osgDB::Options to the ObjectCache that doesn't have any references to it.
Fri, 11 May 2018 08:58:30 +0100
Author : Robert Osfield
Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging
Thu, 10 May 2018 18:58:29 +0100
Author : Robert Osfield
Fixed build when OSG_ENVVAR_SUPPORTED is disabled and quietened down warnings using OSG_UNUSED* macros
Thu, 10 May 2018 18:50:17 +0100
Author : Robert Osfield
Changed the ordering of the build include directory and the source include directory to avoid build issues on systems where a different version of the OSG has been built in-source then another built out-of-source resulting in conflicts
Thu, 10 May 2018 16:59:56 +0100
Author : Robert Osfield
Fixed typo
Sun, 6 May 2018 07:47:23 +0100
Author : Robert Osfield
Updates for 3.6.1-rc3
Sat, 5 May 2018 15:47:28 +0100
Author : Robert Osfield
Restructed the handling of SCREEN_COORD scaling to better handle window resizing
Sat, 5 May 2018 12:31:00 +0100
Author : Robert Osfield
Added C++ specific path for calling std::map<>::erase() to avoid issues with std::map<>::erase implementation that invalidates iterators
Sat, 5 May 2018 12:28:45 +0100
Author : Robert Osfield
Replaced std::auto_ptr<> usage as it's deprecated in C++11 and will be removed in C++17
Fri, 4 May 2018 16:11:31 +0100
Author : OpenSceneGraph git repository
Merge pull request #545 from emminizer/fix-gl3-text-bad-modeText only applies GL_TEXTURE_2D modes when fixed function is availabl…
Fri, 4 May 2018 06:44:13 -0400
Author : Daniel Emminizer
Text only applies GL_TEXTURE_2D modes when fixed function is available. Prevents GL3 Core Profile console spam.
Fri, 4 May 2018 10:54:02 +0100
Author : Robert Osfield
Added non const version of State::getActiveDisplaySettings()
Fri, 4 May 2018 09:44:43 +0100
Author : Robert Osfield
Added check for null to prevent null entries getting into the cache
Fri, 18 Nov 2016 14:56:05 +0000
Author : Robert Osfield
Added osg::MakeString class to make it easier to create std::string's using std::ostream style << usage.
Fri, 4 May 2018 09:22:54 +0100
Author : Robert Osfield
Fixed null pointer warning
Thu, 3 May 2018 12:56:08 +0200
Author : Björn Blissing
Check existence of path before reading imageWhen loading texture images inside the FBX plugin check that the path
exists before trying to read the image. This is done to avoid
unnecessary warnings inside the readRefImageFile function.
Wed, 2 May 2018 09:14:04 +0100
Author : Robert Osfield
Updated ChangeLog
Wed, 2 May 2018 09:10:54 +0100
Author : Robert Osfield
Updates for the 3.6.1-rc2
Mon, 30 Apr 2018 11:55:17 +0100
Author : Robert Osfield
Updated SO version to reflect change in ABI
Mon, 30 Apr 2018 11:44:02 +0100
Author : OpenSceneGraph git repository
Merge pull request #542 from psyinf/fix_particle_system_headerFIX: <osgParticle> removed unimplemented functions from header
Mon, 30 Apr 2018 11:16:02 +0200
Author : Sebastian Messerschmidt
FIX: <osgParticle> removed unimplemented functions from header
Fri, 27 Apr 2018 11:23:07 +0100
Author : Robert Osfield
Fixed particle update bug where a ParticleSystem wouldn't start when loaded during the frame loop due to the _last_frame value not being set.
Thu, 26 Apr 2018 10:21:53 +0100
Author : Robert Osfield
Updated ChangeLog, README.md and rc number for 3.6.1-rc1
Thu, 26 Apr 2018 09:49:35 +0100
Author : Robert Osfield
Split up #pragma so that there only three parameters per line to aovid Intel driver bug crash
Thu, 26 Apr 2018 09:36:52 +0100
Author : Robert Osfield
Renamed text.vert and text.frag to osgText_Text.vert and .frag to avoid name overlapping with user shaders.
Wed, 25 Apr 2018 09:48:02 +0100
Author : Julien Valentin
add wrapper for osg::DrawIndirectBufferObject
Tue, 24 Apr 2018 17:05:03 +0100
Author : Robert Osfield
Renamed CMake variable + C++ #define to OSG_GL_CONTEXT_VERSION
Tue, 24 Apr 2018 16:22:13 +0100
Author : Robert Osfield
Added OSG_GL_CONTEXT_STRING cmake variable to set include/osg/GL headers that sets Traits::glContextVersion.
Tue, 24 Apr 2018 15:38:02 +0100
Author : OpenSceneGraph git repository
Merge pull request #537 from openscenegraph/revert-536-default-gl3-contextRevert "When GL3 build is enabled, default context requested is version 3.3, …"
Tue, 24 Apr 2018 15:37:44 +0100
Author : OpenSceneGraph git repository
Revert "When GL3 build is enabled, default context requested is version 3.3, …"
Tue, 24 Apr 2018 15:36:11 +0100
Author : OpenSceneGraph git repository
Merge pull request #536 from emminizer/default-gl3-contextWhen GL3 build is enabled, default context requested is version 3.3, …
Tue, 24 Apr 2018 15:33:03 +0100
Author : Robert Osfield
Refactored the handling of glyph and shadow alpha values to make the text and shadow clearer for fonts with narrow glyphs
Tue, 24 Apr 2018 13:52:53 +0100
Author : Robert Osfield
Refactored the handling of text bounding box to provide more stable bounding box computation
Tue, 24 Apr 2018 06:31:32 -0400
Author : Daniel Emminizer
When GL3 build is enabled, default context requested is version 3.3, enabling core profile by default.
Fri, 20 Apr 2018 21:16:46 +0200
Author : Alberto Luaces
Small fix for uncaught typo.
Fri, 20 Apr 2018 18:18:22 +0200
Author : Alberto Luaces
Fix typos and spelling.
Mon, 23 Apr 2018 11:02:03 +0100
Author : OpenSceneGraph git repository
Merge pull request #534 from emminizer/fix-msvc-includesFix includes for MSVC 2015 build.
Fri, 20 Apr 2018 13:16:43 -0400
Author : Daniel Emminizer
Fix includes for MSVC 2015 build.
Fri, 20 Apr 2018 15:58:27 +0100
Author : Robert Osfield
Updated ChangeLog
Fri, 20 Apr 2018 14:32:34 +0100
Author : Robert Osfield
Replaced osgUtil::IntersectVisitor usage with osgUtil::InteresectionVisitor
Fri, 20 Apr 2018 10:24:17 +0100
Author : Robert Osfield
Removed TriStripVisitor for default set of Optimizer passes as it doesn't generate efficient scene graphs
Fri, 20 Apr 2018 09:57:04 +0100
Author : Robert Osfield
Added osgUtil::optimizeMesh(osg::Node* node) convinience method
Fri, 20 Apr 2018 11:42:31 +0100
Author : Robert Osfield
Removed usage of the osgUtil::TriStripVisitor is it generates osg::Geometry that perform very poorly when using VBO and VAO's vs GL DisplayLists. With DisplayLists being deprecated in GL and VBO and VAO becoming standard it's best to standardize on using the osgUtil::MeshOptimizers instead of TripStrupVisitor
Thu, 19 Apr 2018 19:43:14 +0100
Author : Robert Osfield
Fixed the set*Binding() methods so that they assign BufferObjects when required
Thu, 19 Apr 2018 19:42:51 +0100
Author : Robert Osfield
Fixed messages
Thu, 19 Apr 2018 19:41:51 +0100
Author : Robert Osfield
Fixed the GLBufferObject size computation so that it takes into account padding.
Thu, 19 Apr 2018 19:36:19 +0100
Author : Robert Osfield
Replaced the use of osgUtil::TriStripVisitor with ogUtil::MeshOptimizer usage to improve performance. Fixed set setColorArray assignement to pass in the color binding
Wed, 18 Apr 2018 10:02:43 +0100
Author : Robert Osfield
Fixed the handle of boundary equalization
Wed, 18 Apr 2018 09:33:12 +0100
Author : Robert Osfield
Added --equalize-boundaries -e command line option to call terrain->setEqualizeBoundaries(true)
Mon, 16 Apr 2018 17:53:38 +0100
Author : Robert Osfield
Updated version number in prep for future 3.6.1 release.
Mon, 16 Apr 2018 15:08:24 +0100
Author : Robert Osfield
Fixed inline Drawable::draw(..) method
Mon, 16 Apr 2018 15:05:11 +0100
Author : Robert Osfield
Fixed Geometry::drawImplmentation() handling of VBO's to prevent them from being used when display lists are used.
Sun, 15 Apr 2018 08:25:57 +0100
Author : Robert Osfield
Replaced osgViewer::GraphicsWindow dynamic_cast as it's not neccessary.
Sat, 7 Apr 2018 18:35:19 +0100
Author : Robert Osfield
Fixed typo
Sat, 7 Apr 2018 17:59:55 +0100
Author : Robert Osfield
Renamed osg::ComputeDispatch to osg::DispatchCompute to make sure the nameing between GL and OSG is consistent i.e glDispatchCompute -> osg::DispatchComputeUpdated AUTHORS.txt, NEWS.txt and README.txt for CMakeLists.txt for 3.6.0 release
Sat, 7 Apr 2018 07:19:14 +0100
Author : Robert Osfield
Updated ChangeLog
Sat, 7 Apr 2018 07:18:41 +0100
Author : Robert Osfield
Updated for rc7

View File

@@ -1,8 +1,8 @@
OpenSceneGraph Public License, Version 0.0
OpenSceneGraph Public License, Version 1.0
==========================================
Copyright (C) 2002 Robert Osfield.
Copyright (C) 2018 Robert Osfield.
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
@@ -12,18 +12,19 @@
This library is free software; you can redistribute it and/or modify it
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
or later.
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid
out in the wxWindows section below. The LGPL is contained in the
final section of this license.
Notes: the OSGPL is based on the LGPL-2.1-only WITH WxWindows-exception-3.1,
with the 4 exceptions laid out in the wxWindows section below. The LGPL is
contained in the final section of this license.
-------------------------------------------------------------------------------
wxWindows Library Licence, Version 3
====================================
Copyright (C) 1998 Julian Smart, Robert Roebling [, ...]
wxWindows Library Licence, Version 3.1
======================================
Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
@@ -43,20 +44,20 @@
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licensed under the wxWindows Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
the library as licenced under the wxWindows Library Licence, applying
either version 3.1 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version
3.1 of the Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
under your own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
@@ -71,11 +72,13 @@
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
------------------------------------------------------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -86,7 +89,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -131,7 +134,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
@@ -187,8 +190,8 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
@@ -222,7 +225,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -234,7 +237,7 @@ Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
@@ -292,7 +295,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -343,7 +346,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
@@ -405,7 +408,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -446,7 +449,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -498,7 +501,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -508,7 +511,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -531,8 +534,8 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest

View File

@@ -25,7 +25,7 @@ If details below are not sufficient then head over to the openscenegraph.org to
Robert Osfield.
Project Lead.
7th April 2018.
14th September 2018.
---
@@ -116,4 +116,4 @@ Be sure to set the THIRDPARTY_PATH to the path containing your thirdparty depend
Once this completes an XCode project will have been generated in the osg root folder. Open the generated Xcode project, select the example_osgViewerIPhone target. In 'General' tab set a development team. In the 'Build Settings' tab search for 'Other Linker Flags', then for each target type (debug, release etc) that you want to use open the list of arguments and delete the 'OpenGL' line and the '-framework' line above it. This is because cmake has tried to add the desktop OpenGL library which we don't want.
Once this is done you should be able to build and deploy the `example_osgViewerIPhone` target on your device.
Once this is done you should be able to build and deploy the `example_osgViewerIPhone` target on your device.

View File

@@ -45,6 +45,8 @@ class MyGraphicsContext {
traits->doubleBuffer = false;
traits->sharedContext = 0;
traits->pbuffer = true;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
_gc = osg::GraphicsContext::createGraphicsContext(traits.get());

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include "Cluster.h"

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#ifndef CLUSTER_H

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include "ExportHTML.h"

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#ifndef EXPORTHTML_H

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include "PointsEventHandler.h"

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#ifndef POINTSEVENTHANDLER

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include "ReadShowFile.h"

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef P3D_READFILE

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include <osgViewer/Viewer>
@@ -33,7 +34,7 @@ SDLIntegration::SDLIntegration()
atexit(SDL_Quit);
int numJoysticks = SDL_NumJoysticks();
if (_verbose)
{
std::cout<<"number of joysticks "<<numJoysticks<<std::endl;
@@ -42,9 +43,9 @@ SDLIntegration::SDLIntegration()
std::cout<<"Joystick name '"<<SDL_JoystickName(i)<<"'"<<std::endl;
}
}
_joystick = numJoysticks>0 ? SDL_JoystickOpen(0) : 0;
_numAxes = _joystick ? SDL_JoystickNumAxes(_joystick) : 0;
_numBalls = _joystick ? SDL_JoystickNumBalls(_joystick) : 0;
_numHats = _joystick ? SDL_JoystickNumHats(_joystick) : 0;
@@ -57,13 +58,13 @@ SDLIntegration::SDLIntegration()
std::cout<<"numHats = "<<_numHats<<std::endl;
std::cout<<"numButtons = "<<_numButtons<<std::endl;
}
addMouseButtonMapping(4, 1); // left
addMouseButtonMapping(5, 3); // right
addMouseButtonMapping(6, 2); // middle
addKeyMapping(10, ' '); // R2
addKeyMapping(0, '1'); // 1
addKeyMapping(1, '2'); // 2
addKeyMapping(2, '3'); // 3
@@ -88,7 +89,7 @@ void SDLIntegration::capture(ValueList& axisValues, ValueList& buttonValues) con
if (_joystick)
{
SDL_JoystickUpdate();
axisValues.resize(_numAxes);
for(int ai=0; ai<_numAxes; ++ai)
{
@@ -107,21 +108,21 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
{
if (_joystick)
{
ValueList newAxisValues;
ValueList newButtonValues;
capture(newAxisValues, newButtonValues);
unsigned int mouseXaxis = 0;
unsigned int mouseYaxis = 1;
float prev_mx = (float)_axisValues[mouseXaxis]/32767.0f;
float prev_my = -(float)_axisValues[mouseYaxis]/32767.0f;
float mx = (float)newAxisValues[mouseXaxis]/32767.0f;
float my = -(float)newAxisValues[mouseYaxis]/32767.0f;
osgGA::EventQueue* eq = viewer.getEventQueue();
double time = eq ? eq->getTime() : 0.0;
@@ -145,7 +146,7 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
}
}
}
for(int bi=0; bi<_numButtons; ++bi)
{
if (newButtonValues[bi]!=_buttonValues[bi])
@@ -171,11 +172,11 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
}
}
}
_axisValues.swap(newAxisValues);
_buttonValues.swap(newButtonValues);
}
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef SDLINTEGRATION
@@ -31,12 +32,12 @@ class SDLIntegration
typedef std::map<int, int> ButtonMap;
void update(osgViewer::Viewer& viewer);
void addMouseButtonMapping(int joystickButton, int mouseButton)
{
_mouseButtonMap[joystickButton] = mouseButton;
}
int getMouseButtonMapping(int joystickButton)
{
ButtonMap::const_iterator itr = _mouseButtonMap.find(joystickButton);
@@ -48,16 +49,16 @@ class SDLIntegration
{
_keyMap[joystickButton] = key;
}
int getKeyMapping(int joystickButton)
{
ButtonMap::const_iterator itr = _keyMap.find(joystickButton);
if (itr != _keyMap.end()) return itr->second;
else return -1;
}
protected:
void capture(ValueList& axisValues, ValueList& buttonValues) const;
SDL_Joystick* _joystick;
@@ -66,7 +67,7 @@ class SDLIntegration
int _numHats;
int _numButtons;
bool _verbose;
ValueList _axisValues;
ValueList _buttonValues;
ButtonMap _mouseButtonMap;

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include "ShowEventHandler.h"

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#ifndef SHOWEVENTHANDLER

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include <osgDB/FileNameUtils>

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#ifndef SPELLCHCKER_H

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include <osg/Geometry>

View File

@@ -99,15 +99,16 @@ INPUT = ${OpenSceneGraph_SOURCE_DIR}/include/osg \
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation \
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
${OpenSceneGraph_SOURCE_DIR}/include/osgUI \
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
${OpenSceneGraph_SOURCE_DIR}/include/osgQt \
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *include* \

View File

@@ -89,15 +89,16 @@ INPUT = ${OpenSceneGraph_SOURCE_DIR}/include/osg \
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation \
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
${OpenSceneGraph_SOURCE_DIR}/include/osgUI \
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
${OpenSceneGraph_SOURCE_DIR}/include/osgQt \
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *include* \

View File

@@ -90,7 +90,7 @@ INPUT = "${OpenSceneGraph_SOURCE_DIR}/include/osg" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgGA" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgParticle" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgQt" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgShadow" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgSim" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain" \

View File

@@ -5,7 +5,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
<uses-feature android:glEsVersion="0x00010001"/> <!-- OpenGL min requierements (1.1) -->
<uses-feature android:glEsVersion="0x00010001"/> <!-- OpenGL min requirements (1.1) -->
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name" android:icon="@drawable/osg">

View File

@@ -5,7 +5,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
<uses-feature android:glEsVersion="0x00020000"/> <!-- OpenGL min requierements (2.0) -->
<uses-feature android:glEsVersion="0x00020000"/> <!-- OpenGL min requirements (2.0) -->
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name" android:icon="@drawable/osg">

View File

@@ -393,8 +393,6 @@ public:
while (arguments.read("--dl")) { modifyDrawableSettings = true; useDisplayLists = true; }
while (arguments.read("-s", simplificatioRatio)) {}
while (arguments.read("--tristripper")) { useTriStripVisitor=true; }
while (arguments.read("--no-tristripper")) { useTriStripVisitor=false; }
while (arguments.read("--smoother")) { useSmoothingVisitor=true; }
while (arguments.read("--no-smoother")) { useSmoothingVisitor=false; }
@@ -426,7 +424,6 @@ public:
OSG_NOTICE<<"Running simplifier with simplification ratio="<<simplificatioRatio<<std::endl;
float maxError = 4.0f;
osgUtil::Simplifier simplifier(simplificatioRatio, maxError);
simplifier.setDoTriStrip(useTriStripVisitor);
simplifier.setSmoothing(useSmoothingVisitor);
node->accept(simplifier);
}

View File

@@ -84,7 +84,7 @@ struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
CommonProgram = new osg::Program;
CommonProgram->setName("HardwareSkinning");
//set default source if _shader is not user setted
//set default source if _shader is not user set
if (!vertexshader.valid())
{
vertexshader = osgDB::readRefShaderFile(osg::Shader::VERTEX,"skinning.vert");

View File

@@ -245,10 +245,12 @@ int main( int argc, char **argv )
traits->depth = src_traits->depth;
traits->pbuffer = true;
} else {
//viewer would use fullscreen size (unknown here) pbuffer will use 4096 x4096 (or best avaiable)
//viewer would use fullscreen size (unknown here) pbuffer will use 4096 x4096 (or best available)
traits->width = 1 << 12;
traits->height = 1 << 12;
traits->pbuffer = true;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
}
osg::ref_ptr<osg::GraphicsContext> pbuffer = osg::GraphicsContext::createGraphicsContext(traits.get());
if (pbuffer.valid())

View File

@@ -209,6 +209,8 @@ osgViewer::View* createView(osg::ref_ptr<osg::Node> scenegraph, osg::ref_ptr<osg
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
@@ -267,7 +269,11 @@ int main(int argc, char** argv)
}
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
unsigned int x=0, y=0;
while(arguments.read("--window", x, y, width, height)) {}
@@ -283,6 +289,8 @@ int main(int argc, char** argv)
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)

View File

@@ -83,7 +83,11 @@ void singleWindowMultipleCameras(osgViewer::Viewer& viewer)
}
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->x = 0;
@@ -93,6 +97,8 @@ void singleWindowMultipleCameras(osgViewer::Viewer& viewer)
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (gc.valid())
@@ -134,7 +140,11 @@ void multipleWindowMultipleCameras(osgViewer::Viewer& viewer, bool multipleScree
}
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
unsigned int numCameras = 6;
@@ -151,6 +161,8 @@ void multipleWindowMultipleCameras(osgViewer::Viewer& viewer, bool multipleScree
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (gc.valid())

View File

@@ -971,9 +971,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
{
createNewCatchable();
}
break;
}
case(osgGA::GUIEventAdapter::KEYDOWN):
{
@@ -987,6 +985,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
_rightKeyPressed=true;
return true;
}
break;
}
case(osgGA::GUIEventAdapter::KEYUP):
{
@@ -1000,6 +999,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
_rightKeyPressed=false;
return true;
}
break;
}
case(osgGA::GUIEventAdapter::DRAG):
case(osgGA::GUIEventAdapter::MOVE):

View File

@@ -509,7 +509,7 @@ int main( int argc, char **argv )
// any option left unread are converted into errors to write out later.
arguments.reportRemainingOptionsAsUnrecognized();
// report any errors if they have occurred when parsing the program aguments.
// report any errors if they have occurred when parsing the program arguments.
if (arguments.errors())
{
arguments.writeErrorMessages(std::cout);

View File

@@ -289,7 +289,11 @@ int main( int argc, char **argv )
}
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->x = 100;
@@ -299,6 +303,8 @@ int main( int argc, char **argv )
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (gc.valid())

View File

@@ -40,33 +40,101 @@
#include <string>
#include <vector>
void create_specular_highlights(osg::Node *node)
int main(int argc, char *argv[])
{
osg::StateSet *ss = node->getOrCreateStateSet();
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// construct the viewer.
osgViewer::Viewer viewer;
osg::ref_ptr<osg::TextureCubeMap> tcm = new osg::TextureCubeMap;
// create and setup the texture object
osg::TextureCubeMap *tcm = new osg::TextureCubeMap;
tcm->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP);
tcm->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP);
tcm->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP);
tcm->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR);
tcm->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
// generate the six highlight map images (light direction = [1, 1, -1])
osgUtil::HighlightMapGenerator *mapgen = new osgUtil::HighlightMapGenerator(
osg::Vec3(1, 1, -1), // light direction
osg::Vec4(1, 0.9f, 0.8f, 1), // light color
8); // specular exponent
if (arguments.read("--no-mip-map"))
{
tcm->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
tcm->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
}
else
{
tcm->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR);
tcm->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
}
mapgen->generateMap();
if (arguments.read("--hardware-mip-map") || arguments.read("--hmp"))
{
OSG_NOTICE<<"tcm->setUseHardwareMipMapGeneration(true)"<<std::endl;
tcm->setUseHardwareMipMapGeneration(true);
}
// assign the six images to the texture object
tcm->setImage(osg::TextureCubeMap::POSITIVE_X, mapgen->getImage(osg::TextureCubeMap::POSITIVE_X));
tcm->setImage(osg::TextureCubeMap::NEGATIVE_X, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_X));
tcm->setImage(osg::TextureCubeMap::POSITIVE_Y, mapgen->getImage(osg::TextureCubeMap::POSITIVE_Y));
tcm->setImage(osg::TextureCubeMap::NEGATIVE_Y, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_Y));
tcm->setImage(osg::TextureCubeMap::POSITIVE_Z, mapgen->getImage(osg::TextureCubeMap::POSITIVE_Z));
tcm->setImage(osg::TextureCubeMap::NEGATIVE_Z, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_Z));
std::string filename;
if (arguments.read("--posx", filename)) tcm->setImage(osg::TextureCubeMap::POSITIVE_X, osgDB::readImageFile(filename));
if (arguments.read("--negx", filename)) tcm->setImage(osg::TextureCubeMap::NEGATIVE_X, osgDB::readImageFile(filename));
if (arguments.read("--posy", filename)) tcm->setImage(osg::TextureCubeMap::POSITIVE_Y, osgDB::readImageFile(filename));
if (arguments.read("--negy", filename)) tcm->setImage(osg::TextureCubeMap::NEGATIVE_Y, osgDB::readImageFile(filename));
if (arguments.read("--posz", filename)) tcm->setImage(osg::TextureCubeMap::POSITIVE_Z, osgDB::readImageFile(filename));
if (arguments.read("--negz", filename)) tcm->setImage(osg::TextureCubeMap::NEGATIVE_Z, osgDB::readImageFile(filename));
int numValidImages = 0;
if (tcm->getImage(osg::TextureCubeMap::POSITIVE_X)) ++numValidImages;
if (tcm->getImage(osg::TextureCubeMap::NEGATIVE_X)) ++numValidImages;
if (tcm->getImage(osg::TextureCubeMap::POSITIVE_Y)) ++numValidImages;
if (tcm->getImage(osg::TextureCubeMap::NEGATIVE_Y)) ++numValidImages;
if (tcm->getImage(osg::TextureCubeMap::POSITIVE_Z)) ++numValidImages;
if (tcm->getImage(osg::TextureCubeMap::NEGATIVE_Z)) ++numValidImages;
if (numValidImages!=6)
{
// generate the six highlight map images (light direction = [1, 1, -1])
osgUtil::HighlightMapGenerator *mapgen = new osgUtil::HighlightMapGenerator(
osg::Vec3(1, 1, -1), // light direction
osg::Vec4(1, 0.9f, 0.8f, 1), // light color
8); // specular exponent
mapgen->generateMap();
// assign the six images to the texture object
if (!tcm->getImage(osg::TextureCubeMap::POSITIVE_X)) tcm->setImage(osg::TextureCubeMap::POSITIVE_X, mapgen->getImage(osg::TextureCubeMap::POSITIVE_X));
if (!tcm->getImage(osg::TextureCubeMap::NEGATIVE_X)) tcm->setImage(osg::TextureCubeMap::NEGATIVE_X, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_X));
if (!tcm->getImage(osg::TextureCubeMap::POSITIVE_Y)) tcm->setImage(osg::TextureCubeMap::POSITIVE_Y, mapgen->getImage(osg::TextureCubeMap::POSITIVE_Y));
if (!tcm->getImage(osg::TextureCubeMap::NEGATIVE_Y)) tcm->setImage(osg::TextureCubeMap::NEGATIVE_Y, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_Y));
if (!tcm->getImage(osg::TextureCubeMap::POSITIVE_Z)) tcm->setImage(osg::TextureCubeMap::POSITIVE_Z, mapgen->getImage(osg::TextureCubeMap::POSITIVE_Z));
if (!tcm->getImage(osg::TextureCubeMap::NEGATIVE_Z)) tcm->setImage(osg::TextureCubeMap::NEGATIVE_Z, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_Z));
}
float LODBias;
if (arguments.read("--lod",LODBias))
{
tcm->setLODBias(LODBias);
}
osg::ref_ptr<osg::Program> program = new osg::Program;
std::string shaderFilename;
while (arguments.read("-s", shaderFilename))
{
osg::ref_ptr<osg::Shader> shader = osgDB::readRefShaderFile(shaderFilename);
if (shader) program->addShader(shader);
}
// load the nodes from the commandline arguments.
osg::ref_ptr<osg::Node> rootnode = osgDB::readRefNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!rootnode) rootnode = osgDB::readRefNodeFile("cessna.osgt");
if (!rootnode)
{
osg::notify(osg::NOTICE)<<"Please specify a model filename on the command line."<<std::endl;
return 1;
}
osg::StateSet *ss = rootnode->getOrCreateStateSet();
// enable texturing, replacing any textures in the subgraphs
ss->setTextureAttributeAndModes(0, tcm, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
@@ -84,31 +152,13 @@ void create_specular_highlights(osg::Node *node)
te->setSource1_RGB(osg::TexEnvCombine::PRIMARY_COLOR);
te->setOperand1_RGB(osg::TexEnvCombine::SRC_COLOR);
ss->setTextureAttributeAndModes(0, te, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
}
int main(int argc, char *argv[])
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// construct the viewer.
osgViewer::Viewer viewer;
// load the nodes from the commandline arguments.
osg::ref_ptr<osg::Node> rootnode = osgDB::readRefNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!rootnode) rootnode = osgDB::readRefNodeFile("cessna.osgt");
if (!rootnode)
if (program->getNumShaders()>0)
{
osg::notify(osg::NOTICE)<<"Please specify a model filename on the command line."<<std::endl;
return 1;
ss->setAttribute(program.get());
ss->addUniform(new osg::Uniform("baseTexture",0));
}
// create specular highlights
create_specular_highlights(rootnode.get());
// run optimization over the scene graph
osgUtil::Optimizer optimzer;
optimzer.optimize(rootnode);

View File

@@ -91,7 +91,7 @@ private:
bool createMap(MapMode mapMode, bool first=false);
/*!
Creates a two dimensional noise map and initalizes _noiseMap with it
Creates a two dimensional noise map and initializes _noiseMap with it
*/
bool createNoiseMap();

View File

@@ -34,7 +34,7 @@ class DePeePass
DePeePass();
/*!
Desctructor cleans the whole depth peeling pass
Destructor cleans the whole depth peeling pass
*/
~DePeePass();

View File

@@ -79,7 +79,11 @@ struct CommandLineOptions
return;
}
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
distance = sqrt(sphere_radius*sphere_radius - collar_radius*collar_radius);
}
@@ -274,6 +278,8 @@ void setDomeFaces(osgViewer::Viewer& viewer, CommandLineOptions& options)
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
@@ -502,6 +508,8 @@ void setDomeCorrection(osgViewer::Viewer& viewer, CommandLineOptions& options)
traits->windowDecoration = false;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)

View File

@@ -12,11 +12,6 @@
void textInfo(osgText::Text* text)
{
const osgText::Text::TextureGlyphQuadMap& tgqm = text->getTextureGlyphQuadMap();
const osgText::Text::TextureGlyphQuadMap::const_iterator tgqmi = tgqm.begin();
osgText::String& s = text->getText();
for(unsigned int i = 0; i < s.size(); i++)

View File

@@ -381,7 +381,7 @@ AppState::AppState(osgViewer::Viewer* viewer_)
textProjection = new Projection;
textProjection->setMatrix(Matrix::ortho2D(0,1280,0,1024));
textProjection->addChild(textGeode);
// "texture not available" text displayed when the user trys to
// "texture not available" text displayed when the user tries to
// display the depth texture while multisampling.
osgText::Text* noCanDo = new osgText::Text;
noCanDo->setFont(fontName);
@@ -722,6 +722,8 @@ GraphicsContext* setupGC(osgViewer::Viewer& viewer, ArgumentParser& arguments)
traits->windowDecoration = decoration;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
ref_ptr<GraphicsContext> gc = GraphicsContext::createGraphicsContext(traits.get());
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());

View File

@@ -74,7 +74,7 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options]");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("-i <filename>","Input scene (or presentation) filename.");
arguments.getApplicationUsage()->addCommandLineOption("-o <filename>","Base ouput filename of the images, recommended to use something like Images/image.png");
arguments.getApplicationUsage()->addCommandLineOption("-o <filename>","Base output filename of the images, recommended to use something like Images/image.png");
arguments.getApplicationUsage()->addCommandLineOption("--cs <filename>","Load pre-generated configuration file for run.");
arguments.getApplicationUsage()->addCommandLineOption("--ouput-cs <filename>","Output configuration file with settings provided on commandline.");
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Use specificied camera path file to control camera position.");

View File

@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates ping pong rendering with FBOs and mutliple rendering branches. It uses Conway's Game of Life to illustrate the concept.");
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates ping pong rendering with FBOs and multiple rendering branches. It uses Conway's Game of Life to illustrate the concept.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] --startim start_image");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("--startim","The initial image to seed the game of life with.");

View File

@@ -124,7 +124,7 @@
but if Robert will accept its current implementations ( I mean - primitive
sets that have osg::TextureBuffer in constructor ), I may add it to
osg/include/PrimitiveSet header.
- I used BufferTemplate class writen and published by Aurelien in submission forum
- I used BufferTemplate class written and published by Aurelien in submission forum
some time ago. For some reason this class never got into osg/include, but is
really needed during creation of UBOs, TBOs, and possibly SSBOs in the future.
I added std::vector specialization to that template class.
@@ -1145,7 +1145,7 @@ osg::Group* createAirplane( float detailRatio, const osg::Vec4& hullColor, const
return root.release();
}
// createStaticRendering() shows how to use any OSG graph ( wheter it is single osg::Geode, or sophisticated osg::PagedLOD tree covering whole earth )
// createStaticRendering() shows how to use any OSG graph ( whether it is single osg::Geode, or sophisticated osg::PagedLOD tree covering whole earth )
// as a source of instance data. This way, the OSG graph of arbitrary size is at first culled using typical OSG mechanisms, then remaining osg::Geometries
// are sent to cull shader ( cullProgram ). Cull shader does not draw anything to screen ( thanks to GL_RASTERIZER_DISCARD mode ), but calculates if particular
// instances - sourced from above mentioned osg::Geometries - are visible and what LODs for these instances should be rendered.

View File

@@ -48,7 +48,7 @@ class MoveEarthySkyWithEyePointTransform : public osg::Transform
{
public:
/** Get the transformation matrix which moves from local coords to world coords.*/
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const
{
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
if (cv)
@@ -63,7 +63,7 @@ public:
virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const
{
std::cout<<"computing transform"<<std::endl;
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
if (cv)
{
@@ -99,7 +99,7 @@ osg::Group* createModel()
// add the sky and base layer.
transform->addChild(makeSky()); // bin number -2 so drawn first.
transform->addChild(makeBase()); // bin number -1 so draw second.
transform->addChild(makeBase()); // bin number -1 so draw second.
// add the transform to the earth sky.
clearNode->addChild(transform);
@@ -125,7 +125,7 @@ int main( int argc, char **argv )
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates how to create a scene programatically, in this case a hang gliding flying site.");
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates how to create a scene programmatically, in this case a hang gliding flying site.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
@@ -138,14 +138,14 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->write(std::cout);
return 1;
}
bool customWindows = false;
while(arguments.read("-2")) customWindows = true;
if (customWindows)
{
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
if (!wsi)
{
osg::notify(osg::NOTICE)<<"View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return 0;
@@ -159,6 +159,8 @@ int main( int argc, char **argv )
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (gc.valid())
@@ -186,17 +188,17 @@ int main( int argc, char **argv )
viewer.addSlave(camera.get(), osg::Matrixd(), osg::Matrixd::scale(aspectRatioScale,1.0,1.0));
}
}
}
else
{
viewer.setUpViewAcrossAllScreens();
}
// set up the camera manipulation with our custom manipultor
viewer.setCameraManipulator(new GliderManipulator());
// pass the scene graph to the viewer
// pass the scene graph to the viewer
viewer.setSceneData( createModel() );
return viewer.run();

View File

@@ -39,7 +39,7 @@
#include "stdio.h"
// callback to make the loaded model oscilate up and down.
// callback to make the loaded model oscillate up and down.
class ModelTransformCallback : public osg::NodeCallback
{
public:

View File

@@ -57,7 +57,7 @@ class ContextTest : public MemoryTest
_width(width),
_height(height),
_pbuffer(pbuffer) {}
virtual osg::GraphicsContext* allocate()
{
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
@@ -65,9 +65,11 @@ class ContextTest : public MemoryTest
traits->height = _height;
traits->windowDecoration = true;
traits->pbuffer = _pbuffer;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> window = osg::GraphicsContext::createGraphicsContext(traits.get());
if (window.valid())
if (window.valid())
{
if (window->realize())
{
@@ -82,15 +84,15 @@ class ContextTest : public MemoryTest
else
{
std::cerr<<"Error: Unable to create graphics context, problem with running osgViewer-"<<osgViewerGetVersion()<<", cannot create windows/pbuffers."<<std::endl;
if (_pbuffer) throw "Failed to create PixelBuffer";
else throw "Failed to create GraphicsWindow";
}
}
protected:
int _width;
int _height;
bool _pbuffer;
@@ -102,19 +104,19 @@ class ContextTest : public MemoryTest
class StateAttributeObject : public GLObject
{
public:
StateAttributeObject(osg::StateAttribute* sa): _attribute(sa) {}
void apply(osg::RenderInfo& renderInfo)
{
_attribute->apply(*renderInfo.getState());
if (renderInfo.getState()->checkGLErrors(_attribute.get()))
{
throw "OpenGL error";
}
}
osg::ref_ptr<osg::StateAttribute> _attribute;
};
@@ -129,40 +131,40 @@ class TextureTest : public GLMemoryTest
_width(width),
_height(height),
_depth(depth) {}
virtual GLObject* allocate()
{
if (_depth>1)
{
osg::ref_ptr<osg::Image> image = new osg::Image;
image->allocateImage(_width, _height, _depth, GL_RGBA, GL_UNSIGNED_BYTE);
osg::ref_ptr<osg::Texture3D> texture = new osg::Texture3D;
texture->setImage(image.get());
texture->setResizeNonPowerOfTwoHint(false);
return new StateAttributeObject(texture.get());
}
if (_height>1)
{
osg::ref_ptr<osg::Image> image = new osg::Image;
image->allocateImage(_width, _height, 1, GL_RGBA, GL_UNSIGNED_BYTE);
osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
texture->setImage(image.get());
texture->setResizeNonPowerOfTwoHint(false);
return new StateAttributeObject(texture.get());
}
if (_width>1)
{
osg::ref_ptr<osg::Image> image = new osg::Image;
image->allocateImage(_width, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE);
osg::ref_ptr<osg::Texture1D> texture = new osg::Texture1D;
texture->setImage(image.get());
texture->setResizeNonPowerOfTwoHint(false);
return new StateAttributeObject(texture.get());
}
else
@@ -170,10 +172,10 @@ class TextureTest : public GLMemoryTest
throw "Invalid texture size of 0,0,0";
}
}
protected:
int _width;
int _height;
int _depth;
@@ -191,7 +193,7 @@ class FboTest : public GLMemoryTest
_width(width),
_height(height),
_depth(depth) {}
virtual GLObject* allocate()
{
osg::ref_ptr<osg::FrameBufferObject> fbo = new osg::FrameBufferObject;
@@ -201,10 +203,10 @@ class FboTest : public GLMemoryTest
return new StateAttributeObject(fbo.get());
}
protected:
int _width;
int _height;
int _depth;
@@ -218,19 +220,19 @@ class FboTest : public GLMemoryTest
class DrawableObject : public GLObject
{
public:
DrawableObject(osg::Drawable* drawable): _drawable(drawable) {}
void apply(osg::RenderInfo& renderInfo)
{
_drawable->draw(renderInfo);
if (renderInfo.getState()->checkGLErrors("Drawable"))
{
throw "OpenGL error";
}
}
osg::ref_ptr<osg::Drawable> _drawable;
};
@@ -240,20 +242,20 @@ class DrawableObject : public GLObject
class GeometryTest : public GLMemoryTest
{
public:
enum GLObjectType
{
VERTEX_ARRAY,
DISPLAY_LIST,
VERTEX_BUFFER_OBJECT
};
GeometryTest(GLObjectType type, int width=64, int height=64):
_glObjectType(type),
_width(width),
_height(height) {}
virtual GLObject* allocate()
{
unsigned int numVertices = _width * _height;
@@ -279,11 +281,11 @@ class GeometryTest : public GLMemoryTest
quads->push_back(i + (j+1)*_width);
}
}
osg::Geometry* geometry = new osg::Geometry;
geometry->setVertexArray(vertices);
geometry->addPrimitiveSet(quads);
switch(_glObjectType)
{
case(VERTEX_ARRAY):
@@ -302,10 +304,10 @@ class GeometryTest : public GLMemoryTest
return new DrawableObject(geometry);
}
protected:
GLObjectType _glObjectType;
int _width;
int _height;
@@ -314,7 +316,7 @@ class GeometryTest : public GLMemoryTest
int main( int argc, char **argv )
{
osg::ArgumentParser arguments(&argc,argv);
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" tests OpenGL and Windowing memory scalability..");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","List command line options.");
@@ -326,7 +328,7 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("--texture <width> <height> <depth>","Allocate a 3D texture of specified dimensions.");
arguments.getApplicationUsage()->addCommandLineOption("--texture <width> <height>","Allocate a 2D texture of specified dimensions.");
arguments.getApplicationUsage()->addCommandLineOption("--texture <width>","Allocate a 1D texture of specified dimensions.");
arguments.getApplicationUsage()->addCommandLineOption("--geometry <width> <height>","Allocate a osg::Geometry representing a grid of specified size, using OpenGL Dislay Lists.");
arguments.getApplicationUsage()->addCommandLineOption("--geometry <width> <height>","Allocate a osg::Geometry representing a grid of specified size, using OpenGL Display Lists.");
arguments.getApplicationUsage()->addCommandLineOption("--geometry-va <width> <height>","Allocate a osg::Geometry representing a grid of specified size, using Vertex Arrays.");
arguments.getApplicationUsage()->addCommandLineOption("--geometry-vbo <width> <height>","Allocate a osg::Geometry representing a grid of specified size, using Vertex Buffer Objects.");
arguments.getApplicationUsage()->addCommandLineOption("--fbo <width> <height>","Allocate a FrameBufferObject of specified dimensions.");
@@ -351,7 +353,7 @@ int main( int argc, char **argv )
ContextTests contextTests;
GLMemoryTests glMemoryTests;
int width, height, depth;
while(arguments.read("--pbuffer",width,height)) { contextTests.push_back(new ContextTest(width, height, true)); }
while(arguments.read("--pbuffer")) { contextTests.push_back(new ContextTest(512, 512, true)); }
@@ -396,20 +398,20 @@ int main( int argc, char **argv )
return 1;
}
#endif
typedef std::list< osg::ref_ptr<osg::GraphicsContext> > Contexts;
typedef std::list< osg::ref_ptr<GLObject> > GLObjects;
Contexts allocatedContexts;
GLObjects glObjects;
if (contextTests.empty())
{
if (glMemoryTests.empty())
{
std::cout<<"No tests specified, please specify test using the command line options below."<<std::endl<<std::endl;
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
return 1;
return 1;
}
else
{
@@ -421,14 +423,14 @@ int main( int argc, char **argv )
// use printf's below as C++'s ostream classes use more memory and are more likely to fail when everything
// goes wrong with memory allocations.
int numContextIterations = 0;
int numGLObjectIterations = 0;
int numGLObjectsApplied = 0;
try
{
for(; numGLObjectIterations<maxNumGLIterations; ++numGLObjectIterations)
{
{
for(GLMemoryTests::iterator itr = glMemoryTests.begin();
itr != glMemoryTests.end();
++itr)
@@ -437,7 +439,7 @@ int main( int argc, char **argv )
if (glObject.valid()) glObjects.push_back(glObject.get());
}
}
for(;numContextIterations<maxNumContextIterations; ++numContextIterations)
{
printf("GraphicsContext %i\n",numContextIterations);
@@ -451,10 +453,10 @@ int main( int argc, char **argv )
allocatedContexts.push_back(context);
context->makeCurrent();
osg::RenderInfo renderInfo;
renderInfo.setState(context->getState());
for(GLObjects::iterator gitr = glObjects.begin();
gitr != glObjects.end();
++gitr)
@@ -466,9 +468,9 @@ int main( int argc, char **argv )
(*gitr)->apply(renderInfo);
++numGLObjectsApplied;
}
context->releaseContext();
printf("\n\n"); fflush(stdout);
}
}
@@ -489,7 +491,7 @@ int main( int argc, char **argv )
printf("\nSuccessful completion, contexts created = %i, gl objects applied = %i\n",numContextIterations, numGLObjectsApplied);
printf("Duration = %f seconds.\n\n",osg::Timer::instance()->delta_s(startTick, endTick));
return 0;
}

View File

@@ -641,7 +641,11 @@ int main(int argc, char** argv)
if (wsi)
{
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
screenAspectRatio = float(width) / float(height);
}

View File

@@ -91,7 +91,11 @@ int main( int argc, char **argv )
}
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->x = 100;
@@ -101,6 +105,8 @@ int main( int argc, char **argv )
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (gc.valid())

View File

@@ -290,7 +290,7 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use of convex planer occluders.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("-m","Mannually create occluders");
arguments.getApplicationUsage()->addCommandLineOption("-m","Manually create occluders");
// initialize the viewer.
osgViewer::Viewer viewer;

View File

@@ -109,8 +109,9 @@ bool PickHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapte
user_event->setName("osc_test_1");
_device->sendEvent(*user_event);
return true;
}
return false;
}
default:
@@ -443,6 +444,8 @@ int main( int argc, char **argv )
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->windowName = "Receiver / view two";
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
@@ -509,6 +512,8 @@ int main( int argc, char **argv )
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->windowName = "Sender / view one";
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());

View File

@@ -444,7 +444,7 @@ void build_world(osg::Group *root)
// the second one will be a little bit more complex, showing how to
// create custom operators.
// To avoid inserting too much code in a single function, we have
// splitted the work into two functions which accept a Group node as
// split the work into two functions which accept a Group node as
// parameter, and return a pointer to the particle system they created.
osgParticle::ParticleSystem *ps1 = create_simple_particle_system(root);

View File

@@ -317,7 +317,7 @@ public:
// insert particle effects alongside the hit node, therefore able to track that nodes movement,
// however, this does require us to insert the ParticleSystem itself into the root of the scene graph
// separately from the main particle effects group which contains the emitters and programs.
// the follow code block implements this, note the path for handling particle effects which arn't attached to
// the follow code block implements this, note the path for handling particle effects which aren't attached to
// moving models is easy - just a single line of code!
// tell the effects not to attach to the particle system locally for rendering, as we'll handle add it into the

View File

@@ -155,7 +155,7 @@ int main( int argc, char** argv )
root->addChild( parent.get() );
root->addChild( updater.get() );
// FIXME 2010.9.19: the updater can't be a drawable; otehrwise the ParticleEffect will not work properly. why?
// FIXME 2010.9.19: the updater can't be a drawable; otherwise the ParticleEffect will not work properly. why?
updater->addParticleSystem( ps.get() );
osg::ref_ptr<osg::Geode> geode = new osg::Geode;

View File

@@ -644,6 +644,7 @@ bool SlideEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
}
_album->setVisibility();
return true;
}
@@ -747,7 +748,7 @@ int main( int argc, char **argv )
osg::ref_ptr<Album> album = new Album(arguments,width,height);
// creat the scene from the file list.
// create the scene from the file list.
osg::ref_ptr<osg::Group> rootNode = album->getScene();
if (!rootNode) return 0;

View File

@@ -16,9 +16,7 @@
* THE SOFTWARE.
*/
/* osgpick sample
* demonstrate use of osgUtil/PickVisitor for picking in a HUD or
* in a 3d scene,
/* osgpick sample - Mouse picking in a 3d scene,
*/
#include <osgUtil/Optimizer>

View File

@@ -50,7 +50,7 @@ int main(int argc, char** argv)
if (script.valid()) scripts.push_back(script.get());
}
// assgin script engine to scene graphs
// assign script engine to scene graphs
model->getOrCreateUserDataContainer()->addUserObject(osgDB::readFile<osg::ScriptEngine>("ScriptEngine.lua"));
model->getOrCreateUserDataContainer()->addUserObject(osgDB::readFile<osg::ScriptEngine>("ScriptEngine.python"));
model->getOrCreateUserDataContainer()->addUserObject(osgDB::readFile<osg::ScriptEngine>("ScriptEngine.js"));

View File

@@ -120,7 +120,7 @@ int main(int argc, char* argv[])
sampler2=(osg::Sampler*)(*it)->getTextureAttribute(0, osg::StateAttribute::SAMPLER);
}
if(sampler1.valid()&&sampler2.valid()){
OSG_WARN<<"2samplers manipulator setted"<<std::endl;
OSG_WARN<<"2samplers manipulator set"<<std::endl;
viewer.addEventHandler(new SamplersKeyboardEventHandler(sampler1.get(), sampler2.get()));
}
}
@@ -185,7 +185,7 @@ int main(int argc, char* argv[])
im->dirty();
tex2->setImage(im);
}
///Overrided Filtering setup
///Overridden Filtering setup
tex1->setFilter(osg::Texture::MAG_FILTER,osg::Texture::NEAREST);
tex1->setFilter(osg::Texture::MIN_FILTER,osg::Texture::NEAREST);

View File

@@ -712,6 +712,8 @@ int main(int argc, char** argv)
traits->pbuffer = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
pbuffer = osg::GraphicsContext::createGraphicsContext(traits.get());
if (pbuffer.valid())

View File

@@ -182,7 +182,11 @@ void singleWindowSideBySideCameras(osgViewer::Viewer& viewer)
}
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
@@ -198,6 +202,8 @@ void singleWindowSideBySideCameras(osgViewer::Viewer& viewer)
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (gc.valid())

View File

@@ -87,6 +87,8 @@ int main( int argc, char** argv )
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->glContextVersion = version;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr< osg::GraphicsContext > gc = osg::GraphicsContext::createGraphicsContext( traits.get() );
if( !gc.valid() )
{

View File

@@ -26,11 +26,16 @@
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgViewer/GraphicsWindow>
#include <sstream>
#include <iostream>
#define MIN_NEARFAROFFSET 0.1
// force the WIndowingSystem to initialize to allow us to create a graphics context.
USE_GRAPHICSWINDOW()
class SliceProcessor
{
public:
@@ -137,6 +142,8 @@ int main( int argc, char **argv )
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->pbuffer = false;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc || !gc->valid())
@@ -187,7 +194,7 @@ int main( int argc, char **argv )
// pass frame stamp to the SceneView so that the update, cull and draw traversals all use the same FrameStamp
sceneView->setFrameStamp(frameStamp.get());
// update the viewport dimensions, incase the window has been resized.
// update the viewport dimensions, in case the window has been resized.
sceneView->setViewport(0,0,traits->width,traits->height);

View File

@@ -610,7 +610,7 @@ int main( int argc, char **argv )
osg::TexMat* texmatLeft = new osg::TexMat;
osg::TexMat* texmatRight = new osg::TexMat;
// creat the scene from the file list.
// create the scene from the file list.
osg::ref_ptr<osg::Switch> rootNode;
if (!onDisk) rootNode = createScene(fileList,texmatLeft,texmatRight,radius,height,length);
else rootNode=new osg::Switch();

View File

@@ -235,7 +235,7 @@ class Teapot : public osg::Drawable
// of OpenGL primitives.
virtual void drawImplementation(osg::RenderInfo&) const
{
// teapot(..) doens't use vertex arrays at all so we don't need to toggle their state
// teapot(..) doesn't use vertex arrays at all so we don't need to toggle their state
// if we did we'd need to something like following call
// state.disableAllVertexArrays(), see src/osg/Geometry.cpp for the low down.

View File

@@ -379,6 +379,11 @@ int main(int argc, char** argv)
terrain->setVerticalScale(verticalScale);
terrain->setBlendingPolicy(blendingPolicy);
if (arguments.read("--equalize-boundaries") || arguments.read("-e"))
{
terrain->setEqualizeBoundaries(true);
}
if (useDisplacementMappingTechnique)
{

View File

@@ -61,7 +61,7 @@ class /*OSGTEXT_EXPORT*/ TextTechnique : public osg::Object
/// default TextTechnique implementation used if no other is specified on TextNode
static osg::ref_ptr<TextTechnique>& getDefaultTextTechinque();
/// start building a new charater layout
/// start building a new character layout
virtual void start();
/// called by Layout engine to place individual characters
@@ -70,7 +70,7 @@ class /*OSGTEXT_EXPORT*/ TextTechnique : public osg::Object
/// called by Layout engine to place individual characters
virtual void addCharacter(const osg::Vec3& position, const osg::Vec3& size, Glyph3D* glyph, Style* style);
/// finish building new charater layout
/// finish building new character layout
virtual void finish();
/// provide traversal control

View File

@@ -146,7 +146,11 @@ int main(int argc, char** argv)
unsigned int width, height;
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::GraphicsContext::ScreenIdentifier main_screen_id;
main_screen_id.readDISPLAY();
main_screen_id.setUndefinedScreenDetailsToDefaultScreen();
wsi->getScreenResolution(main_screen_id, width, height);
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->x = 0;
@@ -155,6 +159,8 @@ int main(int argc, char** argv)
traits->height = height;
traits->windowDecoration = false;
traits->doubleBuffer = true;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)

View File

@@ -4,7 +4,7 @@
#include <osgGA/TrackballManipulator>
// This is an implementation of SimpleViewer that is designed to be subclassed
// and used as a GtkDrawingArea in a GTK application. Because of the implemention
// and used as a GtkDrawingArea in a GTK application. Because of the implementation
// of GTK, I was unable to derive from GtkWidget and instead had to "wrap" it.
// Conceptually, however, you can think of an OSGGTKDrawingArea as both an OSG
// Viewer AND GtkDrawingArea.

View File

@@ -104,7 +104,7 @@ void cOSG::InitCameraConfig(void)
camera->setGraphicsContext(gc);
// Set the viewport for the Camera
camera->setViewport(new osg::Viewport(traits->x, traits->y, traits->width, traits->height));
camera->setViewport(new osg::Viewport(0, 0, traits->width, traits->height));
// set the draw and read buffers up for a double buffered window with rendering going to back buffer
camera->setDrawBuffer(GL_BACK);

View File

@@ -140,7 +140,8 @@ END_EVENT_TABLE()
OSGCanvas::OSGCanvas(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name, int *attributes)
: wxGLCanvas(parent, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name, attributes)
: wxGLCanvas(parent, id, attributes, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name)
,_context(this)
{
// default cursor to standard
_oldCursor = *wxSTANDARD_CURSOR;
@@ -150,6 +151,11 @@ OSGCanvas::~OSGCanvas()
{
}
void OSGCanvas::SetContextCurrent()
{
_context.SetCurrent(*this);
}
void OSGCanvas::OnPaint( wxPaintEvent& WXUNUSED(event) )
{
/* must always be here */
@@ -158,8 +164,6 @@ void OSGCanvas::OnPaint( wxPaintEvent& WXUNUSED(event) )
void OSGCanvas::OnSize(wxSizeEvent& event)
{
// this is also necessary to update the context on some platforms
wxGLCanvas::OnSize(event);
// set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
int width, height;
@@ -337,7 +341,7 @@ void GraphicsWindowWX::useCursor(bool cursorOn)
bool GraphicsWindowWX::makeCurrentImplementation()
{
_canvas->SetCurrent();
_canvas->SetContextCurrent();
return true;
}

View File

@@ -38,12 +38,14 @@ public:
void UseCursor(bool value);
void SetContextCurrent();
private:
DECLARE_EVENT_TABLE()
osg::ref_ptr<osgViewer::GraphicsWindow> _graphics_window;
wxCursor _oldCursor;
wxGLContext _context;
};
class GraphicsWindowWX : public osgViewer::GraphicsWindow

View File

@@ -211,7 +211,7 @@ osg::Node * CreateAdvancedHierarchy( osg::Node * model )
// Set default VirtualProgram in root StateSet
// With main vertex and main fragment shaders calling
// lighting and texture functions defined in aditional shaders
// lighting and texture functions defined in additional shaders
// Lighting is done per vertex using simple directional light
// Texture uses stage 0 TexCoords and TexMap

View File

@@ -25,6 +25,7 @@ class EscapeHandler : public osgGA::GUIEventHandler
return true;
}
break;
}
default:
@@ -95,7 +96,7 @@ int main(int argc,char** argv)
// add a custom escape handler, but disable the standard viewer one to enable the vnc images to handle
// the escape without it getting caught by the viewer.
viewer.addEventHandler(new EscapeHandler);
viewer.addEventHandler(new EscapeHandler);
viewer.setKeyEventSetsDone(0);
return viewer.run();

View File

@@ -58,6 +58,8 @@ int main( int argc, char **argv )
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
@@ -82,6 +84,8 @@ int main( int argc, char **argv )
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());

View File

@@ -45,10 +45,10 @@ public:
Affinity& operator = (const Affinity& rhs) { if (&rhs!=this) { activeCPUs = rhs.activeCPUs; } return *this; }
/** add a specfied cpu core from the list to have affinity to. */
/** add a specified cpu core from the list to have affinity to. */
void add(unsigned int cpuNmber) { activeCPUs.insert(cpuNmber); }
/** remove a specfied cpu core from the list to have affinity to. */
/** remove a specified cpu core from the list to have affinity to. */
void remove(unsigned int cpuNmber) { activeCPUs.erase(cpuNmber); }
/** return true if affinity has been provided for specific CPU cores.*/

View File

@@ -190,7 +190,7 @@ public:
/**
* Set the thread's schedule priority. This is a complex method.
* Beware of thread priorities when using a many-to-many kernel
* entity implemenation (such as IRIX pthreads). If one is not careful
* entity implementation (such as IRIX pthreads). If one is not careful
* to manage the thread priorities, a priority inversion deadlock can
* easily occur (Although the OpenThreads::Mutex & OpenThreads::Barrier
* constructs have been designed with this scenario in mind). Unless

View File

@@ -152,6 +152,14 @@ class BufferObjectProfile
class GLBufferObjectSet;
class GLBufferObjectManager;
inline unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment)
{
if (bufferAlignment<2) return pos;
if ((pos%bufferAlignment)==0) return pos;
return ((pos/bufferAlignment)+1)*bufferAlignment;
}
class OSG_EXPORT GLBufferObject : public GraphicsObject
{
public:
@@ -235,9 +243,7 @@ class OSG_EXPORT GLBufferObject : public GraphicsObject
unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment) const
{
if (bufferAlignment<2) return pos;
if ((pos%bufferAlignment)==0) return pos;
return ((pos/bufferAlignment)+1)*bufferAlignment;
return osg::computeBufferAlignment(pos, bufferAlignment);
}
unsigned int _contextID;
@@ -431,10 +437,10 @@ class OSG_EXPORT BufferObject : public Object
const BufferObjectProfile& getProfile() const { return _profile; }
/** Set whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immmediately so that it may be reused.*/
/** Set whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immediately so that it may be reused.*/
void setCopyDataAndReleaseGLBufferObject(bool copyAndRelease) { _copyDataAndReleaseGLBufferObject = copyAndRelease; }
/** Get whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immmediately.*/
/** Get whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immediately.*/
bool getCopyDataAndReleaseGLBufferObject() const { return _copyDataAndReleaseGLBufferObject; }

View File

@@ -158,7 +158,7 @@ public:
};
/** Convenience function for getting the CallbackObject associated with specificed name from an Object's UserDataContainer.*/
/** Convenience function for getting the CallbackObject associated with specified name from an Object's UserDataContainer.*/
inline CallbackObject* getCallbackObject(osg::Object* object, const std::string& name)
{
osg::UserDataContainer* udc = object->getUserDataContainer();
@@ -171,7 +171,7 @@ inline CallbackObject* getCallbackObject(osg::Object* object, const std::string&
}
/** Convenience function for getting the CallbackObject associated with specificed name from an Object's UserDataContainer.*/
/** Convenience function for getting the CallbackObject associated with specified name from an Object's UserDataContainer.*/
inline const CallbackObject* getCallbackObject(const osg::Object* object, const std::string& name)
{
const osg::UserDataContainer* udc = object->getUserDataContainer();

View File

@@ -270,6 +270,88 @@ class OSG_EXPORT CullSettings
};
template<class matrix_type, class value_type>
bool clampProjectionMatrix(matrix_type& projection, double& znear, double& zfar, value_type nearFarRatio)
{
double epsilon = 1e-6;
if (zfar<znear-epsilon)
{
if (zfar != -FLT_MAX || znear != FLT_MAX)
{
OSG_INFO<<"_clampProjectionMatrix not applied, invalid depth range, znear = "<<znear<<" zfar = "<<zfar<<std::endl;
}
return false;
}
if (zfar<znear+epsilon)
{
// znear and zfar are too close together and could cause divide by zero problems
// late on in the clamping code, so move the znear and zfar apart.
double average = (znear+zfar)*0.5;
znear = average-epsilon;
zfar = average+epsilon;
// OSG_INFO << "_clampProjectionMatrix widening znear and zfar to "<<znear<<" "<<zfar<<std::endl;
}
if (fabs(projection(0,3))<epsilon && fabs(projection(1,3))<epsilon && fabs(projection(2,3))<epsilon )
{
// OSG_INFO << "Orthographic matrix before clamping"<<projection<<std::endl;
value_type delta_span = (zfar-znear)*0.02;
if (delta_span<1.0) delta_span = 1.0;
value_type desired_znear = znear - delta_span;
value_type desired_zfar = zfar + delta_span;
// assign the clamped values back to the computed values.
znear = desired_znear;
zfar = desired_zfar;
projection(2,2)=-2.0f/(desired_zfar-desired_znear);
projection(3,2)=-(desired_zfar+desired_znear)/(desired_zfar-desired_znear);
// OSG_INFO << "Orthographic matrix after clamping "<<projection<<std::endl;
}
else
{
// OSG_INFO << "Persepective matrix before clamping"<<projection<<std::endl;
//std::cout << "_computed_znear"<<_computed_znear<<std::endl;
//std::cout << "_computed_zfar"<<_computed_zfar<<std::endl;
value_type zfarPushRatio = 1.02;
value_type znearPullRatio = 0.98;
//znearPullRatio = 0.99;
value_type desired_znear = znear * znearPullRatio;
value_type desired_zfar = zfar * zfarPushRatio;
// near plane clamping.
double min_near_plane = zfar*nearFarRatio;
if (desired_znear<min_near_plane) desired_znear=min_near_plane;
// assign the clamped values back to the computed values.
znear = desired_znear;
zfar = desired_zfar;
value_type trans_near_plane = (-desired_znear*projection(2,2)+projection(3,2))/(-desired_znear*projection(2,3)+projection(3,3));
value_type trans_far_plane = (-desired_zfar*projection(2,2)+projection(3,2))/(-desired_zfar*projection(2,3)+projection(3,3));
value_type ratio = fabs(2.0/(trans_near_plane-trans_far_plane));
value_type center = -(trans_near_plane+trans_far_plane)/2.0;
projection.postMult(osg::Matrix(1.0f,0.0f,0.0f,0.0f,
0.0f,1.0f,0.0f,0.0f,
0.0f,0.0f,ratio,0.0f,
0.0f,0.0f,center*ratio,1.0f));
// OSG_INFO << "Persepective matrix after clamping"<<projection<<std::endl;
}
return true;
}
}

View File

@@ -566,7 +566,7 @@ inline void Drawable::draw(RenderInfo& renderInfo) const
State::SetCurrentVertexArrayStateProxy setVASProxy(state, vas);
vas->bindVertexArrayObject();
state.bindVertexArrayObject(vas);
drawInner(renderInfo);
@@ -576,7 +576,11 @@ inline void Drawable::draw(RenderInfo& renderInfo) const
}
// TODO, add check against whether VAO is active and supported
if (state.getCurrentVertexArrayState()) state.getCurrentVertexArrayState()->bindVertexArrayObject();
if (state.getCurrentVertexArrayState())
{
//OSG_NOTICE<<"state.getCurrentVertexArrayState()->getVertexArrayObject()="<< state.getCurrentVertexArrayState()->getVertexArrayObject()<<std::endl;
state.bindVertexArrayObject(state.getCurrentVertexArrayState());
}
#ifdef OSG_GL_DISPLAYLISTS_AVAILABLE

View File

@@ -56,6 +56,13 @@
#endif
#endif
// helper macro's for quieten unused variable warnings
#define OSG_UNUSED(VAR) (void)(VAR)
#define OSG_UNUSED2(VAR1, VAR2) (void)(VAR1); (void)(VAR2);
#define OSG_UNUSED3(VAR1, VAR2, VAR3) (void)(VAR1); (void)(VAR2); (void)(VAR2);
#define OSG_UNUSED4(VAR1, VAR2, VAR3, VAR4) (void)(VAR1); (void)(VAR2); (void)(VAR3); (void)(VAR4);
#define OSG_UNUSED5(VAR1, VAR2, VAR3, VAR4, VAR5) (void)(VAR1); (void)(VAR2); (void)(VAR3); (void)(VAR4); (void)(VAR5);
/**
\namespace osg

View File

@@ -365,11 +365,21 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
void (GL_APIENTRY * glUniformMatrix4x3dv)( GLint location, GLsizei count, GLboolean transpose, const GLdouble* value );
void (GL_APIENTRY * glGetActiveAtomicCounterBufferiv)( GLuint program, GLuint bufferIndex, GLenum pname, GLint* params );
void (GL_APIENTRY * glDispatchCompute)( GLuint numGroupsX, GLuint numGroupsY, GLuint numGroupsZ );
GLuint64 (GL_APIENTRY* glGetTextureHandle)(GLint texture);
void (GL_APIENTRY* glMakeTextureHandleResident)(GLuint64 handle);
void (GL_APIENTRY* glMakeTextureHandleNonResident)(GLuint64 handle);
void (GL_APIENTRY* glUniformHandleui64)(GLint location, GLuint64 handle);
GLboolean (GL_APIENTRY* glIsTextureHandleResident)(GLuint64 handle);
// ARB_bindless_texture
GLuint64 (GL_APIENTRY* glGetTextureHandle)(GLuint texture);
GLuint64 (GL_APIENTRY* glGetTextureSamplerHandle)(GLuint texture, GLuint sampler);
void (GL_APIENTRY* glMakeTextureHandleResident)(GLuint64 handle);
void (GL_APIENTRY* glMakeTextureHandleNonResident)(GLuint64 handle);
GLboolean (GL_APIENTRY* glIsTextureHandleResident)(GLuint64 handle);
GLuint64 (GL_APIENTRY* glGetImageHandle)(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
void (GL_APIENTRY* glMakeImageHandleResident)(GLuint64 handle);
void (GL_APIENTRY* glMakeImageHandleNonResident)(GLuint64 handle);
GLboolean (GL_APIENTRY* glIsImageHandleResident)(GLuint64 handle);
void (GL_APIENTRY* glUniformHandleui64)(GLint location, GLuint64 handle);
void (GL_APIENTRY* glUniformHandleuiv64)(GLint location, GLsizei count, GLuint64 *handles);
void (GL_APIENTRY* glProgramUniformHandleui64)(GLuint program, GLint location, GLuint64 handle);
void (GL_APIENTRY* glProgramUniformHandleuiv64)(GLuint program, GLint location, GLsizei count, GLuint64 *handles);
// Buffer Object extensions
bool isBufferObjectSupported;
@@ -538,7 +548,17 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
isNonPowerOfTwoTextureMipMappedSupported;
}
void (GL_APIENTRY * glTexStorage2D) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
///immutable texture storage and texture view
void (GL_APIENTRY * glTexStorage1D) (GLenum target, GLsizei numMipmapLevels, GLenum internalformat, GLsizei width);
void (GL_APIENTRY * glTextureStorage1D) (GLuint texture, GLsizei numMipmapLevels, GLenum internalformat, GLsizei width);
void (GL_APIENTRY * glTexStorage2D) (GLenum target, GLsizei numMipmapLevels, GLenum internalformat, GLsizei width, GLsizei height);
void (GL_APIENTRY * glTextureStorage2D) (GLuint texture, GLsizei numMipmapLevels, GLenum internalformat, GLsizei width, GLsizei height);
void (GL_APIENTRY * glTexStorage3D) ( GLenum target, GLsizei numMipmapLevels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
void (GL_APIENTRY * glTextureStorage3D) ( GLuint texture, GLsizei numMipmapLevels,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth);
void (GL_APIENTRY * glTexStorage2DMultisample) ( GLenum target, GLsizei numSamples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
void (GL_APIENTRY * glTexStorage3DMultisample) ( GLenum target, GLsizei numSamples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
void (GL_APIENTRY * glTextureView) ( GLuint texture, GLenum target, GLuint orig, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
void (GL_APIENTRY * glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
void (GL_APIENTRY * glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
void (GL_APIENTRY * glGetCompressedTexImage) (GLenum target, GLint level, GLvoid *data);
@@ -557,8 +577,6 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
void (GL_APIENTRY * glTexImage3D) ( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
void (GL_APIENTRY * glTexSubImage3D) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
void (GL_APIENTRY * glTexStorage3D) ( GLenum target, GLsizei numMipmapLevels,GLenum sizedInternalFormat,GLsizei width,GLsizei height,GLsizei depth);
void (GL_APIENTRY * glTextureStorage3D) ( GLuint texture, GLsizei numMipmapLevels,GLenum sizedInternalFormat,GLsizei width,GLsizei height,GLsizei depth);
void (GL_APIENTRY * glCopyTexSubImage3D) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
void (GL_APIENTRY * glCompressedTexImage3D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
@@ -627,6 +645,7 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
// Point
bool isPointParametersSupported;
bool isPointSpriteSupported;
bool isPointSpriteModeSupported;
bool isPointSpriteCoordOriginSupported;
void (GL_APIENTRY * glPointParameteri) (GLenum pname, GLint param);

View File

@@ -433,7 +433,7 @@ class OSG_EXPORT Image : public BufferData
/** Ensure image dimensions are a power of two.
* Mipmapped textures require the image dimensions to be
* power of two and are within the maxiumum texture size for
* power of two and are within the maximum texture size for
* the host machine.
*/
void ensureValidSizeForTexturing(GLint maxTextureSize);

View File

@@ -327,7 +327,7 @@ class OSG_EXPORT Matrixd
inline Vec4f operator* ( const Vec4f& v ) const;
inline Vec4d operator* ( const Vec4d& v ) const;
#ifdef USE_DEPRECATED_API
#ifdef OSG_USE_DEPRECATED_API
inline void set(const Quat& q) { makeRotate(q); } /// deprecated, replace with makeRotate(q)
inline void get(Quat& q) const { q = getRotate(); } /// deprecated, replace with getRotate()
#endif

View File

@@ -328,7 +328,7 @@ class OSG_EXPORT Matrixf
inline Vec4f operator* ( const Vec4f& v ) const;
inline Vec4d operator* ( const Vec4d& v ) const;
#ifdef USE_DEPRECATED_API
#ifdef OSG_USE_DEPRECATED_API
inline void set(const Quat& q) { makeRotate(q); }
inline void get(Quat& q) const { q = getRotate(); }
#endif

View File

@@ -194,11 +194,11 @@ class OSG_EXPORT Node : public Object
/** Get the list of node paths parent paths.
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specified node. */
NodePathList getParentalNodePaths(osg::Node* haltTraversalAtNode=0) const;
/** Get the list of matrices that transform this node from local coordinates to world coordinates.
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specified node. */
MatrixList getWorldMatrices(const osg::Node* haltTraversalAtNode=0) const;

View File

@@ -154,7 +154,7 @@ class OSG_EXPORT PagedLOD : public LOD
/** Get the number of children that the PagedLOD must keep around, even if they are older than their expiry time.*/
unsigned int getNumChildrenThatCannotBeExpired() const { return _numChildrenThatCannotBeExpired; }
/** Set wether you want to disable the paging in of external nodes.*/
/** Set whether you want to disable the paging in of external nodes.*/
void setDisableExternalChildrenPaging(bool flag) { _disableExternalChildrenPaging = flag; }
bool getDisableExternalChildrenPaging() const { return _disableExternalChildrenPaging; }

View File

@@ -47,7 +47,7 @@ class OSG_EXPORT Referenced
Referenced();
/** Deprecated, Referenced is now always uses thread safe ref/unref, use default Refernced() constructor instead */
/** Deprecated, Referenced is now always uses thread safe ref/unref, use default Referenced() constructor instead */
explicit Referenced(bool threadSafeRefUnref);
Referenced(const Referenced&);

View File

@@ -306,6 +306,7 @@ class OSG_EXPORT Shader : public osg::Object
/** osg::Programs that this osg::Shader is attached to */
typedef std::set< osg::Program* > ProgramSet;
ProgramSet _programSet;
OpenThreads::Mutex _programSetMutex;
mutable osg::buffered_value< osg::ref_ptr<ShaderObjects> > _pcsList;
private:

View File

@@ -747,7 +747,7 @@ class TessellationHints : public Object
// forward declare;
class Geometry;
/** Convenience class for populating an Geomtry with vertex, normals, texture coords and primitives that can render a Shape. */
/** Convenience class for populating an Geometry with vertex, normals, texture coords and primitives that can render a Shape. */
class OSG_EXPORT BuildShapeGeometryVisitor : public ConstShapeVisitor
{
public:
@@ -768,10 +768,13 @@ class OSG_EXPORT BuildShapeGeometryVisitor : public ConstShapeVisitor
virtual void apply(const CompositeShape&);
void Normal(const Vec3f& v) { _normals->push_back(v); }
void Normal3f(float x, float y, float z) { _normals->push_back(Vec3(x,y,z)); }
void TexCoord2f(float x, float y) { _texcoords->push_back(Vec2(x,y)); }
void Vertex(const Vec3f& v) { _vertices->push_back(v); }
void Vertex3f(float x, float y, float z) { _vertices->push_back(Vec3(x,y,z)); }
void Normal3f(float x, float y, float z) { Normal(Vec3(x,y,z)); }
void TexCoord(const Vec2f& tc) { _texcoords->push_back(tc); }
void TexCoord2f(float x, float y) { TexCoord(Vec2(x,y)); }
void Vertex(const Vec3f& v);
void Vertex3f(float x, float y, float z) { Vertex(Vec3(x,y,z)); }
void setMatrix(const Matrixd& m);

View File

@@ -252,7 +252,7 @@ class OSG_EXPORT State : public Referenced
Polytope getViewFrustum() const;
void setUseVertexAttributeAliasing(bool flag) { _useVertexAttributeAliasing = flag; }
void setUseVertexAttributeAliasing(bool flag);
bool getUseVertexAttributeAliasing() const { return _useVertexAttributeAliasing ; }
typedef std::vector<VertexAttribAlias> VertexAttribAliasList;
@@ -834,11 +834,13 @@ class OSG_EXPORT State : public Referenced
/** Get the const DisplaySettings */
inline const DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); }
/** Get the DisplaySettings that is current active DisplaySettings to be used by osg::State, - if DisplaySettings is not directly assigned then fallback to DisplaySettings::instance(). */
inline DisplaySettings* getActiveDisplaySettings() { return _displaySettings.valid() ? _displaySettings.get() : osg::DisplaySettings::instance().get(); }
/** Get the const DisplaySettings that is current active DisplaySettings to be used by osg::State, - if DisplaySettings is not directly assigned then fallback to DisplaySettings::instance(). */
inline const DisplaySettings* getActiveDisplaySettings() const { return _displaySettings.valid() ? _displaySettings.get() : osg::DisplaySettings::instance().get(); }
/** Set flag for early termination of the draw traversal.*/
void setAbortRenderingPtr(bool* abortPtr) { _abortRenderingPtr = abortPtr; }

View File

@@ -652,8 +652,10 @@ class OSG_EXPORT Texture : public osg::StateAttribute
/** Get the internal texture format type. */
inline InternalFormatType getInternalFormatType() const { return _internalFormatType; }
class TextureObject;
/* select the size internal format to use based on Image when available or Texture format settings.*/
GLenum selectSizedInternalFormat(const osg::Image* image=0) const;
class TextureObject;
/** return true if the texture image data has been modified and the associated GL texture object needs to be updated.*/
virtual bool isDirty(unsigned int /*contextID*/) const { return false; }

View File

@@ -19,7 +19,7 @@
namespace osg {
#if defined(_MSC_VER)
typedef __int64 Timer_t;
typedef unsigned __int64 Timer_t;
#else
typedef unsigned long long Timer_t;
#endif

View File

@@ -203,14 +203,14 @@ protected:
};
/** Convenience function for getting the User Object associated with specificed name from an Object's UserDataContainer.*/
/** Convenience function for getting the User Object associated with specified name from an Object's UserDataContainer.*/
inline Object* getUserObject(osg::Object* object, const std::string& name)
{
osg::UserDataContainer* udc = object->getUserDataContainer();
return udc ? udc->getUserObject(name) : 0;
}
/** Convenience function for getting the User Object associated with specificed name from an Object's UserDataContainer.*/
/** Convenience function for getting the User Object associated with specified name from an Object's UserDataContainer.*/
inline const Object* getUserObject(const osg::Object* object, const std::string& name)
{
const osg::UserDataContainer* udc = object->getUserDataContainer();

View File

@@ -28,7 +28,7 @@ class Vec2i
/** Number of vector components. */
enum { num_components = 2 };
/** Vec member varaible. */
/** Vec member variable. */
value_type _v[2];
Vec2i() { _v[0]=0; _v[1]=0; }

View File

@@ -28,7 +28,7 @@ class Vec2ui
/** Number of vector components. */
enum { num_components = 2 };
/** Vec member varaible. */
/** Vec member variable. */
value_type _v[2];
Vec2ui() { _v[0]=0; _v[1]=0; }

View File

@@ -28,7 +28,7 @@ class Vec3i
/** Number of vector components. */
enum { num_components = 3 };
/** Vec member varaible. */
/** Vec member variable. */
value_type _v[3];
Vec3i() { _v[0]=0; _v[1]=0; _v[2]=0; }

View File

@@ -28,7 +28,7 @@ class Vec3ui
/** Number of vector components. */
enum { num_components = 3 };
/** Vec member varaible. */
/** Vec member variable. */
value_type _v[3];
Vec3ui() { _v[0]=0; _v[1]=0; _v[2]=0; }

View File

@@ -28,7 +28,7 @@ class Vec4i
/** Number of vector components. */
enum { num_components = 4 };
/** Vec member varaible. */
/** Vec member variable. */
value_type _v[4];
Vec4i() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; }

View File

@@ -28,7 +28,7 @@ class Vec4ui
/** Number of vector components. */
enum { num_components = 4 };
/** Vec member varaible. */
/** Vec member variable. */
value_type _v[4];
Vec4ui() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; }

View File

@@ -16,6 +16,7 @@
#include <ostream>
#include <istream>
#include <sstream>
#include <osg/Vec4d>
#include <osg/Vec4ub>
@@ -35,6 +36,43 @@
namespace osg {
/** Convinience class for building std::string using stringstream.
* Usage:
* MakeString str;
* std::string s = str<<"Mix strings with numbers "<<0" ;
* std::string s2 = str.clear()<<"and other classes such as ("<<osg::Vec3(0.0,1.0,3.0)<<)" ; */
class MakeString
{
public:
MakeString() {}
std::stringstream sstream;
template<typename T>
MakeString& operator << (const T& t)
{
sstream << t;
return *this;
}
MakeString& operator << (std::ostream& (*fun)(std::ostream&))
{
sstream << fun;
return *this;
}
inline MakeString& clear() { sstream.str("") ; return *this; }
inline operator std::string () const { return sstream.str(); }
inline std::string str() const { return sstream.str(); }
inline const char* c_str() const { return sstream.str().c_str(); }
};
inline std::ostream& operator << (std::ostream& output, const MakeString& str) { output << str.str(); return output; }
//////////////////////////////////////////////////////////////////////////
// Vec2f streaming operators
inline std::ostream& operator << (std::ostream& output, const Vec2f& vec)

Some files were not shown because too many files have changed in this diff Show More