TINYGL: Added blit image versioning.
This commit is contained in:
parent
1220e5373f
commit
f6c259684c
2 changed files with 13 additions and 1 deletions
|
@ -14,7 +14,7 @@ Common::Rect rotateRectangle(int x, int y, int width, int height, int rotation,
|
|||
|
||||
struct BlitImage {
|
||||
public:
|
||||
BlitImage() : _isDisposed(false) { }
|
||||
BlitImage() : _isDisposed(false), _version(0) { }
|
||||
|
||||
bool _isDisposed;
|
||||
|
||||
|
@ -65,6 +65,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int getVersion() const {
|
||||
return _version;
|
||||
}
|
||||
|
||||
~BlitImage() {
|
||||
_surface.free();
|
||||
}
|
||||
|
@ -211,6 +215,8 @@ public:
|
|||
bool _binaryTransparent;
|
||||
Common::Array<Line> _lines;
|
||||
Graphics::Surface _surface;
|
||||
private:
|
||||
int _version;
|
||||
};
|
||||
|
||||
void tglGetBlitImageSize(BlitImage *blitImage, int &width, int &height) {
|
||||
|
@ -218,6 +224,10 @@ void tglGetBlitImageSize(BlitImage *blitImage, int &width, int &height) {
|
|||
height = blitImage->_surface.h;
|
||||
}
|
||||
|
||||
int tglGetBlitImageVersion(BlitImage *blitImage) {
|
||||
return blitImage->getVersion();
|
||||
}
|
||||
|
||||
BlitImage *tglGenBlitImage() {
|
||||
TinyGL::GLContext *c = TinyGL::gl_get_context();
|
||||
BlitImage *image = new BlitImage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue