The frequency drops when I switch to full screen mode. I am writing to sdl2 with opengl and opengl es. Here's the code, I don’t know, there may be errors in it, since my TV supports only 60Hz, then I have to manually set 60Hz. But on other monitors hertz more than on TV. Why is it so, I used to not seem to notice such a problem. Here is the code just in case.

SDL_Init ( SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_EVENTS ); SDL_DisplayMode mode; SDL_GL_SetAttribute ( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES ); SDL_GL_SetAttribute ( SDL_GL_CONTEXT_MAJOR_VERSION, 3 ); SDL_GL_SetAttribute ( SDL_GL_CONTEXT_MINOR_VERSION, 0 ); SDL_GetCurrentDisplayMode ( 0, &mode ); int width = mode.w; int height = mode.h; //mode.refresh_rate = 60; #if 0 width = 1920; height = 1080; #endif global.width = width; global.height = height; #if 1 SDL_GL_SetAttribute ( SDL_GL_ACCELERATED_VISUAL, 1 ); SDL_GL_SetAttribute ( SDL_GL_DOUBLEBUFFER, 1 ); SDL_GL_SetAttribute ( SDL_GL_DEPTH_SIZE, 24 ); #endif int flags = 0; flags = SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN; #if defined ( __ANDROID__ ) flags |= SDL_WINDOW_FULLSCREEN; #endif SDL_Window *window = SDL_CreateWindow ( "ipsi", 0, 0, width, height, flags ); SDL_SetWindowDisplayMode ( window, &mode ); SDL_GLContext glc; glc = SDL_GL_CreateContext ( window ); SDL_GL_MakeCurrent ( window, glc ); 
  • Try rolling back to sdl 2.0.8. On 2.0.9, performance issues are reported. - HolyBlackCat
  • Oh, thanks, it helped, how did you find out about the messages? - xverizex 1:09 pm
  • @HolyBLackCat, how can I download the 2.0.8 version of the source code to create for android? - xverizex
  • Yes, just came across similar questions here and in English SO. "How can I download the 2.0.8 version of the source code?" In the link to the new source code, correct 9 by 8 . - HolyBlackCat
  • @HolyBlackCat and how to use hg to do this, they have mercurial written there and the tags and versions are different, and I do not understand how using hg you can get a branch from 2.0.8, and so I downloaded the archive on your advice. But I wonder how you can do it with hg. - xverizex

0