Show
Ignore:
Timestamp:
03/03/15 13:03:23 (less than one hour ago)
Author:
robert
Message:

From Miha Ravselj, "Regarding previous submission it was only partial solution. After further testing I found similar bug also in ClearNode? serializer.

//GLbitfield mask = GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT;
This line was problematic since it produced incorrect result when let's say COLOR flag is serialized
it should be null as in Camera serializer or in a proposed BitFlagsSerializer?

This line of code caused that whenever only GL_COLOR_BUFFER_BIT bit was written and on value read GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT was restored instead of GL_COLOR_BUFFER_BIT only.

//GLbitfield mask = 0; //this resolves the issue same as in camera
Also same bit-wise comparison bug was also present in write method.


As you can see there are total 3 bit mask serializers in OSG and all 3 had bugs so I decided to add ADD_BITFLAGS_SERIALIZER and replace USER serializers in osg::Camera, osg::ClearNode? and osgText::TextBase?. I have made sure that bitflags serializer does not break backwards-compatibility since it uses same code as user serializer does in all 3 cases. (see tester.cpp on how compatibility test was performed)"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgQt/GraphicsWindowQt.cpp

    r13376 r13482  
    1515#include <osgQt/GraphicsWindowQt> 
    1616#include <osgViewer/ViewerBase> 
    17 #include <QtGui/QInputEvent> 
     17#include <QInputEvent> 
    1818 
    1919using namespace osgQt; 
     
    9797        if (itr == mKeyMap.end()) 
    9898        { 
    99             return int(*(event->text().toAscii().data())); 
     99            return int(*(event->text().toLatin1().data())); 
    100100        } 
    101101        else