#8251 closed patch
OpenGL fixes
Reported by: | SF/luke_br | Owned by: | Kirben |
---|---|---|---|
Priority: | normal | Component: | Graphics |
Version: | Keywords: | ||
Cc: | Game: |
Description
Fixed: 1. Black borders 2. Bottom line 3. Vertical black line 4. 320x240 games (no aspect change possible) 5. Switching to GL mode corrected (Bilinear Filter activation). 6. Added more comments for better understanding.
Comments: 1. if you want to ditch the code, no problem. 2. FB2GL_320 when set would use 2 textures. If not set then would just use one texture (256x256). 3. I am still going to add the option to use one 512x256 texture (modern 3d video cards). 320x256 texture I think will not work. 4. The vertical black line is caused by a gap between the two textures (256x256). See the variable texture1_end (fb2opengl.h) 5. blit16() is just for ScummVM, and needs the flag FB2GL_NO_320. The other flags may not work with this method. For non-scummvm use update().
Ticket imported from: #762815. Ticket imported from: patches/356.
Attachments (4)
Change History (17)
by , 21 years ago
Attachment: | fb2opengl.patch added |
---|
comment:1 by , 21 years ago
Added patch to ScummVM cvs, only problems left are: Curse of Monkey Island crashing when OpenGL filter is used. The aspect ratio with OpenGL filter is lost when switching ScummVM from window size to full screen size.
comment:2 by , 21 years ago
Owner: | set to |
---|
comment:3 by , 21 years ago
I have tested on a Voodoo3 and a GeForce2 and everything is working fine. The aspect ratio isn't lost when switching from window size to full screen size. And it doesn't crash with Curse of Monkey Island (monkeyvga). Could you please use a debbuger and tell me where the problem is? Thanks
comment:4 by , 21 years ago
Thats strange, I'm using a GeForce 2 MX based video card too with Windows XP. The Curse of Monkey Island uses the comi target.
comment:5 by , 21 years ago
On Mac OS X, starting scummvm+comi with the GL backend produces this OS message: *** malloc_zone_malloc[16679]: argument too large: -286720 then it goes on. Pressing Ctrl-Alt-A causes a seg fault. Note that with COMI, there shouldn't be done any aspect ration "correction", because the aspect ratio is already correct. Strecthing it vertically would make the ratio *wrong*.
comment:6 by , 21 years ago
The black vertical line is still there, in bilinear mode. It was gone in "normal" mode already (I fixed that some time ago). Also your comment on this in the code is techincally incorrect ("Note: wrong value may cause black vertical line (gap) between texture1 and texture2 in the X axis").
The problem is not caused by an incorrect value; rather, it's caused because of the bilinear filtering and the use of two textures: obviously the pixel column at the very border of the textures has nothing on one of its sides with which it can interpolate. The only fix for this behaviour would be to use the texture border feature of OpenGL.
comment:7 by , 21 years ago
Have you check out the aspect ratio problem with the hotswap_gfx_mode() function enabled ? rather than the default of using SDL_WM_ToggleFullScreen().
comment:8 by , 21 years ago
I have fixed the aspect ratio problem with hotswap_gfx_mode(). The other option for the border of the texture is to use GL_REPEAT instead of GL_CLAMP. But when using the first option you get the vertical line, even if running scummvm under Linux. Gl_CLAMP works fine in both 3d cards that I told you when running scummvm under Linux. It looks like the Windows version have some problems with GL_CLAMP. I can't find a simple solution. So, this weekend I will try to make the 512x256 texture rendering version.
comment:9 by , 21 years ago
Note that I am not using windows, I am using OpenGL on Mac OS X; and the black line is *exactly* the correct behaviour if using GL_CLAMP in the SDL code. If you don't get it on some system, that would indicate that your system is using a buggy OpenGL implementation.
comment:10 by , 21 years ago
Why is this item still open? While there are still open issues with the GL backend, any patch for them should be submitted in a separate new tracker item. The only reason to keep this open would be if we have to discuss reverting the patch, which doesn't seem to be the case...
comment:11 by , 21 years ago
OK, just thought one patch item for OpenGL fixes might have been easier. Closing now...
comment:12 by , 21 years ago
Status: | new → closed |
---|
comment:13 by , 6 years ago
Component: | → Graphics |
---|
fb2opengl fixes