diff options
author | Johannes Schickel | 2013-08-06 03:35:07 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-06 03:51:11 +0200 |
commit | 09f7e4d5d4d45a4db7c85520be66cf81fe975607 (patch) | |
tree | d45a8df28fbcabedcfa879082cbe81f357adde58 /backends/platform/iphone/iphone_video.mm | |
parent | 6d86a66493a7f9b74eeb14a5ff4bd750805d00ee (diff) | |
download | scummvm-rg350-09f7e4d5d4d45a4db7c85520be66cf81fe975607.tar.gz scummvm-rg350-09f7e4d5d4d45a4db7c85520be66cf81fe975607.tar.bz2 scummvm-rg350-09f7e4d5d4d45a4db7c85520be66cf81fe975607.zip |
IPHONE: Do not access Surface::pixels directly.
Diffstat (limited to 'backends/platform/iphone/iphone_video.mm')
-rw-r--r-- | backends/platform/iphone/iphone_video.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm index 0bfae30fc7..f2c1527658 100644 --- a/backends/platform/iphone/iphone_video.mm +++ b/backends/platform/iphone/iphone_video.mm @@ -365,7 +365,7 @@ const char *iPhone_getDocumentsDir() { _mouseTexCoords[5] = _mouseTexCoords[7] = _videoContext.mouseHeight / (GLfloat)_videoContext.mouseTexture.h; glBindTexture(GL_TEXTURE_2D, _mouseCursorTexture); printOpenGLError(); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _videoContext.mouseTexture.w, _videoContext.mouseTexture.h, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, _videoContext.mouseTexture.pixels); printOpenGLError(); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _videoContext.mouseTexture.w, _videoContext.mouseTexture.h, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, _videoContext.mouseTexture.getPixels()); printOpenGLError(); } - (void)updateMainSurface { @@ -377,7 +377,7 @@ const char *iPhone_getDocumentsDir() { // Unfortunately we have to update the whole texture every frame, since glTexSubImage2D is actually slower in all cases // due to the iPhone internals having to convert the whole texture back from its internal format when used. // In the future we could use several tiled textures instead. - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, _videoContext.screenTexture.w, _videoContext.screenTexture.h, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, _videoContext.screenTexture.pixels); printOpenGLError(); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, _videoContext.screenTexture.w, _videoContext.screenTexture.h, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, _videoContext.screenTexture.getPixels()); printOpenGLError(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); printOpenGLError(); } @@ -386,7 +386,7 @@ const char *iPhone_getDocumentsDir() { glTexCoordPointer(2, GL_FLOAT, 0, _overlayTexCoords); printOpenGLError(); glBindTexture(GL_TEXTURE_2D, _overlayTexture); printOpenGLError(); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _videoContext.overlayTexture.w, _videoContext.overlayTexture.h, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, _videoContext.overlayTexture.pixels); printOpenGLError(); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _videoContext.overlayTexture.w, _videoContext.overlayTexture.h, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, _videoContext.overlayTexture.getPixels()); printOpenGLError(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); printOpenGLError(); } |