Michael Lutz
c656633bea
Fix #8775 : [Win32] Don't create the main window when alt-tabbing back into fullscreen.
2021-03-01 23:41:39 +01:00
Michael Lutz
b7a44983b4
Fix: [Win32] Original window size was lost when tabbing in and out of fullscreen.
2021-03-01 23:41:39 +01:00
Patric Stout
abac4b1758
Fix c4df0f95: bootstrap was only showing a black screen ( #8788 )
...
The bootstrap has the _switch_mode to SM_MENU, and never leaves
this mode. Neither is it considered a modal window (while in some
sense it really is). So .. we need to add another "draw anyway"
exception, to make sure bootstrap is being drawn.
2021-03-01 23:17:30 +01:00
Owen Rudge
838fd61f29
Fix: [OSX] Hide dock when entering fullscreen
2021-03-01 21:03:18 +00:00
Patric Stout
f183ded9fe
Add: settings to limit your fast-forward game speed
...
By default this setting is set to 2500% normal game speed.
(cherry picked from commit c3dc27e37e )
# Conflicts:
# src/gfx.cpp
# src/gfx_func.h
# src/settings_type.h
# src/video/cocoa/cocoa_v.mm
# src/video/video_driver.cpp
# src/video/win32_v.cpp
2021-03-01 17:54:15 +00:00
Patric Stout
535fdb5c89
Codechange: remove _realtime_tick variable
...
(cherry picked from commit fe451b8dc7 )
# Conflicts:
# src/debug.cpp
# src/debug.h
# src/video/video_driver.cpp
2021-03-01 17:54:15 +00:00
Patric Stout
c3dc27e37e
Add: settings to limit your fast-forward game speed
...
By default this setting is set to 2500% normal game speed.
2021-02-28 18:04:51 +00:00
Michael Lutz
d79398a1d5
Fix #8763 : [OpenGL] Cursor sprite origin can be negative.
2021-02-28 11:12:13 +01:00
Jonathan G Rennison
d58989f552
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/english_US.txt
2021-02-27 18:38:02 +00:00
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.
2021-02-27 19:01:34 +01:00
Patric Stout
1b5d1d074e
Fix: [SDL2] set GL attributes to get the best GL context possible ( #8759 )
2021-02-27 18:51:20 +01:00
frosch
dfa141818b
Fix: OpenGL cursor did not consider sprite offsets of cursor sprites.
2021-02-27 14:52:11 +01:00
Patric Stout
fe451b8dc7
Codechange: remove _realtime_tick variable
2021-02-27 00:36:14 +01:00
Michael Lutz
311df31fb1
Codechange: [OpenGL] Load all OpenGL functions dynamically.
2021-02-25 00:34:49 +01:00
Michael Lutz
a0c1a3f736
Codechange: [OpenGL] Simplify loading OpenGL extension functions.
2021-02-25 00:34:49 +01:00
Michael Lutz
e1e8cc3851
Fix #8734 : [OpenGL] Apply palette remap to cursor sprites. ( #8742 )
2021-02-24 22:10:25 +01:00
Patric Stout
6a8c461e38
Codechange: [OSX] GameLoop is really more like MainLoop
...
MainLoop() is used to bootstrap OSX, where later a callback is
done to GameLoop() to execute OpenTTD. All other video drivers
don't need that, so what is in GameLoop is in MainLoop for all
other drivers. This is rather confusing. So, instead, name
GameLoop MainLoopReal to be more in sync with the other drivers.
2021-02-24 21:58:47 +01:00
Patric Stout
67d3c6aa71
Codechange: [Video] move InteractiveRandom() to the VideoDriver
2021-02-24 21:58:47 +01:00
Patric Stout
c409f45ddd
Codechange: [Video] make the prototype of PollEvent() the same for all drivers
...
Additionally, call it from the draw-tick.
2021-02-24 21:58:47 +01:00
Niels Martin Hansen
b427ddce88
Codechange: Switch to explicit wide strings
2021-02-23 11:25:39 +01:00
Niels Martin Hansen
beeb9e0a1b
Remove: [Win32] Last pretenses of being able to build for Windows 95
2021-02-23 11:25:39 +01:00
Michael Lutz
06ca147a82
Fix 8706c36f: Change RELEASE code, too.
2021-02-22 23:16:46 +01:00
Michael Lutz
af4d32357c
Codechange: [Win32] Move common initialization and finalization to the video driver base class.
2021-02-22 22:16:07 +01:00
Michael Lutz
7af1fd3ffb
Add: [OSX] OpenGL video driver.
2021-02-22 22:16:07 +01:00
Michael Lutz
78b8fc3e4f
Codechange: [Win32] Move GDI-specific variables and related functions into the GDI video driver class.
2021-02-22 22:16:07 +01:00
Michael Lutz
b4a3bc1ffe
Codechange: [OpenGL] Separate context state setup from general init.
2021-02-22 22:16:07 +01:00
Michael Lutz
8b90d4abe0
Codechange: [Win32] Move GDI specific drawing code into the GDI video driver class.
2021-02-22 22:16:07 +01:00
Michael Lutz
7f55f0a264
Codechange: [OSX] Add support for (un)locking the video buffer.
2021-02-22 22:16:07 +01:00
Michael Lutz
59e0d9618b
Codechange: [Win32] Split the video driver into a base class and a GDI backend class.
2021-02-22 22:16:07 +01:00
Michael Lutz
2f25e9bdf8
Codechange: [OSX] Separate video driver into a base and a Quartz implementation.
2021-02-22 22:16:07 +01:00
Michael Lutz
421b599541
Codechange: [SDL2] Split driver in base-part and default backend
2021-02-22 22:16:07 +01:00
Patric Stout
a303940372
Feature: [SDL2] OpenGL support
2021-02-22 22:16:07 +01:00
Michael Lutz
a77b202767
Codechange: [SDL] Move dirty_rect to class scope.
2021-02-22 22:16:07 +01:00
Patric Stout
e75858ce5e
Codechange: [SDL2] Allow several places to hook into the SDL driver
...
This allows future subdrivers to use these to manage their
own flow.
2021-02-22 22:16:07 +01:00
Patric Stout
101e394475
Codechange: [SDL2] Move functions and variables to class-scope
...
This allows future subdrivers to override them.
2021-02-22 22:16:07 +01:00
Patric Stout
0d58bc9384
Codechange: [SDL2] Move SDLSurface code to its own function
...
This increases readability, and allow future subdrivers to not
use SDLSurface to draw.
2021-02-22 22:16:07 +01:00
Patric Stout
6098811b49
Codechange: [SDL2] Split Start() in a few more functions
...
This makes it a bit easier to follow what is going on, and
allow future subdrivers to hook into a few of these functions.
Reworked the code slighly while at it, to return early where
possible.
2021-02-22 22:16:07 +01:00
Michael Lutz
86c309ea75
Codechange: [OpenGL] Let OpenGL clear the pixel buffer if possible.
2021-02-22 22:16:07 +01:00
Michael Lutz
ae7c63cc35
Codechange: [OpenGL] Use persistently mapped pixel buffers when supported.
2021-02-22 22:16:07 +01:00
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.
2021-02-22 22:16:07 +01:00
Michael Lutz
d62e302768
Change: [Win32] Prioritize the OpenGL video driver over the GDI one.
2021-02-22 22:16:07 +01:00
Michael Lutz
6bcc4884c2
Add: [OpenGL] Accelerated mouse cursor drawing.
2021-02-22 22:16:07 +01:00
Michael Lutz
bcd15b4dd2
Codechange: [OpenGL] Initialize backing store to opaque alpha to allow blending effects.
2021-02-22 22:16:07 +01:00
Michael Lutz
3e49aff35c
Codechange: Allow video drivers to handle the cursor themselves.
2021-02-22 22:16:07 +01:00
Michael Lutz
f94b2e73e1
Codechange: [Win32] Use an OpenGL core context instead of a compatibility one.
2021-02-22 22:16:07 +01:00
Michael Lutz
e8fc050b6e
Add: [OpenGL] Support for 8bpp blitters.
2021-02-22 22:16:07 +01:00
Michael Lutz
320072c8dc
Codechange: [OpenGL] Explicitly assign which framebuffer target receives the colour values.
2021-02-22 22:16:07 +01:00
Michael Lutz
821f30f735
Codechange: [OpenGL] Use GLSL version 1.50 if available.
2021-02-22 22:16:07 +01:00
Michael Lutz
90fd8f8cda
Codechange: [OpenGL] Use generic vertex attributes in the shader program.
2021-02-22 22:16:07 +01:00
Michael Lutz
acf59f6b68
Codechange: [OpenGL] Use shaders to display the video buffer on screen.
2021-02-22 22:16:07 +01:00