Show
Ignore:
Timestamp:
08/22/14 21:00:53 (15 hours ago)
Author:
robert
Message:

Improved handling of setting of the depth of the UI.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgWrappers/deprecated-dotosg/osg/Geometry.cpp

    r13497 r13557  
    11#include <osg/Config> 
    2 #ifndef OSG_USE_DEPRECATED_GEOMETRY_METHODS  
     2#ifndef OSG_USE_DEPRECATED_GEOMETRY_METHODS 
    33#define OSG_USE_DEPRECATED_GEOMETRY_METHODS 1 
    44#endif 
     
    2121bool Geometry_writeLocalData(const Object& obj, Output& fw); 
    2222 
    23 bool Geometry_matchBindingTypeStr(const char* str,Geometry::AttributeBinding& mode); 
    24 const char* Geometry_getBindingTypeStr(Geometry::AttributeBinding mode); 
     23bool Geometry_matchBindingTypeStr(const char* str,deprecated_osg::Geometry::AttributeBinding& mode); 
     24const char* Geometry_getBindingTypeStr(deprecated_osg::Geometry::AttributeBinding mode); 
    2525 
    2626bool Geometry_matchPrimitiveModeStr(const char* str,GLenum& mode); 
     
    4646    bool iteratorAdvanced = false; 
    4747 
    48     Geometry& geom = static_cast<Geometry&>(obj); 
     48    deprecated_osg::Geometry& geom = static_cast<deprecated_osg::Geometry&>(obj); 
    4949 
    5050    if (fr.matchSequence("Primitives %i {") || fr.matchSequence("PrimitiveSets %i {") ) 
     
    135135 
    136136 
    137     Geometry::AttributeBinding normalBinding=Geometry::BIND_OFF; 
     137    deprecated_osg::Geometry::AttributeBinding normalBinding = deprecated_osg::Geometry::BIND_OFF; 
    138138    if (fr[0].matchWord("NormalBinding") && Geometry_matchBindingTypeStr(fr[1].getStr(),normalBinding)) 
    139139    { 
     
    201201    } 
    202202 
    203     Geometry::AttributeBinding colorBinding=Geometry::BIND_OFF; 
     203    deprecated_osg::Geometry::AttributeBinding colorBinding = deprecated_osg::Geometry::BIND_OFF; 
    204204    if (fr[0].matchWord("ColorBinding") && Geometry_matchBindingTypeStr(fr[1].getStr(),colorBinding)) 
    205205    { 
     
    232232 
    233233 
    234     Geometry::AttributeBinding secondaryColorBinding=Geometry::BIND_OFF; 
     234    deprecated_osg::Geometry::AttributeBinding secondaryColorBinding = deprecated_osg::Geometry::BIND_OFF; 
    235235    if (fr[0].matchWord("SecondaryColorBinding") && Geometry_matchBindingTypeStr(fr[1].getStr(),secondaryColorBinding)) 
    236236    { 
     
    263263 
    264264 
    265     Geometry::AttributeBinding fogCoordBinding=Geometry::BIND_OFF; 
     265    deprecated_osg::Geometry::AttributeBinding fogCoordBinding = deprecated_osg::Geometry::BIND_OFF; 
    266266    if (fr[0].matchWord("FogCoordBinding") && Geometry_matchBindingTypeStr(fr[1].getStr(),fogCoordBinding)) 
    267267    { 
     
    323323    } 
    324324 
    325     Geometry::AttributeBinding vertexAttribBinding=Geometry::BIND_OFF; 
     325    deprecated_osg::Geometry::AttributeBinding vertexAttribBinding = deprecated_osg::Geometry::BIND_OFF; 
    326326    if (fr.matchSequence("VertexAttribBinding %i %w") && Geometry_matchBindingTypeStr(fr[2].getStr(),vertexAttribBinding)) 
    327327    { 
     
    12781278bool Geometry_writeLocalData(const Object& obj, Output& fw) 
    12791279{ 
    1280     const Geometry& geom = static_cast<const Geometry&>(obj); 
     1280    const deprecated_osg::Geometry& geom = static_cast<const deprecated_osg::Geometry&>(obj); 
    12811281 
    12821282    const Geometry::PrimitiveSetList& primitives = geom.getPrimitiveSetList(); 
     
    13781378            Array_writeLocalData(*array,fw); 
    13791379        } 
    1380          
     1380 
    13811381        const osg::IndexArray* indices = (array!=0) ? dynamic_cast<const osg::IndexArray*>(array->getUserData()) : 0; 
    13821382        if (indices) 
     
    13941394        if (array) 
    13951395        { 
    1396             fw.indent()<<"VertexAttribBinding "<<i<<" "<<Geometry_getBindingTypeStr(static_cast<osg::Geometry::AttributeBinding>(array->getBinding()))<<std::endl; 
     1396            fw.indent()<<"VertexAttribBinding "<<i<<" "<<Geometry_getBindingTypeStr(static_cast<deprecated_osg::Geometry::AttributeBinding>(array->getBinding()))<<std::endl; 
    13971397 
    13981398            if (array->getNormalize()) 
     
    14011401                fw.indent()<<"VertexAttribNormalize "<<i<<" FALSE"<<std::endl; 
    14021402 
    1403             fw.indent()<<"VertexAttribArray "<<i<<" ";             
     1403            fw.indent()<<"VertexAttribArray "<<i<<" "; 
    14041404            Array_writeLocalData(*array,fw); 
    14051405        } 
     
    14161416} 
    14171417 
    1418 bool Geometry_matchBindingTypeStr(const char* str,Geometry::AttributeBinding& mode) 
     1418bool Geometry_matchBindingTypeStr(const char* str,deprecated_osg::Geometry::AttributeBinding& mode) 
    14191419{ 
    1420     if (strcmp(str,"OFF")==0) mode = Geometry::BIND_OFF; 
    1421     else if (strcmp(str,"OVERALL")==0) mode = Geometry::BIND_OVERALL; 
    1422     else if (strcmp(str,"PER_PRIMITIVE")==0) mode = Geometry::BIND_PER_PRIMITIVE; 
    1423     else if (strcmp(str,"PER_PRIMITIVE_SET")==0) mode = Geometry::BIND_PER_PRIMITIVE_SET; 
    1424     else if (strcmp(str,"PER_VERTEX")==0) mode = Geometry::BIND_PER_VERTEX; 
     1420    if (strcmp(str,"OFF")==0) mode = deprecated_osg::Geometry::BIND_OFF; 
     1421    else if (strcmp(str,"OVERALL")==0) mode = deprecated_osg::Geometry::BIND_OVERALL; 
     1422    else if (strcmp(str,"PER_PRIMITIVE")==0) mode = deprecated_osg::Geometry::BIND_PER_PRIMITIVE; 
     1423    else if (strcmp(str,"PER_PRIMITIVE_SET")==0) mode = deprecated_osg::Geometry::BIND_PER_PRIMITIVE_SET; 
     1424    else if (strcmp(str,"PER_VERTEX")==0) mode = deprecated_osg::Geometry::BIND_PER_VERTEX; 
    14251425    else return false; 
    14261426    return true; 
     
    14281428 
    14291429 
    1430 const char* Geometry_getBindingTypeStr(Geometry::AttributeBinding mode) 
     1430const char* Geometry_getBindingTypeStr(deprecated_osg::Geometry::AttributeBinding mode) 
    14311431{ 
    14321432    switch(mode) 
    14331433    { 
    1434         case (Geometry::BIND_OVERALL)           : return "OVERALL"; 
    1435         case (Geometry::BIND_PER_PRIMITIVE)     : return "PER_PRIMITIVE"; 
    1436         case (Geometry::BIND_PER_PRIMITIVE_SET) : return "PER_PRIMITIVE_SET"; 
    1437         case (Geometry::BIND_PER_VERTEX)        : return "PER_VERTEX"; 
    1438         case (Geometry::BIND_OFF)               : 
    1439         default                                        : return "OFF"; 
     1434        case (deprecated_osg::Geometry::BIND_OVERALL)           : return "OVERALL"; 
     1435        case (deprecated_osg::Geometry::BIND_PER_PRIMITIVE)     : return "PER_PRIMITIVE"; 
     1436        case (deprecated_osg::Geometry::BIND_PER_PRIMITIVE_SET) : return "PER_PRIMITIVE_SET"; 
     1437        case (deprecated_osg::Geometry::BIND_PER_VERTEX)        : return "PER_VERTEX"; 
     1438        case (deprecated_osg::Geometry::BIND_OFF)               : 
     1439        default                                 : return "OFF"; 
    14401440    } 
    14411441}