Opened 22 years ago

Closed 22 years ago

Last modified 5 years ago

#8106 closed patch

OpenGL: small bug fixed

Reported by: SF/luke_br Owned by: Kirben
Priority: normal Component: Graphics
Version: Keywords:
Cc: Game:

Description

I really think this was the last one. It was a problem with the menu drawing when the mouse passed through it.

Ticket imported from: #628356. Ticket imported from: patches/211.

Attachments (6)

sdl_gl.diff (900 bytes ) - added by SF/luke_br 22 years ago.
SDL/GL: Small bug fixed
scummvm.jpg (28.0 KB ) - added by Kirben 22 years ago.
scummvmgl.jpg (26.4 KB ) - added by Kirben 22 years ago.
fb2opengl.h.diff (686 bytes ) - added by SF/luke_br 22 years ago.
GL functions update
sdl_gl.2.diff (2.4 KB ) - added by SF/luke_br 22 years ago.
Color depth problem fixed
fb2opengl.h.2.diff (305 bytes ) - added by SF/luke_br 22 years ago.
Now conforming to SDLDocs (www.libsdl.org)

Download all attachments as: .zip

Change History (13)

by SF/luke_br, 22 years ago

Attachment: sdl_gl.diff added

SDL/GL: Small bug fixed

comment:1 by Kirben, 22 years ago

Owner: set to Kirben

comment:2 by Kirben, 22 years ago

Patch as been added to scummvm cvs. An OpenGL build of scummvm is much darker than a normal build of scummvm though. Check the attached pictures, any ideas ?

by Kirben, 22 years ago

Attachment: scummvm.jpg added

by Kirben, 22 years ago

Attachment: scummvmgl.jpg added

comment:3 by SF/luke_br, 22 years ago

Well, I use SDL_SetGamma(). But it doesn't seem to work in fullscreen on Linux, just on Windows. The other options is to 'shift left' the bits of each color component (I draw in opengl using RGB textures). So, the problem may be that a 16 bit color depth (565 or 555) has less bits then the 24 bit RGB (888). I will try to compile on a windows machine to see if it's the problem. From what i see at the picture, it got the wrong colors (maybe you are using a 16 bit and 555 pixel format. Max has experienced the same problem, but I use SDL_GetRGB() which shouldn't cause this).

by SF/luke_br, 22 years ago

Attachment: fb2opengl.h.diff added

GL functions update

comment:4 by SF/luke_br, 22 years ago

I just found out what the problem was. SDL_SetVideoMode was always setting the color depth of the screen to 32 bits (if the X color depth is greater then 16 bit). Now I force the sdl_tmpscreen to be 16 bit with 565 ordering (doesn't make a difference in the game). Everything is drawn correctly in any color depth now. The 2 new diff's are attached.

by SF/luke_br, 22 years ago

Attachment: sdl_gl.2.diff added

Color depth problem fixed

by SF/luke_br, 22 years ago

Attachment: fb2opengl.h.2.diff added

Now conforming to SDLDocs (www.libsdl.org)

comment:5 by Kirben, 22 years ago

Status: newclosed

comment:6 by Kirben, 22 years ago

Thanks, patch as been added to scummvm cvs.

comment:7 by digitall, 5 years ago

Component: Graphics
Note: See TracTickets for help on using tickets.