Alibek Omarov
b5cb0b9f10
ref: gl: add r_dlight_virtual_radius. It potentially fixes ugly dlight cut off on largely scaled textures (or at least allows to tune it)
...
It also adds a fix found in JoeQuake (which traces back to FitzQuake, in which
it is attributed to LadyHavoc, Darkplaces author) to exactly calculate whether
the light hits the surface, so we don't wrongly enable lighting on a surface by
an increased radius.
2025-02-07 23:07:08 +03:00
Alibek Omarov
a955d1e957
ref: gl: make GL_BuildPolygonFromSurface static, remove one global variable usage (which is unused anyway)
2025-02-07 22:55:38 +03:00
Alibek Omarov
3ebcb08a97
ref: gl: add cvar r_large_lightmaps to enable larger lightmap sizes, opt-in, yields better performance with VBO renderer
2025-02-05 13:02:37 +03:00
Alibek Omarov
77abf621d7
ref: gl: make GL_Support and GL_MaxTextureUnits functions inlined
2025-01-30 19:02:53 +03:00
Alibek Omarov
0e27d8717c
ref: remove servercount from texture struct, Xash don't use it (and it's also harmful anyway)
2025-01-21 14:36:42 +03:00
Alibek Omarov
c906aa0106
ref: gl: make DrawGLPoly and R_TextureAnimation private to brush rendering code
2025-01-18 08:39:31 +03:00
Alibek Omarov
0a41b70e44
ref: gl: store ripple texture in texture's fb_texturenum as it's only used for water and water don't have luma
2025-01-18 08:38:43 +03:00
Alibek Omarov
c6e3146290
ref: gl: fix broken water texture when it was discarded by R_UploadRipples
2024-12-26 03:49:12 +03:00
Alibek Omarov
4d1119391a
ref: gl: get rid of NULL sentinels at the end of arrays
2024-12-22 07:11:28 +03:00
SNMetamorph
9244bdc7db
ref: gl: added gl_fog cvar for better GoldSrc compatibility
2024-11-21 23:11:53 +03:00
Alibek Omarov
d15949d2e8
Rename _format to FORMAT_CHECK
2024-11-07 14:24:07 +03:00
Alibek Omarov
4d003bc13f
ref: remove Mod_LoadMapSprite from RefAPI
2024-11-03 02:59:44 +03:00
Alibek Omarov
6cd2dbf178
engine: remove R_DrawTileClear from RefAPI
2024-11-03 02:21:38 +03:00
Alibek Omarov
6153d7f168
engine: make CL_RunLightStyles accept lightstyles array pointer as an argument. Make necessary changes in renderers.
2024-11-03 01:20:30 +03:00
Alibek Omarov
bb4e64ea58
ref: gl: migrate to new way to get lightstyles and dlights
2024-11-03 01:20:30 +03:00
Alibek Omarov
8af995cc28
engine: introduce REF_GET_*_PTR for gamma tables
2024-11-03 01:20:30 +03:00
Alibek Omarov
eb72b6baee
ref: gl: fix r_shadows and gl_vbo registration order. It must be registered before reading renderer config
2024-10-28 02:10:24 +03:00
Alibek Omarov
f5ae806b31
ref: gl: add r_showtextures implementation by ncuxonaT
...
Main changes made by me besides engine differences:
* Text color changed to pure white for better readability
* An attempt to draw texture name in full size
2024-10-08 12:56:07 +03:00
Alibek Omarov
0c8b2d007a
ref: gl: set malloc like attribute for imported zone memory allocator functions
2024-09-30 04:00:28 +03:00
Alibek Omarov
55c1bddac5
ref: gl: implement generating VBO only when gl_vbo was set to 1
...
* Make it safer by creating a function that returns VBO state, was it
generated or enabled by user
2024-09-05 04:10:56 +03:00
Alibek Omarov
9a432a5a13
common: rewrite cvardef.h from scratch based on Quake definitions
...
* unify cvar.h and cvardef.h, enable private definitions only for refdll and engine
* add FCVAR_REFDLL for easier RefDll cvars cleanup
2024-08-21 12:18:06 +03:00
Alibek Omarov
677464d04d
ref: rename glpoly_t to glpoly2_t to make the changes more obvious and easier to notice
2024-08-10 13:46:00 +03:00
Alibek Omarov
2785376bd3
ref: remove unused function declarations
2024-08-03 09:14:56 +03:00
Alibek Omarov
4e2708c1ac
engine: bring back texture replacement
2024-06-11 06:16:26 +03:00
Alibek Omarov
9577a6af21
ref: moved VGUI support API implementation to the engine
2024-06-11 02:07:49 +03:00
Alibek Omarov
30fe471d2b
ref: move loading skybox into the engine
2024-06-11 02:07:44 +03:00
Alibek Omarov
5ab6979633
ref: move common quake sky cloud loading to the engine
2024-06-10 22:47:39 +03:00
mittorn
6c77608c34
ref_gl: implement color-modulate overbrigths with gl_vbo using texture GL_COMBINE
2024-02-22 21:02:34 +03:00
Alibek Omarov
600d574376
ref: gl: make use of new TF_ALLOW_NEAREST_TOGGLE flag
2024-01-29 05:50:59 +03:00
Alibek Omarov
e274c62cfc
ref: gl: use TextureFilteringEnabled to decide whether texture will have nearest filtering or linear
2024-01-29 05:44:14 +03:00
Alibek Omarov
5696c9c96a
ref: gl: remove useless R_CountDynamicLights function
2024-01-27 17:15:57 +03:00
Alibek Omarov
18436a70eb
ref: gl: support overbrights, change the gamma applying order closer to the original renderer
2024-01-09 03:55:00 +03:00
Alibek Omarov
8298053e6a
ref: gl: don't depend on lightgamma in recursive light point
2024-01-09 03:33:39 +03:00
Alibek Omarov
64f92003fa
ref: gl: adapt studio lightning to new gamma
...
* more accurate SHADE_LAMBERT value (extracted from v_lambert1 global variable)
2024-01-09 03:33:39 +03:00
Alibek Omarov
a0c31120d9
ref: add R_GammaChanged function that engine calls on every gamma change
2024-01-07 03:35:23 +03:00
Alibek Omarov
dc1d65f621
ref: gl: only draw MOVETYPE_FOLLOW studio model if it's parent is visible
2024-01-04 22:02:09 +03:00
Alibek Omarov
b946c8455d
ref: gl: return NULL in GetEntityByIndex and ModelHandle just in case
2024-01-04 21:46:44 +03:00
Alibek Omarov
0132eb6e44
ref: gl: restore usage of FWORLD_CUSTOM_SKYBOX flag, do direct checks instead of PARM check, remove unused tr.fCustomSkybox
2023-12-30 16:55:31 +03:00
Alibek Omarov
537237ef62
ref: gl: remove usage of PARM_VIEWENT_INDEX and PARM_PLAYER_INDEX
2023-12-30 16:36:13 +03:00
Alibek Omarov
6a4bf4965f
ref: gl: acquire engine pointers
2023-12-30 16:36:13 +03:00
mittorn
eff033298a
ref_gl: disable singlepass detail renderer, use correct fog color multipliers in VBO
2023-12-19 17:55:10 +03:00
Alibek Omarov
9c66e86be1
engine, ref: RefAPI 5. Remove unused calls
2023-12-06 04:13:03 +03:00
Alibek Omarov
7e9f87de2d
engine, ref: eliminate calls to global arrays, instead store array pointers at renderer side
2023-12-06 04:13:03 +03:00
Alibek Omarov
08dbfc45d3
ref: gl: refactor getting edge position, texture and lightmap coords
2023-12-02 18:02:18 +03:00
Alibek Omarov
d6dfb83be7
ref: gl: ripply water implementation (bugfixed version from my Quake-2 patches)
2023-10-31 21:52:00 +03:00
Alibek Omarov
30d1492b93
engine: remove Set/GetCurrentLoadingModel from RefAPI
2023-10-28 15:22:21 +03:00
mittorn
d254bac16b
ref_gl: integrate gl2shim extensions
2023-10-16 06:47:55 +03:00
mittorn
2f321b1471
ref_gl: implement minimum inclusion version for GL extensions, implement quering extensions on core profile
2023-10-16 06:47:55 +03:00
mittorn
676526a518
ref_gl: fix creating core context, support core in gl2shim by creating dumb array object
2023-10-16 06:47:55 +03:00
mittorn
7e0bd86b65
ref_gl: allow enabling XASH_GLES without wrapper, add ref_gles3compat, wrap gles functions in gl2wrap when XASH_GLES enabled
2023-10-16 06:47:55 +03:00