Show
Ignore:
Timestamp:
10/10/09 11:41:28 (5 years ago)
Author:
robert
Message:

From Stephane Lamoliatte, "Here is a patch wich improves the support for geometry shaders in OpenSceneGraph.
It adds new PrimitiveSet? constants for the specific geometry shader primitive types :

  • LINES_ADJACENCY
  • LINE_STRIP_ADJACENCY
  • TRIANGLES_ADJACENCY
  • TRIANGLE_STRIP_ADJACENCY

It also adds some missing features to the glsl reader plug'in.
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/osg/Geometry.cpp

    r9447 r10627  
    14421442    else if (strcmp(str,"QUAD_STRIP")==0)       mode = PrimitiveSet::QUAD_STRIP; 
    14431443    else if (strcmp(str,"POLYGON")==0)          mode = PrimitiveSet::POLYGON; 
     1444    else if (strcmp(str,"LINES_ADJACENCY")==0)          mode = PrimitiveSet::LINES_ADJACENCY; 
     1445    else if (strcmp(str,"LINE_STRIP_ADJACENCY")==0)     mode = PrimitiveSet::LINE_STRIP_ADJACENCY; 
     1446    else if (strcmp(str,"TRIANGLES_ADJACENCY")==0)      mode = PrimitiveSet::TRIANGLES_ADJACENCY; 
     1447    else if (strcmp(str,"TRIANGLE_STRIP_ADJECENCY")==0) mode = PrimitiveSet::TRIANGLE_STRIP_ADJECENCY; 
    14441448    else return false; 
    14451449    return true; 
     
    14611465        case (PrimitiveSet::QUAD_STRIP)        : return "QUAD_STRIP"; 
    14621466        case (PrimitiveSet::POLYGON)           : return "POLYGON"; 
     1467        case (PrimitiveSet::LINES_ADJACENCY)            : return "LINES_ADJACENCY"; 
     1468        case (PrimitiveSet::LINE_STRIP_ADJACENCY)       : return "LINE_STRIP_ADJACENCY"; 
     1469        case (PrimitiveSet::TRIANGLES_ADJACENCY)        : return "TRIANGLES_ADJACENCY"; 
     1470        case (PrimitiveSet::TRIANGLE_STRIP_ADJECENCY)   : return "TRIANGLE_STRIP_ADJECENCY"; 
    14631471        default                                : return "UnknownPrimitveType"; 
    14641472    }