HI Micheal,

I have now review your changes and have merged them with a few changes to
fix warnings reported with g++ 4.9.1.  These changes are now all checked
into OSG svn/trunk.

Cheers,
Robert.

The changes I made relative to your version were:

~/Contributors/MichaelMcDonnell$ diff osgtessellationshaders.cpp
~/OpenSceneGraph/examples/osgtessellationshaders/
123c123,124
< osg::ref_ptr<osg::Geode> CreateIcosahedron(osg::Program *program){
---
> osg::ref_ptr<osg::Geode> CreateIcosahedron(osg::Program *program)
> {
176c177,179
< osg::ref_ptr<osg::Program> createProgram(){
---
>
> osg::ref_ptr<osg::Program> createProgram()
> {
189c192,193
< class KeyboardEventHandler : public osgGA::GUIEventHandler {
---
> class KeyboardEventHandler : public osgGA::GUIEventHandler
> {
191,195c195,201
<     KeyboardEventHandler(osg::ref_ptr<osg::Uniform> tessInnerU,
osg::ref_ptr<osg::Uniform> tessOuterU)
<         : _tessInnerU(tessInnerU), _tessOuterU(tessOuterU),
osgGA::GUIEventHandler(){
<             tessInnerU->get(_tessInner);
<             tessOuterU->get(_tessOuter);
<         }
---
>     KeyboardEventHandler(osg::ref_ptr<osg::Uniform> tessInnerU,
osg::ref_ptr<osg::Uniform> tessOuterU):
>         _tessInnerU(tessInnerU),
>         _tessOuterU(tessOuterU)
>     {
>         tessInnerU->get(_tessInner);
>         tessOuterU->get(_tessOuter);
>     }
197c203,204
<     virtual bool handle(const osgGA::GUIEventAdapter&
ea,osgGA::GUIActionAdapter& gaa){
---
>     virtual bool handle(const osgGA::GUIEventAdapter&
ea,osgGA::GUIActionAdapter& gaa)
>     {
233c240,241
<     void increaseInnerTesselation() {
---
>     void increaseInnerTesselation()
>     {
237,238c245,247
<     void decreaseInnerTesselation() {
<         _tessInner = std::max(1.0f, --_tessInner);
---
>     void decreaseInnerTesselation()
>     {
>         _tessInner = std::max(1.0f, _tessInner-1.0f);
242c251,252
<     void increaseOuterTesselation() {
---
>     void increaseOuterTesselation()
>     {
246,247c256,258
<     void decreaseOuterTesselation() {
<         _tessOuter = std::max(1.0f, --_tessOuter);
---
>     void decreaseOuterTesselation()
>     {
>         _tessOuter = std::max(1.0f, _tessOuter-1.0f);
270c281
<
---
>
282c293
<
---
>


On 21 February 2015 at 21:22, Michael Mc Donnell <[email protected]>
wrote:

> Hi Robert,
>
> There is no way to increase or decrease the tessellation evenly with
> one key in the tessellation shader example. I expected that pressing
> plus would increase both the inner and outer tessellation at the same
> time. Instead I have to press up arrow and then right arrow. There is
> no way to decrease the tessellation evenly either. I have to press
> down arrow and then left arrow.
>
> I have changed the code so that the plus key increases both the inner
> and outer tessellation. The minus key decrease both the inner and
> outer tessellation. You can still use the arrow keys to control inner
> and outer tessellation separately.
>
> I have tested it on Windows 8.1. The arrow keys still work the same way.
>
> Base version is 14689.
>
> Thank you,
> Michael Mc Donnell
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to