Sergey Degtyar
e87f307ac1
engine: image: fix blue halo around sprays
2026-04-10 15:00:02 +05:00
Alibek Omarov
5f765a35b9
ref: gl: show more detailed Host_Error instead of ASSERT in R_GetTexture
2026-04-04 17:36:05 +05:00
Alibek Omarov
00dac928c9
ref: replace checking PARM_QUAKE_COMPATIBLE with direct check of feature flag set
2026-04-02 02:13:27 +05:00
Alibek Omarov
00ad05c92a
ref: gl: move showtextures implementation to gl_image.c
2026-03-17 00:19:27 +05:00
Alibek Omarov
4722ad6be6
ref: replace COM_CheckString and COM_CheckStringEmpty by COM_StringEmptyOrNULL and COM_StringEmpty
2026-02-21 01:20:34 +05:00
ncuxonaT
e39f8bf7c4
ref: gl: always use RGTC internal format for ATI2 textures
...
AMD убрала в новых драйверах поддержку расширения GL_ATI_texture_compression_3dc, из-за чего сломалась загрузка ATI2 текстур. Формат RGTC включен в стандарт OpenGL 3.0, а единственные видеокарты с поддержкой 3DC, но без RGTC - это серия Radeon X1000 (2005г.). Можно было бы только ради Х1000 проверять поддерживаемые расширения и переключаться на 3DC, но без явной необходимости этого делать не хочется.
2026-01-03 08:17:09 +05:00
Alibek Omarov
66ea91270b
engine: make Image_ComputeSize shared between renderer and imagelib
2025-12-14 00:00:59 +05:00
Alibek Omarov
44fb4fb594
engine: common: imagelib: remove dependency on OpenGL declarations in texture formats
2025-12-13 23:59:40 +05:00
ncuxonaT
bbe659ebfa
ref: gl: fix loading texture arrays
2025-11-30 18:33:57 +05:00
ncuxonaT
2736d1fd03
dds volume texture fix - gl_image.c
2025-11-27 23:17:18 +08:00
Alibek Omarov
d039a08b4e
ref: gl: fix up data types. Engine TMU type is int, rather than GLint, and texture indices are technically unsigned int only (and they aren't GLenum)
2025-09-06 01:57:36 +05:00
Alibek Omarov
699e178f62
ref: gl: remove excessive ASSERT macro, use Assert everywhere
2025-09-06 00:41:48 +05:00
Alibek Omarov
66bdca63ee
ref: gl: upload skybox texture object with >= 5800 name only with GL compatibility context, it's not needed on GLES
2025-03-17 08:32:06 +03:00
Alibek Omarov
6aeedf201c
ref: gl: update dlight texture in case if BLOCK_SIZE changes between maps (going from QBSP to BSP2 or toggling r_large_lightmaps cvar)
2025-03-15 19:23:49 +03:00
Alibek Omarov
c9f8bdfcb0
ref: gl: allow updating texture with NULL data by calling TexImage instead of TexSubImage
2025-03-15 19:20:36 +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
420c5a4ff3
ref: gl: set numeric value for wrappers macros, similar to build.h macros
2024-10-09 02:01:10 +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
d56e53a347
Replace hardcoded functions names by __func__ macro
...
* while we're here, fix some possible bugs
* and fix -Wformat=2
s/__FUNCTION__/__func__/g
awawawa
2024-06-19 06:53:42 +03:00
Alibek Omarov
260edc2a08
ref: gl: try to match texture slot and texture object handle because of buggy games
2024-06-15 19:21:26 +03:00
Alibek Omarov
4e2708c1ac
engine: bring back texture replacement
2024-06-11 06:16:26 +03:00
SNMetamorph
17e106f96d
ref: gl: invalidate texture units state cache when texture deletes
2024-03-09 22:12:35 +03:00
mittorn
373321ff00
ref/gl: do not set type on 1D textures on GLES (will fallback to 2D)
2024-02-26 16:08:37 +03:00
Alibek Omarov
725b7ea7f9
common: render_api: rename TF_ALLOW_NEAREST_TOGGLE to just TF_ALLOW_NEAREST, it's just shorter
2024-01-29 05:59:06 +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
ab15662d78
ref: gl: fix toggling nearest filter on TF_NOMIPMAP textures
2024-01-29 05:48:08 +03:00
Alibek Omarov
072b0cef27
ref: gl: small refactoring on filter choosing for newly uploaded texture
2024-01-29 05:47:10 +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
661e60720d
ref: gl: fix -Wmissing-prototypes
2024-01-28 09:55:18 +03:00
Alibek Omarov
9c66e86be1
engine, ref: RefAPI 5. Remove unused calls
2023-12-06 04:13:03 +03:00
Alibek Omarov
a6af32dafd
ref: gl: connect ripply water to others parts of renderer (init, reset, animation and rendering)
2023-10-31 21:52:00 +03:00
Alibek Omarov
b76a75d6b4
ref: gl: respect gl_texture_nearest value for skyboxes
2023-10-20 18:55:22 +03:00
Ivan Avdeev
a251600c8a
engine: common: imagelib: add KTX2 support ( #1455 )
...
* engine: common: imagelib: add KTX2 support
Adds basic KTX2 support for a few compressed formats. KTX2 essentially
is a Vulkan-centric texture format that supports literally hundreds of
pixel formats.
For now only support for these is added:
- `VK_FORMAT_BC4_UNORM_BLOCK`
- `VK_FORMAT_BC4_SNORM_BLOCK`
- `VK_FORMAT_BC5_UNORM_BLOCK`
- `VK_FORMAT_BC5_SNORM_BLOCK`
- `VK_FORMAT_BC6H_UFLOAT_BLOCK`
- `VK_FORMAT_BC6H_SFLOAT_BLOCK`
- `VK_FORMAT_BC7_UNORM_BLOCK`
- `VK_FORMAT_BC7_SRGB_BLOCK`
Adding more formats is relatively straightforward:
- Copy format definition from `VkFormat` enum in `vulkan_core.h`
- Add a new definition into `pixformat_t` enum.
- Add format size calculation into `Image_ComputeSize()`
While we're at it, also adds a few new formats to DDS:
- BC4_UNORM -- PF_BC4_UNSIGNED
- BC4_SNORM -- PF_BC4_SIGNED
- BC5_UNORM -- PF_BC5_UNSIGNED
- BC5_SNORM -- PF_BC5_SIGNED
- BC7 is expanded into BC7_UNORM and BC7_SRGB
ref_gl and ref_soft code is updated where it made sense. But not tested
really. Support for these formats has been tested with ref_vk.
* address spaces-vs-parentheses formatting where noticed
* parenthesize sizeofs
* move ktx2.h to imagelib as img_ktx2.h; massage it a bit
* use SetBits() instead of |=
* remove stale TODO comments
2023-10-18 10:31:40 +03:00
mittorn
a2b992d865
ref_gl: fix codestyle
2023-10-16 06:47:55 +03:00
mittorn
eb23b226cc
Workaround core context issues
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
Alibek Omarov
a738b2a50b
ref: restore missing PARM_TEX_MEMORY RenderAPI parameter
2023-10-06 19:24:02 +03:00
Alibek Omarov
22f60d50ac
ref: gl: only enable/disable texture units in fixed-function pipeline rendering, in our case, low TMUs
2023-08-21 10:01:59 +03:00
Alibek Omarov
3a57f26351
ref: gl: move ref_gl cvars to static allocation
2023-05-27 21:52:58 +03:00
Alibek Omarov
1d965d7543
ref: gl: ignore GenTextures objects that fall into reserved space for skyboxes
2023-05-19 04:37:53 +03:00
Alibek Omarov
68ff265e8d
ref: gl: switch texture object allocation to GenTextures usage
...
This should fix most overlay programs but I only tested it on MangoHud
2023-05-16 23:47:05 +03:00
Alibek Omarov
a3ab04e0cb
ref: gl: track current bound texture index in gl_textures array in separate glState field
2023-05-16 23:44:52 +03:00
Alibek Omarov
8b96e7ca87
ref: add size argument to COM_FileBase calls
2023-04-26 05:20:45 +03:00
Alibek Omarov
79624fa400
ref: gl: cleanup unused functions
2023-04-03 05:09:33 +03:00
Andrey Akhmichin
7555fefc18
ref: gl: simplify strings operations.
2022-12-20 16:11:21 +03:00
Alibek Omarov
61c142e2db
ref: move renderers into ref subdirectory
2022-09-10 22:52:52 +03:00