mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
TINYGL: Rename copyToBuffer to copyFromFrameBuffer
This commit is contained in:
parent
a6da9e4906
commit
c4686ee84c
@ -1259,7 +1259,7 @@ Bitmap *GfxTinyGL::getScreenshot(int w, int h, bool useStored) {
|
||||
if (useStored) {
|
||||
bmp = createScreenshotBitmap(_storedDisplay, w, h, true);
|
||||
} else {
|
||||
Graphics::Surface *src = TinyGL::copyToBuffer(_pixelFormat);
|
||||
Graphics::Surface *src = TinyGL::copyFromFrameBuffer(_pixelFormat);
|
||||
bmp = createScreenshotBitmap(src, w, h, true);
|
||||
src->free();
|
||||
delete src;
|
||||
@ -1276,7 +1276,7 @@ void GfxTinyGL::storeDisplay() {
|
||||
TinyGL::presentBuffer();
|
||||
_storedDisplay->free();
|
||||
delete _storedDisplay;
|
||||
_storedDisplay = TinyGL::copyToBuffer(_pixelFormat);
|
||||
_storedDisplay = TinyGL::copyFromFrameBuffer(_pixelFormat);
|
||||
}
|
||||
|
||||
void GfxTinyGL::copyStoredToDisplay() {
|
||||
|
@ -266,7 +266,7 @@ void TinyGLRenderer::drawTexturedRect3D(const Math::Vector3d &topLeft, const Mat
|
||||
}
|
||||
|
||||
Graphics::Surface *TinyGLRenderer::getScreenshot() {
|
||||
return TinyGL::copyToBuffer(Texture::getRGBAPixelFormat());
|
||||
return TinyGL::copyFromFrameBuffer(Texture::getRGBAPixelFormat());
|
||||
}
|
||||
|
||||
void TinyGLRenderer::flipBuffer() {
|
||||
|
@ -173,7 +173,7 @@ Common::Rect TinyGLDriver::getUnscaledViewport() const {
|
||||
}
|
||||
|
||||
Graphics::Surface *TinyGLDriver::getViewportScreenshot() const {
|
||||
Graphics::Surface *tmp = TinyGL::copyToBuffer(getRGBAPixelFormat());
|
||||
Graphics::Surface *tmp = TinyGL::copyFromFrameBuffer(getRGBAPixelFormat());
|
||||
Graphics::Surface *s = new Graphics::Surface();
|
||||
s->create(_viewport.width(), _viewport.height(), getRGBAPixelFormat());
|
||||
byte *src = (byte *)tmp->getPixels();
|
||||
|
@ -35,7 +35,7 @@ void destroyContext();
|
||||
void presentBuffer();
|
||||
void presentBuffer(Common::List<Common::Rect> &dirtyAreas);
|
||||
void getSurfaceRef(Graphics::Surface &surface);
|
||||
Graphics::Surface *copyToBuffer(const Graphics::PixelFormat &dstFormat);
|
||||
Graphics::Surface *copyFromFrameBuffer(const Graphics::PixelFormat &dstFormat);
|
||||
|
||||
} // end of namespace TinyGL
|
||||
|
||||
|
@ -310,10 +310,10 @@ void getSurfaceRef(Graphics::Surface &surface) {
|
||||
c->fb->getSurfaceRef(surface);
|
||||
}
|
||||
|
||||
Graphics::Surface *copyToBuffer(const Graphics::PixelFormat &dstFormat) {
|
||||
Graphics::Surface *copyFromFrameBuffer(const Graphics::PixelFormat &dstFormat) {
|
||||
GLContext *c = gl_get_context();
|
||||
assert(c->fb);
|
||||
return c->fb->copyToBuffer(dstFormat);
|
||||
return c->fb->copyFromFrameBuffer(dstFormat);
|
||||
}
|
||||
|
||||
} // end of namespace TinyGL
|
||||
|
@ -127,7 +127,7 @@ struct FrameBuffer {
|
||||
return _zbuf;
|
||||
}
|
||||
|
||||
Graphics::Surface *copyToBuffer(const Graphics::PixelFormat &dstFormat) {
|
||||
Graphics::Surface *copyFromFrameBuffer(const Graphics::PixelFormat &dstFormat) {
|
||||
Graphics::Surface tmp;
|
||||
tmp.init(_pbufWidth, _pbufHeight, _pbufPitch, _pbuf.getRawBuffer(), _pbufFormat);
|
||||
return tmp.convertTo(dstFormat);
|
||||
|
Loading…
x
Reference in New Issue
Block a user