![]() However, after you’ve made a few more posts, the forums will let you post links. And on the links, new users can’t post them (to hinder spammers). OpenGL Hardware Database by Sascha Willems.I did as you suggested and my db entries are here: I’ve verified my graphics drivers are up to date. I’ve successfully run the OpenGL Extensions Viewer 6.0 benchmark on the laptop and it passes for all available versions of OpenGL. I’ve also timed the whole loop and its always under 2 ms. If I print out the ticks counter I see those update 60/second so I know nothing is blocking or slowing down. ![]() The result is that I see colors grow closer to white every couple or 3 seconds with sudden jumps to a much brighter or darker shade. This loop runs 60 times a second (I verify this with print statements), and every iteration is always <2 ms. GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) I’ve toyed with software rendering instead of hardware, all 3 swap intervals, and single buffering, as well as fullscreen mode to no avail.Īnd my main loop contains the following: r32 value = (ticks % 360) / 360.f *context = SDL_GL_CreateContext(*window) Sync buffer swap with monitor refresh rate SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, HARDWARE_RENDERING) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, DOUBLE_BUFFER) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 5) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4) SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE) SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, *window = SDL_CreateWindow("OpenGL Test", My SDL setup code is more or less as follows: SDL_Init(SDL_INIT_VIDEO) ![]() This sample application works on one computer (also Windows, but OpenGL 4.6) but not another. I know rendering works because I have tested it with a simple textured cube, and that displays fine. I’ve got the problem narrowed down to a smallish example where I’m only changing the clear color. The problem laptop has OpenGL 4.5 and I’m on Windows 10. More frustratingly it works on one computer of mine and not another. it may redraw 10 times very quickly, but only every 3 seconds second or so. The problem is that SDL_GL_SwapWindows is only updating the screen intermittently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |