OpenSceneGraph icon indicating copy to clipboard operation
OpenSceneGraph copied to clipboard

Mistake when Set the LOWER_LEFT point

Open whua0727 opened this issue 5 years ago • 0 comments

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);

whua0727 avatar Dec 11 '20 03:12 whua0727