Commit Graph

53 Commits

Author SHA1 Message Date
Robert Osfield
9c9439ef73 Added DisplaySettings:s/getgTextShaderTechnique() and OSG_TEXT_SHADER_TECHNIQUE env var support to DisplaySettings.
Added using of DisplaySettings:getgTextShaderTechnique() to Text default constructor.
Added better debug output control in Text.cpp
2017-10-24 14:46:13 +01:00
Robert Osfield
cc7cf54353 Added support for subsititing $VAR_NAME entries in shaders to enable writing shaders that work across GLSL versions. 2017-09-18 18:09:15 +01:00
Robert Osfield
6308b497f2 Replaced macro based selection of which shaders to use by default with DisplaySettings::setShaderHint() and OSG_SHADER=HINT=GL2|GL3|GLES2|GLES3|NONE controls 2017-03-27 11:44:41 +01:00
Robert Osfield
94891778c4 Restructred the enabling of vertex array object support to allow one to set enable the default via osg::State.
Added OSG_VERTEX_BUFFER_HINT env var to osg::DisplaySettings with VERTEX_BUFFER_OBJECT/VBO, VERTEX_ARRAY_OBJECT/VAO and NO_PREFERENCE to allow one to foce on VBO or VAO usage.

Restructred BufferObject assigned in osg::Geometry

Added
2016-10-11 11:29:29 +01:00
Robert Osfield
14d1483b06 Experimental support for OpenGL Vertex Array Object 2016-10-11 11:29:29 +01:00
Robert Osfield
70b5297575 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14826 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 18:01:12 +00:00
Robert Osfield
6f9ac83693 Added DisplaySettings::s/getNvOptimusEnablement() and OSG_NvOptimusEnablement env var control to control the setting of the NvOptimusEnablement variable
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14614 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 10:59:07 +00:00
Robert Osfield
4c1fd06252 Added osg::SyncSwapBuffersCallback to include/osg/GraphicsContext and support for enabling it to include/osg/DisplaySettings, and to the Viewer/CompositeViewer::realize() methods.
To enable the sync of swap buffers set the env var OSG_SYNC_SWAP_BUFFERS to ON or 1, to switch off set to OFF or 0.

One can also use the --sync command line option for application that pass on command line options to the osg::DisplaySettings::instance().


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14456 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 14:46:12 +00:00
Robert Osfield
c45f3aa4fb Merged changes to DisplaySettings from Stephan Huber in prep for controlling the menu hiding behaviour under OSX.
Added new WindowSystemInterface::setDisplaySettings() method to provide a mechanism for passing settings onto the WindowSystemInterface so it can then set up the system appropriately.

Added assignment of the DisplaySettings to the WindowSystemInterface in Viewer/ComppsiteViewer::realize().
2013-10-22 19:12:34 +00:00
Robert Osfield
9402efe38e Added DisplaySettings::KeystoneHint flag that can be set via --keystone-on and --keystone-off command line parameters, and the OSG_KEYSTONE env var 2013-05-10 17:59:07 +00:00
Robert Osfield
e545627571 Moved Keystone class into osgViewer library. 2013-05-09 15:18:14 +00:00
Robert Osfield
34a6b38983 Preperation for adding stereo support direclty into osgViewer. 2013-04-15 14:21:32 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
0eded3efbe From WojciechLewandowski, Added DispaySettings::SwapMethod and support for it in GraphicsContext::Traits 2010-09-30 14:25:27 +00:00
Robert Osfield
c2a59415ce Changed DisplaySetting::instance() to return a ref_ptr<>& rathern than a raw C pointer to enable apps to delete the singleton or assign their own. 2010-04-30 11:48:30 +00:00
Robert Osfield
c481f022e9 From Wojciech Lewandowski, "Building on earlier Paul's submission "[osg-users] Main branch MSFBO support change", I have added implicit buffer mask variables to DisplaySettings for setting global defaults for Camera FBOs. These mask variables are named after variables in Camera class. In Paul's submission they were named _renderBufferMask & _resolveBufferMask but I renamed them to _implicitBufferAttachmentRenderMask & _implicitBufferAttachmentResolveMask. DisplaySettings implementation includes reading of environment vars and command line options. Setters and getters follow typical OSG naming convention. I also updated names of ImplictBufferAttachment enum bits to match changed naming scheme.
DisplaySettings now define COLOR and DEPTH as defaults for implicit buffers. Consequently Camera by default uses the same defaults through USE_DISPLAY_SETTINGS_MASK. However, particular Camera mask can be easily overriden through Camera::setImplicitBufferAttachmentMask method. I hope, that in this way we can have global control over implicit buffer defaults, and we can still retain fine grained control at Camera level.

I have also replaced original unsigned ints used to store masks to signed ints because complier resolves enums as signed integer (I got a number of warnings with unsigned int)."
2009-11-19 10:10:50 +00:00
Robert Osfield
95d54ba15c Added glContexVersion, glContextFlags and glContextProfileMask members to osg::GraphicsContext::Traits to support GL3 graphics context creation.
Moved the handling of DisplaySettings into Traits constructor.

Added support for s/getGLContextVersion(), s/getGLContextFlags() and s/getGLContextProfileMask() to osg::DisplaySettings.

Added command line and env var support for setting the GLContextVersion, GLContextFlags and GLContextProfileMask to osg::DisplaySettings.
2009-11-11 15:25:42 +00:00
Robert Osfield
32b21dbb89 Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct, ElementBufferObject and PixelBufferObject. 2009-10-03 09:25:23 +00:00
Robert Osfield
3d75054e2c Preliminary work on support for a texture object pool that is designed to help manage resources down the GPU more tightly. 2009-09-22 18:45:24 +00:00
Robert Osfield
7c4225e574 Fixed error in DisplaySettings::setNumOfHttpDatabaseThreadsHint 2009-06-17 08:56:11 +00:00
Robert Osfield
98df67c918 Added DisplaySettings::s/getApplication() to help with gecko plugin initialization when it requires the application name 2008-11-20 12:03:21 +00:00
Robert Osfield
0ff3f48693 Improved the support for no pre compile, and configuring the number of threads in the DatabasePager. 2008-10-26 22:22:38 +00:00
Robert Osfield
6827104532 From Galen Faidley," Please find attached the modifications to get the new checkerboard
stereo format to work.  It's a good thing I tested these on a TV
before submitting them since I did indeed have a bug.  One thing I
did not test was to see how this would work in windowed mode.  Does
the interlaced stereo code have support for 'absolute' positions?
For example a given pixel on the screen is always shown in a given
eye no matter where the graphics context is placed?
"
2007-08-23 14:31:23 +00:00
Robert Osfield
f8ac71d7e5 Addd control for serializing draw dispatch. 2007-08-23 11:00:12 +00:00
Robert Osfield
57a18ff112 Added default setting of use of thread safe ref/unref. 2007-08-22 09:42:27 +00:00
Robert Osfield
d57a16e023 Added DisplaySetting::s/getCompileContextHint() and use of this hint in osgViewer::Viewer/CompositeViewer.
Removed the CustomViewer in osgterrain example as the above now removes the need for it.
2007-08-11 14:49:14 +00:00
Robert Osfield
691a49d0fa From Paul Melis, fixes to spelling mistakes/typos. 2007-07-11 15:51:17 +00:00
Robert Osfield
d9b6d87d5a Cleaned up per context buffers support 2006-07-26 15:29:26 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
2b61cf0a1e From Farshid Lashkari, "The following patch adds a multisample option to the
osg::DisplaySettings class. OsgCameraGroup will now read the setting
from the DisplaySettings instead of hardcoding the value. I added the
following commandline option to be able to set the multisample value:

--samples <num>

One thing to note, OsgCameraGroup would previously check if the
computer is an SGI and set multisample to 4. I retained this check in
DisplaySettings to be backwards compatible."
2006-03-13 21:29:17 +00:00
Robert Osfield
f3cfe97da9 Added support in DisplaySettings and OscCameraGroup for requesting accumulator buffer. 2005-11-02 19:15:18 +00:00
Robert Osfield
f46044084a From Farshid Lashkari & Robert Osfield: Added support for VERTICAL_INTERLACE and HORIZONTAL_INTERLACE
stereo modes use the stencil buffer.
2005-10-25 15:43:04 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
d268cf46fa Renamed SG_LIBRARY and SG_EXPORT macro's to OSG_LIBRARY and OSG_EXPORT 2005-04-11 17:14:17 +00:00
Robert Osfield
e278cc9d4c From Geoff Michel, spelling and typo fixes. 2004-08-31 14:08:12 +00:00
Robert Osfield
8bdb68ef97 Added support for reading environmental varables in CullSettings. 2004-05-05 09:16:12 +00:00
Robert Osfield
54a8ea33ce Added support to slideshow3D for -s commandline option allow the size of
the display to be specified.

Also implementaited some code for display position and speed info in
osgProducer::Viewer, not fully implemented yet.
2003-11-04 16:38:10 +00:00
Robert Osfield
4700b8902c Introduced new DisplaySettings::set/getDisplayType() and environemtal variables
to and command line arguments to set it.

Added support for using the DisplaySettings::getDisplayType() to detect use
of a Head Mounted Display when doing stereo so that the asymtric frustum can
be switched off.
2003-10-01 15:56:52 +00:00
Robert Osfield
b444cc1ab3 Added support for scaling the projection in vertical and horizontal split stereo
modes.
2003-05-27 11:03:49 +00:00
Robert Osfield
2ca505b3d8 Ported all glut based demos across to using the new osg::ArgumentParser. 2003-03-14 10:49:06 +00:00
Robert Osfield
73f741d16f Completed first pass at providing commandline option usage via the new
osg::ArgumentPareser and osg::ApplicationUsage classes. The osgproducer
demo has been implemented using these new mechansims.
2003-02-18 21:58:40 +00:00
Robert Osfield
c10d5f2d6f Added new osg::ApplicationUsage and osg::ArgumentParser to help streamline
application/example developement.
2003-02-18 16:36:42 +00:00
Robert Osfield
48bda9cc79 Added new Copyright/License notice to header and source files. 2003-01-21 16:45:36 +00:00
Robert Osfield
f36bc69c58 Made the more of the OSG's referenced object desctructors protected to ensure
that they arn't created on the stack inappropriately.

Split the implemention of Matrix up so that it is a simple no referenced counted
class and can be safefly created on the stack.  To support referenced counting a
seperate subclass now exists, this is RefMatrix which inherits from both Matrix and
Object.
2003-01-10 09:25:42 +00:00
Robert Osfield
8e84722f90 Added LEFT_EYE and RIGHT_EYE stereo to osg::DisplaySettings/osgUtil::SceneView
Renamed LODBias to LODScale.
2002-11-12 10:22:38 +00:00
Robert Osfield
f574d0dd68 Added support for setting the fusion distance directly in SceneView, defaults
to the original behavior of using the values from the Camera if attached.
2002-09-04 10:49:17 +00:00
Robert Osfield
12226e4371 Converted the instances of const built in types being returned from methods
and passed as paramters into straight forward non const built in types,
i.e. const bool foogbar(const int) becomes bool foobar(int).
2002-09-02 12:31:35 +00:00
Don BURNS
2b10b4c3df Fixed 69 occurance of 'Seperate' misspelling (should be 'Separate') 2002-08-29 03:22:27 +00:00
Robert Osfield
3a964a6b93 Updated docs and added osgGA 2002-07-16 20:07:32 +00:00
Robert Osfield
78b7c375d8 Removed , from end of enum. 2002-05-27 06:37:51 +00:00