summaryrefslogtreecommitdiff
path: root/src/video/sdl2_opengl_v.cpp
AgeCommit message (Collapse)Author
2021-04-25Fix: [OpenGL] Main loop expects to start with the video buffer unmapped. (#9100)Michael Lutz
2021-04-21Fix: [OpenGL] Check maximum supported texture size against screen resolution.Michael Lutz
2021-04-11Fix: Check for a validly mapped OpenGL screen buffer during driver init. (#9007)Michael Lutz
2021-04-11Feature: allow a toggle to enable/disable vsyncPatric Stout
Vsync should be off by default, as for most players it will be better to play without vsync. Exception exist, mainly people who play in fullscreen mode.
2021-04-10Fix: Data races on cursor state in OpenGL backendsJonathan G Rennison
2021-03-20Fix #8871: [OpenGL] Initialize all buffers after resize and clear back ↵Michael Lutz
buffer. (#8877)
2021-03-08Add: [Video] move GameLoop into its own threadPatric Stout
This allows drawing to happen while the GameLoop is doing an iteration too. Sadly, not much drawing currently can be done while the GameLoop is running, as for example PollEvent() or UpdateWindows() can influence the game-state. As such, they first need to acquire a lock on the game-state before they can be called. Currently, the main advantage is the time spend in Paint(), which for non-OpenGL drivers can be a few milliseconds. For OpenGL this is more like 0.05 milliseconds; in these instances this change doesn't add any benefits for now. This is an alternative to the former "draw-thread", which moved the drawing in a thread for some OSes. It has similar performance gain as this does, although this implementation allows for more finer control over what suffers when the GameLoop takes too long: drawing or the next GameLoop. For now they both suffer equally.
2021-03-08Remove: [Video] no longer draw in a threadPatric Stout
Drawing in a thread is a bit odd, and often leads to surprising issues. For example, OpenGL would only allow it if you move the full context to the thread. Which is not always easily done on all OSes. In general, the advise is to handle system events and drawing from the main thread, and do everything else in other threads. So, let's be more like other games. Additionally, putting the drawing routine in a thread was only done for a few targets. Upcoming commit will move the GameLoop in a thread, which will work for all targets.
2021-02-27Fix: [SDL2] set GL attributes to get the best GL context possible (#8759)Patric Stout
2021-02-22Codechange: [SDL2] Split driver in base-part and default backendMichael Lutz
2021-02-22Feature: [SDL2] OpenGL supportPatric Stout