Thomas Hogarth
fe0b53d7f5
Added more plugins and texture shader to iOS example, fixed a couple of missed if defines for GLES3
2017-05-04 00:24:46 +01:00
Robert Osfield
1abd99f084
Added support for glObjectLabel debugging
2016-11-15 14:35:47 +00:00
Robert Osfield
1cc53246e9
Changed appending of \n to be to the version line.
2016-10-12 17:24:25 +01:00
Robert Osfield
f73d1fb7ea
Refactored the parsing of #pragma to address problems handling #pragma without () usage.
2016-02-29 15:06:36 +00:00
Robert Osfield
3e0435febd
From Jannik Heller , GL object deletion fix.
...
"This submission changes deleteGLObject calls to scheduleGLObjectForDeletion, to ensure that the actual deletion happens from the correct thread (the graphics thread). This fixes the leak I reported in http://forum.openscenegraph.org/viewtopic.php?t=15567 , and possibly also http://forum.openscenegraph.org/viewtopic.php?t=15564 ."
2016-02-05 20:29:22 +00:00
Robert Osfield
161246d864
Refactored the GL object deletion management to use new osg::GraphicsObjectManager/GLObjectManager base classes, and osg::ContextData container.
...
This approach unifies much of the code handling the clean up of OpenGL graphics data, avoids lots of local mutexes and static variables that were previously required,
and enables the clean up scheme to be easily extended by users providing their own GraphicsObjectManager subclasses.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15130 16af8721-9629-0410-8352-f15c8da7e697
2015-09-23 09:47:34 +00:00
Robert Osfield
a2013caa47
Quietened down #pragma(tic) shader composition messages
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15079 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:18:54 +00:00
Robert Osfield
0a1db3d6fc
From Jannik Heller, typo fixes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14832 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 10:43:56 +00:00
Robert Osfield
ed9502e017
Added check for newline at end of version line, and of it's not add a '\n'
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14761 16af8721-9629-0410-8352-f15c8da7e697
2015-03-05 10:53:28 +00:00
Robert Osfield
6bddbdf074
Improvements to the #pragma(tic) shader composition support
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14694 16af8721-9629-0410-8352-f15c8da7e697
2015-02-13 12:50:43 +00:00
Robert Osfield
9fa3defb0e
Added reassignment of the #version line to the first entry in the source list.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14688 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 16:41:31 +00:00
Robert Osfield
b90503fdf5
Introduced new shader composition approach that utilizes #pragma requires(), #pragma import_defines() and #ifdef in GLSL to enable multiple different versions of shaders based
...
on defines passed in from osg::StateSet::setDefine(..).
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14681 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:04:02 +00:00
Robert Osfield
485709f708
Moved GL2Extensions functionality into the include/osg/GLExtensions header and new GLExtensions object.
...
Moved the #defines into new include/osg/GLDefines
Converted all GL2Extensions usage to GLExtensions usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14593 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 10:38:12 +00:00
Robert Osfield
66da1328f8
Ported GL2Extentions across to using the new GL extensions approach - cutting code count by 3000 lines!
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14566 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 16:22:31 +00:00
Robert Osfield
097aedf23c
From David Callu, warning fixes and removal of spaces at end of lines.
2013-06-28 12:00:43 +00:00
Robert Osfield
6a4741cf54
Moved local variable into local scope to avoid it being created when not used.
2013-03-26 17:03:22 +00:00
Robert Osfield
26a8f63212
From Wang Rui, "In the attached files I've added the Compute Shader support for OSG, as well as serializer updates and a new osgcomputeshaders example. My submission also include a setComputeGroups() function in Program for setting compute-shader work groups, and a bindToImageUnit() function in Texture for binding textures as image variables in shaders.
...
All code are tested on Windows 7 + NVIDIA GFX 570 with the latest GeForce 310.70 Driver (BETA), which could support OpenGL 4.3.
Compute shader information can be found at "http://www.opengl.org/registry/specs/ARB/compute_shader.txt "
"
2013-01-25 11:54:03 +00:00
Robert Osfield
14a563dc9f
Ran script to remove trailing spaces and tabs
2012-03-21 17:36:20 +00:00
Robert Osfield
6c9733f96a
From Johannes Baeuerle, fix for memory leak
2011-03-09 16:30:48 +00:00
Robert Osfield
54afbb9ff8
From Jahannes Bauerle, "l discovered that the shader class(/src/osg/Shader.cpp) shows wrong behavior when using binary shaders . When shader objects are compared the reference pointer behind the _shaderBinary member is not included in the comparison.
...
I included binary shaders into an osgt model file. These shaders only consists of the binary shader code, I did not supply the text version additionally. When loading the model the osg::Optimizer threw away all shaders except the first one. In the current trunk version of the file two shader objects are identical despite differing _shaderBinary members as the compare method of the Shader class does not include the comparison of that member.
The fix in this submission adds the check for identity of the referenced binary shaders to the shader class.
When comparing two shader objects with text source shaders the new lines of comparison are not even executed as the comparison returns false in the previous lines when the text shaders differ.
With this fix I get expected behavior, the Optimizer handles the different shaders correctly."
2011-02-14 13:50:14 +00:00
Robert Osfield
d7747685b3
From Holger Helmich, Tessellation shader support
2010-11-23 14:50:31 +00:00
Robert Osfield
9b70348ced
Fixed typo of commercial
2010-11-22 11:22:03 +00:00
Robert Osfield
2d28026654
From David Fries, "Fix remote X11 crash querying GL_NUM_EXTENSIONS
...
In osg::isGLExtensionOrVersionSupported in src/osg/GLExtensions.cpp when
using indirect X11 rendering,
glGetIntegerv( GL_NUM_EXTENSIONS, &numExt );
is leaving numExt uninitilized causing the following glGetStringi to
return NULL when the extension number isn't present. Passing NULL to
std::string() then crashes. This is with the following nVidia driver.
OpenGL version string: 3.3.0 NVIDIA 256.35
I went ahead and initialized some of the other variables before
glGetInitegerv in other files as well. I don't know for sure
which ones can fail, so I don't know which are strictly required.
"
2010-11-03 09:28:28 +00:00
Robert Osfield
46b221a832
Added compile/release and resize of GL objects to ShaderAttribute.
...
Removed the StateAttribute::compose() method.
Fixed the default type value in ShaderAttribute
2010-07-06 12:19:26 +00:00
Robert Osfield
751b0498fe
Added basic code injection fields to osg::Shader,
...
creation of main shader to ShaderComposer and
collection of ShaderComponent to osg::State.
Also added very basic shader set up in osgshadecomposition example.
2010-07-05 16:32:58 +00:00
Robert Osfield
a55c4b7d70
Added basic ShaderComponent class and beginnings osgshadercomposition example
2010-07-02 12:04:20 +00:00
Robert Osfield
a79a8d30f9
Convesion of osg::notify to OSG_INFO etc.
2010-05-28 15:47:52 +00:00
Robert Osfield
7db9f18619
From Chris Hanson, build fixes for Solaris-64
2010-04-15 11:41:37 +00:00
Robert Osfield
4262d10217
Added osg::ShaderBinary::readShaderBinaryFile(..) static method
2009-11-18 11:25:28 +00:00
Robert Osfield
817e4818aa
Fixed Shader constructor
2009-11-16 17:50:33 +00:00
Robert Osfield
52fbe9723f
Added new osg::ShaderBinary class, and support for it in osg::Shader.
2009-11-16 12:32:41 +00:00
Robert Osfield
aefd1513f4
Ported osg::Geometry across to supporting the aliasing of vertex, color and normal etc. calls to Vertex Attributes.
...
Added support for automatic aliasing of vertex, normal, color etc. arrays to Vertex Attribute equivelants.
Added new osg::GLBeginEndAdapter class for runtime conversion from glBegin/glEnd codes to vertex arrray equivelants.
Added automatic shader source conversion from gl_ to osg_ builtins.
2009-10-16 16:26:27 +00:00
Robert Osfield
4d19bed7f2
Changed the debug output so that the code path is not run unless it's needed
2009-06-19 13:53:35 +00:00
Robert Osfield
9559498db6
From Jean-Sebastian Guay and Robert Osfield, added line numbers to debug shader output
2009-06-19 13:50:14 +00:00
Robert Osfield
b7b065abe3
Refactored the Registry::ReadFileCallback, WriteFileCallback and ReaderWriter::Options to they are now defined in their own header and in the osgDB namespace.
...
Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback.
Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that
read/write call and any nested file operations
2009-05-09 08:49:27 +00:00
Robert Osfield
c4d07194a2
From Art Trevs, add support for saving external shader files.
...
From Robert Osfield, adding missing member variable initializes and Output::getShaderFileNameForOutput() implementation
2008-03-04 14:04:48 +00:00
Robert Osfield
e73134d6fb
Removed non standard and redundent /*EOF*/
2008-01-08 14:38:58 +00:00
Robert Osfield
578f385760
From Mike Weiblen, support for geometry shaders, and osgeometryshaders example to demonstrate them.
2008-01-08 14:29:44 +00:00
Robert Osfield
ff565128af
Introduced new osg::discardDeletedOpenGLObjects() methods, and usage of it in
...
GrpahicsContext::close() to handle cases where deletingOpenGLObjects is no possible,
such as when GraphicsWindowEmbedded is used.
2008-01-08 13:24:29 +00:00
Robert Osfield
4e5ce63c85
From Per Fahlberg, "Attached is a fix allowing removal of shaders from a program after it is
...
first compiled. It will also allow new shaders to be attached after the
program is first compiled."
2007-12-11 11:21:13 +00:00
Robert Osfield
ff195bddf5
Added Object::resizeGLObjectBuffers(uint) method to help improve the ability
...
to change the number of active graphics contexts on the fly during an applications
life.
2007-01-04 14:11:51 +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
93a2c3d011
Improved handling of clean up of osg::Program/osg::Shader on closing of a graphis context.
2006-01-16 17:05:17 +00:00
Robert Osfield
7453711267
From Mike Weiblen,
...
" - adjustments to improve namespacing on VS
- clarify compilation status message"
2005-06-20 10:36:06 +00:00
Robert Osfield
27c4c6a956
Moved the set/getName() support from osg::Node etc into the osg::Obejct
...
base class
2005-06-08 13:16:19 +00:00
Robert Osfield
fe384e53c7
Added clear of lazy uniform updating structure on relink, also added debug
...
output of shader being compiled.
2005-05-12 08:54:11 +00:00
Robert Osfield
679c44f4ae
Changed the info log so that it output to INFO on success, to WARN when an
...
error has occured.
2005-05-11 19:32:57 +00:00
Robert Osfield
a5fcddc5e5
From Mike Weiblen, Progra/Shader fixes
2005-04-30 07:02:02 +00:00
Robert Osfield
e24cfa0370
Futher work on supporting update and event callbacks in StateSet, Uniform and StateAttribute
2005-04-25 13:37:12 +00:00