Commit Graph

50513 Commits (63fda2f16ed50822016368ac35c0e0da2aa2b51a)
 

Author SHA1 Message Date
Michael Lutz d4dbb3f46e Fix: Don't trash video buffer alpha in SSE3/4 blitters. 4 years ago
Michael Lutz bcd15b4dd2 Codechange: [OpenGL] Initialize backing store to opaque alpha to allow blending effects. 4 years ago
Michael Lutz 1e1a9f3999 Add: A simple, templated cache map that uses a least recently used eviction strategy. 4 years ago
Michael Lutz 3e49aff35c Codechange: Allow video drivers to handle the cursor themselves. 4 years ago
Michael Lutz 6776229047 Codechange: Make the simple Malloc sprite allocator globally usable. 4 years ago
Michael Lutz 70aa3b4011 Codechange: Give sprite encoders a hint which colour components of a sprite are filled with useful information. 4 years ago
Michael Lutz e7e5316340 Add: Allow sprite encoders (blitters) to specify an alignment for sprite width and height. 4 years ago
Michael Lutz 02e8741457 Codechange: Allow for using a sprite encoder that is not the currently active blitter when loading a sprite. 4 years ago
Michael Lutz f94b2e73e1 Codechange: [Win32] Use an OpenGL core context instead of a compatibility one. 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 b181859629 Change: [Win32] Disable VSync for OpenGL by default. 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 8706c36fc0 Codechange: [Win32] Move remaing global _wnd variables into the video driver. 4 years ago
Michael Lutz d6b6775888 Change: Lock the video buffer when drawing inside the game loop to properly account for threaded drawing. 4 years ago
Michael Lutz 73ed748deb Codechange: [Win32] Move the global video buffer pointer into the driver class. 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
Michael Lutz ef478ade64 Add: [Win32] Video driver that uses OpenGL to transfer the video buffer to the screen. 4 years ago
Patric Stout 78d96dad2a
Fix #6319: [Win32] don't use clipping; draw whole screen every frame (#8726)
When we clip the region that is only been redrawn, something
weird happens on Windows. When pushing 60 frames per second on a
60Hz monitor, it appears that the clipped region is often shown
of another frame, instead of the current.

Examples of this are:
- pause the game, move your mouse to the left, and at the right
  speed it totally disappears.
- fast aircrafts seem to be in several places at once, weirdly
  lagging behind.
- in title screen, moving your mouse gives you the idea it is
  jumping places, instead of smooth movements.

In the end, if you do nothing, everything is correct, so it is
eventually consistent. Just when we are firing many BitBlt in
a clipped region, the in-between is not.

What goes wrong exactly, I honestly do not know. On every frame
that we push to the DC is a mouse painted, but visually it
sometimes appears like it is not. Recording with external software
shows it really is there.
It is also not our eyes playing tricks on us, as the first example
makes it really clear the mouse pointer really is not painted.

And to be clear, with the mouse this is easiest reproduceable,
as high-speed objects are influences by this most. But this happens
for all movement that redraws small regions.

Either way, not using clipped regions resolves the issue completely,
and there appears to be little to no penalty (I failed to measure
any impact of drawing the full screen). So better have a good game
than fast code, I guess?
4 years ago
translators c136dd2b32 Update: Translations from eints
english (us): 78 changes by 2TallTyler
polish: 1 change by yazalo
4 years ago
Jonathan G Rennison 19b7ecf95a Merge branch 'master' into jgrpp 4 years ago
Charles Pigott 6af49b7885 Fix #8724: Got wrong DepotID/StationID for airports, causing crash 4 years ago
Charles Pigott 80fb1c74f0 Change: Make pathfinder account for maximum order speed, if set 4 years ago
milek7 b749d6f1cb Fix: Allow building with Allegro and without SDL on Linux 4 years ago
Jonathan G Rennison 4f74a83496 Add fast paths for clear/tree snow line checks in tile loop 4 years ago
Jonathan G Rennison 2e20da40ed Cache current value of snow line height 4 years ago
Jonathan G Rennison f595696e97 Add map bit to suppress water flooding checks
Set if all neighbour tiles are also water
This reduces the overhead of flood checks on large maps
4 years ago
Jonathan G Rennison 0df3e785cb Debug: Add console command to dump tile info 4 years ago
Jonathan G Rennison 1c1d272b57 Merge branch 'master' into jgrpp 4 years ago
translators e74069e4c2 Update: Translations from eints
estonian: 19 changes by siimsoni
french: 3 changes by glx22
4 years ago
Charles Pigott 8157af6d68 Fix #8276: Crash when a NewGRF object's size was not set 4 years ago
Charles Pigott 3af407340e Fix #8349: Close depot vehicle list windows when closing the depot window 4 years ago
Patric Stout 88959f5595
Codechange: [OSX] remove final bits of old debugging code (#8714) 4 years ago
Jonathan G Rennison c9ab460a03 Re-apply c0616750
Lost in merge: e95216b5
4 years ago
Jonathan G Rennison 2221805ddd Remove IncreaseRealtimeTick
Not needed as modal progress windows no longer use _realtime_tick
4 years ago
Jonathan G Rennison dfecdf3afb Merge branch 'master' into jgrpp
# Conflicts:
#	src/dock_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/terraform_gui.cpp
#	src/vehicle.cpp
#	src/video/allegro_v.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/dedicated_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
4 years ago
Charles Pigott 1d6a0c7b52 Fix: [YAPF] Road pathfinder did not account for length of tunnel/bridge in path cost
Copy calculations from the rail pathfinder
4 years ago
Charles Pigott c461999b2b Fix #8594: [NRT] Road pathfinder did not account for roadtype speed limits 4 years ago
Patric Stout e1b1608dc6
Fix ec1dd0bf: missing override causing compiler warnings (#8708) 4 years ago
Michael Lutz d16dc22fdf Codechange: Use C++-ism for zeroing. 4 years ago
Michael Lutz 5ca979b1e2 Fix: [OSX] Don't wait on the event loop for drawing. 4 years ago
Michael Lutz f3c192c63d Codechange: [OSX] Only keep a total dirty rect for drawing.
When drawing an 8bpp screen buffer, palette resolving was done for each
dirty rectangle. In areas with high activity, this would mean a pixel might
have been resolved multiple times. Also, if too many individual updates
were queued, the whole screen would be refreshed, even if unnecessary.

All other drivers only keep one overall dirty rect, so do it here as well.
4 years ago