diff options
author | Travis Howell | 2002-10-25 03:13:56 +0000 |
---|---|---|
committer | Travis Howell | 2002-10-25 03:13:56 +0000 |
commit | 2cbfd74e2d63f0ef7261fc2a6d9d97440e72682f (patch) | |
tree | 33b889b5e309c791e3443fe4ee6b69d8535a2534 /backends | |
parent | 45b12bc28605cdd3f9c583bb20ed97e5f5304c48 (diff) | |
download | scummvm-rg350-2cbfd74e2d63f0ef7261fc2a6d9d97440e72682f.tar.gz scummvm-rg350-2cbfd74e2d63f0ef7261fc2a6d9d97440e72682f.tar.bz2 scummvm-rg350-2cbfd74e2d63f0ef7261fc2a6d9d97440e72682f.zip |
Add more OpenGL updates, patch #628356
svn-id: r5307
Diffstat (limited to 'backends')
-rw-r--r-- | backends/sdl/sdl_gl.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/backends/sdl/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp index d930e435cd..2fd551a1a0 100644 --- a/backends/sdl/sdl_gl.cpp +++ b/backends/sdl/sdl_gl.cpp @@ -55,6 +55,8 @@ public: protected: FB2GL fb2gl; + SDL_Surface *glEnd; // Black rectangle at end of the GL screen + SDL_Rect blackrect2; // Needed for blitting the above surface typedef void ScalerProc(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr, uint8 *dstPtr, uint32 dstPitch, int width, int height); @@ -255,6 +257,19 @@ void OSystem_SDL_Normal::load_gfx_mode() { fb2gl.screen->format->Bmask, fb2gl.screen->format->Amask); + glEnd = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth, + // 320x256 texture (black end) + 256-_screenHeight-_screenStart, + 16, + fb2gl.screen->format->Rmask, + fb2gl.screen->format->Gmask, + fb2gl.screen->format->Bmask, + fb2gl.screen->format->Amask); + + blackrect2.x = 0; + blackrect2.y = 0; + blackrect2.w = _screenWidth; + blackrect2.h = 256-_screenHeight-_screenStart; if (sdl_tmpscreen == NULL) error("sdl_tmpscreen failed"); @@ -286,7 +301,6 @@ void OSystem_SDL_Normal::unload_gfx_mode() { } void OSystem_SDL_Normal::update_screen() { - SDL_Rect blackrect2 = {0, _screenStart, _screenWidth, 15}; // If the shake position changed, fill the dirty area with blackness if (_currentShakePos != _newShakePos) { @@ -347,9 +361,9 @@ void OSystem_SDL_Normal::update_screen() { fb2gl.blit16(sdl_tmpscreen,_num_dirty_rects,_dirty_rect_list,0, _currentShakePos+_screenStart); - - SDL_FillRect(sdl_tmpscreen, &blackrect2, 0); - fb2gl.blit16(sdl_tmpscreen,1,&blackrect2,0,_screenHeight); + + SDL_FillRect(glEnd, &blackrect2, 0); + fb2gl.blit16(glEnd,1,&blackrect2,0,_screenHeight+_screenStart); fb2gl.display(); } |