Show
Ignore:
Timestamp:
11/12/09 13:07:13 (5 years ago)
Author:
robert
Message:

Improved compatibility with GLES2

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osggeometry/osggeometry.cpp

    r7648 r10741  
    514514        osg::StateSet* stateSet = new osg::StateSet(); 
    515515        polyGeom->setStateSet(stateSet); 
     516         
     517        #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)  
    516518        osg::PolygonStipple* polygonStipple = new osg::PolygonStipple; 
    517519        stateSet->setAttributeAndModes(polygonStipple,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); 
     520        #endif 
    518521         
    519522        printTriangles("Triangles/Strip/Fan",*polyGeom); 
     
    615618        0, 
    616619        1, 
    617         2, 
    618         3 
     620        3, 
     621        2 
    619622    }; 
    620623 
     
    625628    // and UIntDrawElements which contains ... unsigned int indices.   
    626629    // The first parameter to DrawElements is  
    627     polyGeom->addPrimitiveSet(new osg::DrawElementsUShort(osg::PrimitiveSet::QUADS,numIndices,myIndices)); 
     630    polyGeom->addPrimitiveSet(new osg::DrawElementsUShort(osg::PrimitiveSet::TRIANGLE_STRIP,numIndices,myIndices)); 
    628631 
    629632    // new we need to add the texture to the Drawable, we do so by creating a