Hi Frederik, Frederik Didden wrote: > Hi again, > > Do you mind putting us in the right direction concerning setting the > texture > coordinates?
oh, sorry for not mentioning this (BTW for a better overview of these things there is a tutorial here: http://www.opensg.org/doc-1.6.0/TutorialIntroduction.html - the "Related Pages" link at the top leads to a chapter overview) The following is untested, but hopefully gets you started, otherwise please ask if something is unclear/not working. // your geometry GeometryPtr geo; // get the texture coordinates property, the // dcast will only succeed if you are actually using // Vec2f texture coordinates GeoTexCoords2fPtr texCoords = GeoTexCoords2fPtr::dcast(geo->getTexCoords()); if(texCoords == NullFC) { std::cerr << "error"; return; } // change texture coordinates (for a single quad) // will repeat the texture twice in s // direction once in t direction beginEditCP(texCoords, GeoTexCoords2f::GeoPropDataFieldMask); texCoords->setValue(Vec2f(0.0, 0.0), 0)); texCoords->setValue(Vec2f(2.0, 0.0), 1)); texCoords->setValue(Vec2f(2.0, 1.0), 2)); texCoords->setValue(Vec2f(0.0, 1.0), 3)); endEditCP(texCoords, GeoTexCoords2f::GeoPropDataFieldMask); Hope it helps, Carsten ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
