SDL vs SDLGL-PP

By thegeps

Master (166)

thegeps's picture

19-01-2019, 02:28

Recently I had a problem with SDLGL-PP mode setup that crashes openMSX on my laptop. I had to change to SDL and full screen started to works again (Manuel solved that). When this happened I was in the middle of a routine optimization. I was working on the routine in an other pc where openMSX works fine in SDLGL-PP. Well, when I tried to launch the optimized routine back to the laptop the scrolling was jerky. I thinked it was because of the optimization. In fact the routine had 8 frames and at 8th frame it did a 672 bytes LDDR and draws the new top row. I (high) optimized the first 7 frames but it is hard to optimize a LDDR. You can only unroll it so a series of LDD... So I modified the routine to redistribuite the work load and for the first 7 frames it does a 96 bytes LDDR and in the 8th frames it only have to draw the new top row. But the scroll still was jerky O_O
Today I used (at work) the other pc (the one with SDLGL-PP set) and all works fine and smooth. So at home I tried to run the scroll routine first in SDL windowed (still jerky) and then in SDLGL-PP windowed (it crashes in full screen, you know): really smooth. Wtf? SDL less accurate?

Login or register to post comments

By Manuel

Ascended (15190)

Manuel's picture

19-01-2019, 09:39

It is probably related to vsync. The GL renderer is often vsynced by the graphics driver. This means that openMSX frame drawings are synced to pc frame drawings, so there is no tearing.

By thegeps

Master (166)

thegeps's picture

19-01-2019, 10:55

Thank you, as always, for your answer. Hope I can soon use SDLGL-PP on my notebook too Smile

By Manuel

Ascended (15190)

Manuel's picture

19-01-2019, 11:14

Did you try without full screen, but with a large scale factor?

By thegeps

Master (166)

thegeps's picture

19-01-2019, 16:02

nope, I will try

By thegeps

Master (166)

thegeps's picture

19-01-2019, 16:09

yep, it works! I can use it at 3x scale Smile

By thegeps

Master (166)

thegeps's picture

19-01-2019, 16:14

but as you know I can't see the console in SDLGL-PP... Sad

By Manuel

Ascended (15190)

Manuel's picture

19-01-2019, 16:58

ah right, that problem. I wonder if SDL2 would show a better result, but for that first the Windows development build should be a bit more stable. Of course you can always try it out and share your experiences.

By Manuel

Ascended (15190)

Manuel's picture

28-01-2019, 22:20

Please try with the latest development build.

By thegeps

Master (166)

thegeps's picture

07-02-2019, 01:09

I'll do Smile

My MSX profile