Tuesday, March 24, 2026

SDL2, OpenGL, Nvidia laptop computer display screen tearing


EDIT 2017-05-14 dvb. Concern nonetheless energetic to this very day, see geforce discussion board hyperlink in primary query.

Word 3: “Stoltverd” has posted a “repair information” on geforce discussion board. It has workarounds for non-OpenGL video games.

https://boards.geforce.com/default/subject/1008527/geforce-mobile-gpus/-guide-diagonal-screen-tearing-problems-with-optimus-nvidias-control-panel-not-working-like-it-should-need-a-fix-get-in-here/

Word 4: My workaround for OpenGL video games: use HDMI output to exterior monitor. (In my case, the one recreation I care about is my very own, and I take advantage of an enormous low-cost HDMI TV for demo.)

EDIT 2016-03-06.

Word 1: Apparently this can be a recognized situation with Nvidia.
When you’ve discovered right here attributable to similar downside, please stoke the collective “please repair it” by submitting a “query” at https://nvidia.custhelp.com/app/ask.


Word 2: Does not occur on exterior monitor. Additionally does not occur on inner show if exterior monitor is mirroring. (Shock.)


I am creating my recreation immediately in C++, OpenGL, and SDL2.

On an Alienware 15 R2 laptop computer with Nvidia GTX 965M, I get display screen tearing in a curious diagonal line like proven beneath. It goes throughout the window prime left to backside proper.

The picture beneath is taken throughout a display screen fade-in, so exhibits only a brightness line. However it occurs between any two totally different frames.

If my window is full display screen, the road goes top-left to bottom-right of the entire display screen.

Similar code runs tremendous (no tearing) on: All macs, similar laptop computer on Intel built-in GPU, desktop PC with Nvidia 730.

Similar laptop computer seems tremendous with different video games, Chrome+Shadertoy, &c.

Important loop seems one thing like:

// setup code
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    SDL_GL_SetSwapInterval(1);
    flags = SDL_WINDOW_OPENGL;
    SDL_CreateWindow(... ,flags);
// primary loop
whereas(1) {
    this->checkEvents();
    SDL_GL_SwapWindow(this->mainWindow);
    this->doGlDrawing();
}

Grepping boards, I’ve seen experiences of some OpenGL video games exhibiting this on Alienware & different Dell laptops.

All options welcome! Thanks.

Edit 2016-02-20, some hyperlinks to comparable user-side experiences:
https://boards.geforce.com/default/subject/903422/geforce-mobile-gpus/diagonal-screen-tearing-issues-on-gtx-860m-870m-960m-965m-970m-980m-/

http://en.group.dell.com/owners-club/alienware/f/3746/t/19658623

https://www.reddit.com/r/Alienware/feedback/427ltv/anyone_have_diagonal_screen_tearing_when_playing/

SDL2, OpenGL, Nvidia laptop computer display screen tearing

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles