nickguletskii / GLXOSD

GLXOSD is an extensible on-screen display (OSD)/overlay for OpenGL applications running on Linux with X11 which aims to provide similar functionality to MSI Afterburner/RivaTuner OSD. It can show FPS, frame timings, temperatures and more in OpenGL games and applications. It can also be used to benchmark games, much like voglperf.
https://glxosd.nickguletskii.com
MIT License
124 stars 20 forks source link

Overlay corruption #19

Closed wheybags closed 9 years ago

wheybags commented 9 years ago

Hi, on my system (debian sid), when using this with https://github.com/wheybags/freeablo/ , I get the following instead of a clean display: screenshot from 2015-02-15 23 54 27 The application uses SDL2. It worked fine on glxgears.

nickguletskii commented 9 years ago

Do I need to have Diablo to replicate this issue? Also, what display drivers do you use?

wheybags commented 9 years ago

To run freeablo you do, yeah :s. I'll see if I can make a minimal example. On 17 Feb 2015 18:40, "Nick Guletskii" notifications@github.com wrote:

Do I need to have Diablo to replicate this issue?

— Reply to this email directly or view it on GitHub https://github.com/nickguletskii/GLXOSD/issues/19#issuecomment-74724474.

nickguletskii commented 9 years ago

Before you waste more of your time helping me, let me just read some freeablo sourcecode and see if I can come up with a blind fix. More screenshots would be helpful though.

nickguletskii commented 9 years ago

Version 2.4.0 may fix this, but I can't confirm this because I don't have freablo.

wheybags commented 9 years ago

nope, but it is a bit better :p

screenshot from 2015-09-02 23-26-06

wheybags commented 9 years ago

Sorry, never noticed you asking what display drivers I use, nvidia proprietary drivers, version 340.76

nickguletskii commented 9 years ago

Thanks, I will try to find the cause using a different application that uses Rocket as its engine when I'll have the time. Sorry for the inconvenience.

ghost commented 9 years ago

I have a similar looking corruption in XCOM: Enemy Unknown. The funny thing is, "Gathering data..." text rendered correctly, then when it gets to showing FPS numbers, most glyphs are corrupted... but not the characters that are included in the "gathering data" string!

glxosd_xcom

ghost commented 9 years ago

Also, glxosd appears to be corrupting the game's textures, in particular the intro videos:

glxosd_intro

Everything looks fine when not launched through glxosd.

I'm using the latest master branch.

ghost commented 9 years ago

Also, glxosd appears to be corrupting the game's textures, in particular the intro videos:

Fixed by PR #50. The corrupted overlay is still unfixed, though.

ghost commented 9 years ago

The corrupted overlay is still unfixed, though.

I think I've fixed it. The glPixelStore modes weren't being reset. Pull request incoming...

"glPixelStore sets pixel storage modes that affect the operation of subsequent glReadPixels as well as the unpacking of texture patterns (see ... glTexImage2D, ...)."

ghost commented 9 years ago

https://www.opengl.org/sdk/docs/man/html/glPixelStore.xhtml

" Six more affect the unpacking of pixel data from memory: GL_UNPACK_SWAP_BYTES, GL_UNPACK_LSB_FIRST, GL_UNPACK_ROW_LENGTH, GL_UNPACK_IMAGE_HEIGHT, GL_UNPACK_SKIP_PIXELS, GL_UNPACK_SKIP_ROWS, GL_UNPACK_SKIP_IMAGES, and GL_UNPACK_ALIGNMENT."

Six? I count eight. :D

ghost commented 9 years ago

Should be fixed by PR #51. @wheybags: Please test if freeablo is fixed!

wheybags commented 9 years ago

Yup, works perfectly. Thanks scrawl!