Louis Gombert
7b123e9d3a
Default resolution choices: use display resolutions if possible
2025-02-25 23:09:16 +01:00
Louis Gombert
7fc46266fe
Enable gamma correction setting on POSIX
2025-02-17 22:45:04 +01:00
Louis Gombert
3be0be5e86
Gamma correction: do it in GLSL directly
...
Gamma Correction function hhas been removed in SDL3, so do it in shader code instead. This is a better solution because it allows to perform this correction only on the game window, which was not the case for the SDL function.
2025-02-17 22:45:04 +01:00
Louis Gombert
34cc9799c2
Fix mouse grab behavior
2025-02-17 22:45:04 +01:00
Louis Gombert
f71236e70f
Scale window using SDL_GetDisplayContentScale
...
Using high-DPI support with a scale factor would not scale the game window. We now take the scaling factor into account, so that the Descent3 game window is bigger if the user chooses a bigger scale factor. Also use the SDL_WINDOWPOS_UNDEFINED_DISPAY with display id, fixing the '-display' argument.
Read more here: https://wiki.libsdl.org/SDL3/README/highdpi
2025-02-17 22:45:04 +01:00
Louis Gombert
39ce5eac9e
Add missing SDL_free on structs allocated by SDL3
2025-02-17 22:45:04 +01:00
Louis Gombert
25d494595e
Fix fullscreen window initialization
2025-02-17 22:45:04 +01:00
Louis Gombert
0cb34f5f6a
Remove relative import
2025-02-17 22:36:30 +01:00
Louis Gombert
cb379d7d20
Define SDL_FUNCTION_POINTER_IS_VOID_POINTER
2025-02-17 22:36:30 +01:00
Louis Gombert
656d81d39a
SDL3: Update openGL/Window functions
2025-02-17 22:36:30 +01:00
Louis Gombert
2f8719585c
Fix event filter callbacks, and MouseMode callback
2025-02-17 22:36:30 +01:00
Louis Gombert
930678447f
SDL3: Remove Gamma Ramp usage
...
SDL_SetWindowGammaRamp was removed in SDL3 due to poor support in modern OS
2025-02-17 22:36:30 +01:00
Louis Gombert
3a1878c0f7
SDL3: run rename_headers.py script from migration guide
2025-02-17 22:36:30 +01:00
Louis Gombert
780b88f673
SDL3: run rename_symbols.py script from migration guide
2025-02-17 22:36:22 +01:00
Sebastian Holtermann
0e2ef804dd
Add new command line option: -display
...
The new command line option -display lets the user select the display on
which Descent 3 should be displayed.
This is useful in multi-monitor setups where the game now can be run on any of
the given monitors.
2024-12-17 20:47:04 +01:00
Sebastian Holtermann
19c7611ce5
renderer/HardwareOpenGL: Use mem_rmalloc instead of mem_malloc
2024-10-19 23:23:19 +02:00
Sebastian Holtermann
2c7a0e98a8
renderer/HardwareOpenGL: Fix compiler warnings
2024-10-19 23:15:35 +02:00
Azamat H. Hackimov
2a63a8b6aa
Fix memory leak from unpaired SDL_GL_LoadLibrary()
2024-09-29 19:34:23 +03:00
Jan Engelhardt
de0af3b10d
mem_malloc type triviality checks (6/8)
...
```
git grep -l mem_malloc | xargs perl -i -lpe 's{\((uint8_t) \*\)mem_malloc\((\S+)\)}{mem_rmalloc<$1>($2)}'
```
2024-09-16 22:12:13 +02:00
Azamat H. Hackimov
d8de33eb35
Convert renderer to use new logging facility
2024-09-10 03:00:25 +03:00
Azamat H. Hackimov
30f8fefa0b
Cleanup sdlmain.cpp
...
Remove unused global variables, rewrite internal functions, remove `-game_checksum` cmdline option.
2024-09-10 03:00:25 +03:00
Louis Gombert
2db85ca6ec
Merge pull request #545 from tophyr/pr/improve-render-perf
...
Improve Renderer Performance
2024-08-27 23:19:55 +02:00
Chris Sarbora
be59b88b26
Improve Renderer Performance
...
Use orphaned "buffer update streaming" to eliminate synchronization
delays, due to CPU->GPU latency, causing framerate slowdowns. This sends
vertex data to the GPU via partial updates to a buffer and reallocates
the buffer once it fills up, ensuring that no synchronization is ever
needed. The buffer is sized to balance memory usage vs allocation rate,
and the GL driver ensures that "orphaned" buffers are only destroyed
when all GL commands using them are retired.
2024-08-24 17:19:27 -05:00
Azamat H. Hackimov
4aa17f36d4
Minor cleanups to HardwareOpenGL.cpp
2024-08-21 15:29:05 +03:00
Azamat H. Hackimov
1de5da7777
Remove external symbols from GL renderer
...
Remove unused linux_permit_gamma variable. Remove d3SDLEventFilter() as it initialized earlier.
2024-08-21 14:52:58 +03:00
Azamat H. Hackimov
39e971504e
DDIO: implement mouse grab state functions
...
Hide global variable ddio_mouseGrabbed.
2024-08-21 12:29:28 +03:00
Chris Sarbora
46043e709d
use GL_RGBA8 instead of invalid GL_RGB
2024-08-18 03:26:07 -05:00
Chris Sarbora
38100b8ed1
use GL_CLAMP_TO_EDGE instead of deprecated GL_CLAMP
2024-08-18 03:26:07 -05:00
Chris Sarbora
77fb0cd1ab
use GL_TRIANGLE_FAN instead of nonexistent GL_POLYGONS
2024-08-18 03:26:06 -05:00
Chris Sarbora
a06e78074f
remove EXT and ARB suffixes
2024-08-18 03:26:06 -05:00
Chris Sarbora
791cdcb308
eliminate hints to things the shader does now
2024-08-18 03:26:06 -05:00
Chris Sarbora
256898dfc6
Move fog into shader
2024-08-18 03:26:06 -05:00
Chris Sarbora
625b2fc1a1
update vertices modernly
2024-08-18 03:26:06 -05:00
Chris Sarbora
0dd203e2c0
create, track, and clean up texture ids responsibly
2024-08-18 03:26:06 -05:00
Chris Sarbora
a5081982f6
Always use Multitexture
2024-08-18 03:26:06 -05:00
Chris Sarbora
d25bf5e4e1
set up texture enabling
...
eliminate gl(Enable|Disable)ClientState and glClientActiveTextureARB
2024-08-18 03:26:06 -05:00
Chris Sarbora
5b4703bf5f
pipe color and texcoords thru the shaders
2024-08-18 03:26:06 -05:00
Chris Sarbora
16df2d764a
Set up transformations in vertex shader
2024-08-18 03:26:03 -05:00
Chris Sarbora
d61deae68d
add rudimentary shaders and machinery
2024-08-18 02:52:46 -05:00
Chris Sarbora
bc99cc867b
use opengl 3.2
2024-08-18 02:52:46 -05:00
Chris Sarbora
9950c80e64
eliminate glBegin usage
2024-08-18 02:49:07 -05:00
Chris Sarbora
f8043c1390
extract DetermineColor logic
2024-08-18 02:49:07 -05:00
Chris Sarbora
18ccdf5a81
glShadeModel calls are redundant with default setting, rend_SetLightingState is redundant with rend_SetLighting
2024-08-18 02:49:07 -05:00
Chris Sarbora
8d94450b7a
dglAlphaFunc(GL_GREATER, 0) is perfectly redundant
2024-08-18 02:49:07 -05:00
Chris Sarbora
e152b5df70
setting depth range to [0, 1] is superfluous
2024-08-18 02:49:07 -05:00
Chris Sarbora
fb2dbe8c92
Delete empty method
2024-08-18 02:49:07 -05:00
Chris Sarbora
8d26df7b25
Delete written-only fields
2024-08-18 02:49:07 -05:00
Chris Sarbora
201d4add62
Make dyna_gl definitions easier and own all fn lookups
2024-08-18 02:49:06 -05:00
Chris Sarbora
bd06bf5288
rename ogl* to dgl*
2024-08-18 02:49:06 -05:00
Louis Gombert
1328a8c846
Remove non-functional OpenGL logging methods
2024-07-28 17:52:01 +02:00