Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
1 year ago
PeterN
d086f288cd
Codechange: Remove duplicated includes. ( #10888 )
...
These are now included by stdafx.h so don't need to be included again.
1 year ago
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Tyler Trahan
066ae6f3fb
Codechange: Simplify some CodeQL-flagged trivial switches
2 years ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2 years ago
Patric Stout
1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" ( #10306 )
...
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2 years ago
PeterN
4031894aef
Cleanup: Remove svn-style `$Id$` comments. ( #10122 )
2 years ago
Niels Martin Hansen
345dcd3c7b
Add: Show current video driver info in Options window
2 years ago
Michael Lutz
883e21dbb7
Codechange: [OSX] We use OpenGL even if Apple doesn't like it.
3 years ago
Rubidium
357af686dc
Cleanup: use true/false instead of 1/0 where applicable
3 years ago
Rubidium
f904aef176
Cleanup: use nullptr instead of 0 or NULL
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
Michael Lutz
97722931a9
Fix: [OpenGL] Increase timeout when waiting for the GPU to be done with the drawing buffer.
...
The old timeout could be too short if v-sync was on on lower refresh rates.
3 years ago
Michael Lutz
f4d5c8d99e
Fix: [OpenGL] Main loop expects to start with the video buffer unmapped. ( #9100 )
3 years ago
Michael Lutz
d1dd997f07
Change: [Win32] Limit the OpenGL video driver to OpenGL 3.2 or newer on Windows.
3 years ago
Michael Lutz
e53313391a
Fix: [OpenGL] Check maximum supported texture size against screen resolution.
3 years ago
Michael Lutz
433602b072
Fix #9028 : [OpenGL] Clear cursor cache on destroying the OpenGL backend.
4 years ago
Jonathan G Rennison
39b7ef31f8
Fix: Data races on cursor state in OpenGL backends
4 years ago
Jonathan G Rennison
fbd0a2e65a
Fix: Thread unsafe use of sprite cache in OpenGLBackend::DrawMouseCursor
...
See also: #8870
See also: #8977
4 years ago
Milek7
7a886cb4d4
Change: Do not disallow persistent buffer mapping on AMD GPUs, as it is actually faster.
4 years ago
Michael Lutz
df958dc907
Fix f0f96e31: [OpenGL] Broken window resizing due to invalid buffer pitch on texture creation.
4 years ago
frosch
0230624359
Fix f0f96e31: [OpenGL] warning: comparison of integer expressions of different signedness. ( #8881 )
4 years ago
Michael Lutz
f0f96e3103
Fix #8871 : [OpenGL] Initialize all buffers after resize and clear back buffer. ( #8877 )
4 years ago
Michael Lutz
436cdf1fc8
Fix #8825 : [OpenGL] Don't clear cursor cache from the game loop thread.
4 years ago
Patric Stout
e56d2c63c3
Add: [Video] move GameLoop into its own thread
...
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.
4 years ago
Michael Lutz
d79398a1d5
Fix #8763 : [OpenGL] Cursor sprite origin can be negative.
4 years ago
Michael Lutz
77854d561b
Fix: [OpenGL] Don't use OpenGL on MESA software renderers.
...
Performance in this case is worse than not using OpenGL, so just let
OTTD fall back to a different video driver.
4 years ago
frosch
dfa141818b
Fix: OpenGL cursor did not consider sprite offsets of cursor sprites.
4 years ago
Michael Lutz
311df31fb1
Codechange: [OpenGL] Load all OpenGL functions dynamically.
4 years ago
Michael Lutz
a0c1a3f736
Codechange: [OpenGL] Simplify loading OpenGL extension functions.
4 years ago
Michael Lutz
e1e8cc3851
Fix #8734 : [OpenGL] Apply palette remap to cursor sprites. ( #8742 )
4 years ago
Michael Lutz
b4a3bc1ffe
Codechange: [OpenGL] Separate context state setup from general init.
4 years ago
Michael Lutz
86c309ea75
Codechange: [OpenGL] Let OpenGL clear the pixel buffer if possible.
4 years ago
Michael Lutz
ae7c63cc35
Codechange: [OpenGL] Use persistently mapped pixel buffers when supported.
4 years ago
Michael Lutz
200be7d20c
Add: [OpenGL] Support for a separate animation buffer that stores the palette values of the screen in addition to the colour buffer.
4 years ago
Michael Lutz
6bcc4884c2
Add: [OpenGL] Accelerated mouse cursor drawing.
4 years ago
Michael Lutz
bcd15b4dd2
Codechange: [OpenGL] Initialize backing store to opaque alpha to allow blending effects.
4 years ago
Michael Lutz
e8fc050b6e
Add: [OpenGL] Support for 8bpp blitters.
4 years ago
Michael Lutz
320072c8dc
Codechange: [OpenGL] Explicitly assign which framebuffer target receives the colour values.
4 years ago
Michael Lutz
821f30f735
Codechange: [OpenGL] Use GLSL version 1.50 if available.
4 years ago
Michael Lutz
90fd8f8cda
Codechange: [OpenGL] Use generic vertex attributes in the shader program.
4 years ago
Michael Lutz
acf59f6b68
Codechange: [OpenGL] Use shaders to display the video buffer on screen.
4 years ago
Michael Lutz
9a069faa01
Codechange: [Win32] Try to get an OpenGL 3.2+ context if possible.
4 years ago
Michael Lutz
a990c497b5
Codechange: [OpenGL] Use a pixel buffer object to store the video buffer.
4 years ago
Michael Lutz
5af0cfd902
Codechange: [OpenGL] Use a vertex array object to store the vertex state for the video buffer.
4 years ago
Michael Lutz
acf2ce35f7
Codechange: [OpenGL] Use a vertex buffer object to store the vertex data for the video buffer.
4 years ago
Michael Lutz
5ad545dcc1
Codechange: [OpenGL] Only update the dirty parts of the video buffer texture.
4 years ago
Michael Lutz
3a77ade6b2
Codechange: [OpenGL] Enable driver debug messages if supported.
4 years ago
Michael Lutz
d7b96a424f
Codechange: [OpenGL] Use new-style extension testing introduced with OpenGL 3.0.
4 years ago