zoukankan      html  css  js  c++  java
  • OSG StateSet

    osg::StateSet* ss=node->getOrCreateStateSet();

    1、光照

    ss->setMode(GL_LIGHTING, osg::StateAttribute::OFF);

    2、填充模式

    ss->setAttributeAndModes(new osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE), osg::StateAttribute::ON);

    ss->setAttributeAndModes(new osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL), osg::StateAttribute::ON);

    3、线宽

    osg::LineWidth* lw=new osg::LineWidth();

    lw->setWidth(5);

    ss->setAttributeAndModes(lw, osg::StateAttribute::ON);

    4、点的尺寸

    osg::Point* p = new osg::Point();

    p->setSize(3);

    ss->setAttribute(p);

    5、透明

    geo->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON);
    geo->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);

  • 相关阅读:
    JS/JQuery下拉列表选中项的索引
    数据挖掘
    Sencha安装
    新的开始
    jquery multi scrollable 同步的问题
    dom4j
    rest
    spring 2
    spring framework3.0开发
    笔记Spring in action
  • 原文地址:https://www.cnblogs.com/coolbear/p/3083485.html
Copyright © 2011-2022 走看看