Compare commits
2
Commits
next
...
635f460dd5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
635f460dd5 | ||
|
|
36316e8859 |
@@ -947,10 +947,18 @@ SGRect<int> intersectRect(const SGRect<int>& a, const SGRect<int>& b)
|
||||
}
|
||||
|
||||
image->setColor(color, x, y);
|
||||
auto c = getCanvas().lock();
|
||||
c->enableRendering(true); // force a repaint
|
||||
}
|
||||
|
||||
void Image::dirtyPixels()
|
||||
{
|
||||
osg::ref_ptr<osg::Image> image = _texture->getImage();
|
||||
if (!image)
|
||||
return;
|
||||
image->dirty();
|
||||
auto c = getCanvas().lock();
|
||||
c->enableRendering(true); // force a repaint
|
||||
}
|
||||
|
||||
void Image::allocateImage()
|
||||
{
|
||||
osg::Image* image = new osg::Image;
|
||||
|
||||
@@ -115,6 +115,11 @@ namespace canvas
|
||||
|
||||
void setPixel(int x, int y, const osg::Vec4& color);
|
||||
|
||||
/**
|
||||
* mark the image pixels as modified, so the canvas is re-painted
|
||||
*/
|
||||
void dirtyPixels();
|
||||
|
||||
osg::ref_ptr<osg::Image> getImage() const;
|
||||
|
||||
// void setRow(int row, int offset, )
|
||||
|
||||
@@ -503,7 +503,7 @@ static void setMember(naContext ctx, naRef obj, naRef fld, naRef value)
|
||||
return;
|
||||
}
|
||||
|
||||
if(!IS_HASH(obj)) ERR(ctx, "non-objects have no members");
|
||||
if(!IS_HASH(obj)) naRuntimeError(ctx, "non-object does not have member: %s", naStr_data(fld));
|
||||
naHash_set(obj, fld, value);
|
||||
ctx->opTop -= 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user