[osg-users] How to properly transfer texture coordinates in geometric shaders in Shader #130 version?

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed Dec 9 18:03:46 PST 2020


env is win10 osg3.6.4 GTX1660
[image: QQ图片20201210095944.jpg]

osg::ref_ptr<osg::Program> createProgram()
{
    osg::Program *program = new osg::Program();
    program->addShader(new osg::Shader(osg::Shader::VERTEX,vertSource));
    program->addShader(new osg::Shader(osg::Shader::GEOMETRY,geomSource));
    program->addShader(new osg::Shader(osg::Shader::FRAGMENT,fragSource));
    program->setParameter(GL_GEOMETRY_VERTICES_OUT_EXT, 3);
    program->setParameter(GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES);
    program->setParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT,  GL_TRIANGLES  );
    return program;
}

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/c5ff0227-7e65-4643-b4c0-7d670f2fd115n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201209/e71ed365/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QQ??20201210095944.jpg
Type: image/jpeg
Size: 619623 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201209/e71ed365/attachment-0001.jpg>


More information about the osg-users mailing list