(In reply to comment #75) > (In reply to comment #74) > > I have no tearing on GL in fullscreen. > Please test it with tearing test 720x406 from > https://bugs.freedesktop.org/show_bug.cgi?id=43674
I can't do that.
Those are movies, and the test program I'm using that doesn't tear doesn't play any movies, it just does raw GL output. mplayer *does* tear in fullscreen, but that's because it doesn't actually set the fullscreen bit.
Here's the full code, so you can try it yourself:
#include <GL/gl.h> #include <SDL/SDL.h> #include <strings.h> #include <stdio.h>
int main(int argc, char **argv) { Uint32 i, mode;
if (argc != 2) goto usage; if (strcmp(argv[1], "w") == 0) mode = SDL_OPENGL; else if (strcmp(argv[1], "f") == 0) mode = SDL_OPENGL | SDL_FULLSCREEN; else goto usage;
SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); SDL_SetVideoMode(800, 600, 32, mode);
for (i = 0; i < 100; i++) { glClearColor(1, 1, 1, 1); glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapBuffers(); glClearColor(0, 0, 0, 1); glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapBuffers(); } return EXIT_SUCCESS;
usage: printf("Usage: %s [w|f]\n", argv[0]); return EXIT_FAILURE; }
// Compile with gcc test-gl.c -o test-gl -lSDL -lGL
(In reply to comment #75) /bugs.freedeskt op.org/ show_bug. cgi?id= 43674
> (In reply to comment #74)
> > I have no tearing on GL in fullscreen.
> Please test it with tearing test 720x406 from
> https:/
I can't do that.
Those are movies, and the test program I'm using that doesn't tear doesn't play any movies, it just does raw GL output. mplayer *does* tear in fullscreen, but that's because it doesn't actually set the fullscreen bit.
Here's the full code, so you can try it yourself:
#include <GL/gl.h>
#include <SDL/SDL.h>
#include <strings.h>
#include <stdio.h>
int main(int argc, char **argv) {
Uint32 i, mode;
if (argc != 2)
goto usage;
if (strcmp(argv[1], "w") == 0)
mode = SDL_OPENGL;
else if (strcmp(argv[1], "f") == 0)
mode = SDL_OPENGL | SDL_FULLSCREEN;
else
goto usage;
SDL_Init( SDL_INIT_ VIDEO); SetAttribute( SDL_GL_ SWAP_CONTROL, 1); ode(800, 600, 32, mode);
SDL_GL_
SDL_SetVideoM
for (i = 0; i < 100; i++) { GL_COLOR_ BUFFER_ BIT); GL_SwapBuffers( ); GL_COLOR_ BUFFER_ BIT); GL_SwapBuffers( );
glClearColor(1, 1, 1, 1);
glClear(
SDL_
glClearColor(0, 0, 0, 1);
glClear(
SDL_
}
return EXIT_SUCCESS;
usage:
printf("Usage: %s [w|f]\n", argv[0]);
return EXIT_FAILURE;
}
// Compile with gcc test-gl.c -o test-gl -lSDL -lGL