Commit Graph

14675 Commits

Author SHA1 Message Date
Robert Osfield
59a28859ec Added shader pipeline support to osg::TexGen. 2017-03-23 17:59:39 +00:00
Robert Osfield
2fc28a7f64 Added mapping of GL modes to 0 (disabled) or 1 (enabled) for the fixed function -> shaders mapping.
Added flags for hinting to StateAttribute::apply() implementations whether to toggling on/off the fixed function or shader equivilants.
2017-03-23 17:59:39 +00:00
Robert Osfield
2574894e17 Added TextureAttribute base class from Texture related StateAttribute that need texture unit information from StateSet::setTextureAttribute assigned to
help set configure the appropriate uniforms.
2017-03-23 17:58:34 +00:00
Robert Osfield
7d076d0407 Added UniformBase::setName(const std::string& baseName, unsigned int unit); declaration 2017-03-23 17:58:34 +00:00
Robert Osfield
ccfb320ae8 Cleaned up set of ModeDefine maps using the new osg:MakeString helper class 2017-03-23 17:58:34 +00:00
Robert Osfield
7e43538c63 Added accessors for osg::State's ModeDefineMaps 2017-03-23 17:58:34 +00:00
Robert Osfield
7744c44c8a Added convinience mathod for passing osg::Plane to glUniform 2017-03-23 17:58:34 +00:00
Robert Osfield
bbbfa19ce2 Added osg::PlaneUniform.
Added osg::UniformBase::setName(const std::string&) ability to be reset.
Added osg::UniformBase::setName(const std::string& baseName, unsigned int unit) so set the uniform name in the form "baseName[unit]".
2017-03-23 17:58:34 +00:00
Robert Osfield
5a996dd2d1 Added osg::MakeString class to make it easier to create std::string's using std::ostream style << usage. 2017-03-23 17:58:34 +00:00
Robert Osfield
c0b04cc37b Introduced new osg::UniformBase class to enable an extensible uniform class hierachy
Added osg::UniformTemplate, osg::UniformArrayTemplate and a set of IntUniform, IntArrayUniform etc. to make it easier to interact with basic types more efficiently.
2017-03-23 17:58:34 +00:00
Robert Osfield
5bfefdae6a Added mapping of texture modes to #define's to inject into shaders where required 2017-03-23 17:42:33 +00:00
Robert Osfield
1c9219560b if'd 0 out resetting of the Projection and ModelView and Program object pointers in the popAllStateSets() as this was causing problems when using the RootStateSet. 2017-03-23 17:42:33 +00:00
Robert Osfield
4600acb3b7 Restructed check for whether to print out shaders to make it easier to toggle on/off 2017-03-23 17:42:33 +00:00
Robert Osfield
44c11a856b Added toggling of the osg::State ::setUseModelViewAndProjectionUniforms() and setUseVertexAttributeAliasing() via the --mv and --va command line options respectively 2017-03-23 17:42:33 +00:00
Robert Osfield
6d531fd643 Moved the implementation of the State::setUseModelViewAndProjectionUniforms(bool) and State::setUseVertexAttributeAliasing(bool) into State.cpp and added initialization of the VertexArrayState array bindings to ensure that bindings get updated correctly.
Refined the State::popStateSet() method to make it more efficient
2017-03-23 17:42:33 +00:00
Robert Osfield
8ee319bbd5 Added set up of root StateSet in the osg::State to enable shaders to be applied for all rendering on a graphics context. 2017-03-23 17:42:33 +00:00
Robert Osfield
a99b05ff87 Added State::s/getRootStateSet() that enables applications to insert a StateSet above all rendering for a graphics context. Utilized in the new shadper pipeline functionality 2017-03-23 17:42:33 +00:00
Robert Osfield
172ca9bae5 Removed debug version of applyUniformList 2017-03-23 17:42:33 +00:00
Robert Osfield
d1222fc2ef Added fallback textures to handle cases where no texture is provided 2017-03-23 17:42:33 +00:00
Robert Osfield
0bcfa8d980 Added shader defines for setting up vertex and fragment shaders with texture support 2017-03-23 17:42:33 +00:00
Robert Osfield
40e08813e2 Improved debug output of shaders that use shader defines. 2017-03-23 17:42:33 +00:00
Robert Osfield
5f875682bf Added setup of uniform arrays for passing in texture modes 2017-03-23 17:42:33 +00:00
Robert Osfield
df034d6fb8 if'd out ShaderGenVisitor usage under GLES2 to enble proper testing of new fixed function -> shaders infrastructure. 2017-03-23 17:42:33 +00:00
Robert Osfield
de0334e654 Added support for mapping texture modes to #define's 2017-03-23 17:42:33 +00:00
Robert Osfield
7e0551e7e8 Added #pragma import_texture_modes() -> #define into #pragma data structure a GLSL parsing 2017-03-23 17:42:33 +00:00
Robert Osfield
fe2811e822 REplaced _EXT GLenum for standard GL versions 2017-03-23 17:42:33 +00:00
Robert Osfield
71da950cee Standardized GLenum's on non EXT versions 2017-03-23 17:42:33 +00:00
Robert Osfield
c33f33139e Added more mods to the mode string map 2017-03-23 17:42:33 +00:00
Robert Osfield
5c2ea3ad1f Intial work on providing mapping from OpenGL modes to #pragma(tic) shader composition defines.
Shader  usage:

   #pragma import_modes ( GL_LIGHTING, GL_TEXGTURE_2D )

Will provide #define in shaders for GL_LIGHTING and GL_TEXTURE_2D if these Modes are enabled via StateSet::setMode(..);
2017-03-23 17:42:33 +00:00
Robert Osfield
b4152d9634 Added simple fallback from osg::Material::apply() when fixed function pipeline is disabled 2017-03-23 14:53:08 +00:00
Robert Osfield
7ccd25a4d5 Fixed missing initializer for _color and assignment of color to ShapeDrawable 2017-03-23 14:40:44 +00:00
Robert Osfield
9848c1d264 First pass at default shader for GLES2,GLES3 and GL3. 2017-03-23 11:09:49 +00:00
Robert Osfield
d70d00607f Removed no longer relevant line 2017-03-23 10:25:25 +00:00
Robert Osfield
717cb182ce Removed hardwaring to online write inine when writing to binary files to allow inline images in asci and binary files 2017-03-23 09:52:21 +00:00
Torben Dannhauer
53a10a7bd9 as preparation for the upcoming 3rdParty package for Visual Studio 2017, I updated Find3rdPartyDependencies.cmake to find also the newest Freetype 2.7.1 release. 2017-03-22 17:27:05 +00:00
Robert Osfield
e74f8f4bbe Added TextureBuffer serializer 2017-03-22 14:20:03 +00:00
OpenSceneGraph git repository
602a6beda8 Merge pull request #225 from MPursche/add_texture2dmultisample_serializer
Added serializer for Texture2DMultisample
2017-03-22 10:31:45 +00:00
Marcel Pursche
422587a285 Added serializer for Texture2DMultisample 2017-03-22 10:47:58 +01:00
Robert Osfield
48aa852f42 Replaced GL_QUADS and GL_QUAD_STRIP usage with indexed GL_TRIANGLES 2017-03-22 09:43:19 +00:00
OpenSceneGraph git repository
429aef3b08 Merge pull request #221 from tomhog/topic-gles3-ios
GLES3 support improvements on iOS
2017-03-21 17:56:39 +00:00
Robert Osfield
1778a2a6fb Made VAO the default for GL3 builds.
Improved the handling of DisplaySettings::getVertexBufferHint() values.
2017-03-21 15:38:52 +00:00
tomhog
423e14f92f Merge branch 'master' into topic-gles3-ios 2017-03-21 15:33:13 +00:00
OpenSceneGraph git repository
5d6322da2b Merge pull request #224 from MPursche/improved_debian_packages
Improved CPack configuration for building debian packages
2017-03-21 14:43:09 +00:00
Robert Osfield
a74872c6bf Refactored GlyphTexture so that it utlizes standard osg::Texture2D/osg::Image combinations rather than locally implemented per glyph subloading. 2017-03-21 13:10:45 +00:00
Thomas Hogarth
bd2d9a7fed Merged origin 2017-03-20 19:43:07 +00:00
Thomas Hogarth
630af80635 Adusted Font shaders to use gl3 path on gles3, iphone example using inbuilt shaders 2017-03-20 19:35:01 +00:00
Thomas Hogarth
b493657c47 Shaders now using vertex colors 2017-03-20 18:39:56 +00:00
Thomas Hogarth
74abb99b0e small compile fix for ios viewer example gles1 2017-03-20 18:39:56 +00:00
Thomas Hogarth
2ec6624816 updated ios build instructions in readme 2017-03-20 18:39:56 +00:00
Thomas Hogarth
7ba2e728cd GLES3 now working on iOS, tried to maintain support for have bother gles2 and gles3, allowed avfoundation to be added on iOS, improved iOS example cmake generation 2017-03-20 18:39:56 +00:00