OpenSceneGraph
OpenSceneGraph copied to clipboard
Mistake when Set the LOWER_LEFT point
There is a mistake when set the LOWER_LEFT point。Should be “XYCoord t(x / tw, y / th);”
void Widget::setTexCoordRegion(point_type x, point_type y, point_type w, point_type h) {
osg::Image* image = _image();
if(!image) return;
point_type tw = image->s();
point_type th = image->t();
TexCoordArray* texs = _texs();
// Set the LOWER_LEFT point.
XYCoord t(x / tw, y / tw);