Commit Graph

160 Commits

Author SHA1 Message Date
mittorn 150cbfa4de ref_gl: do not trust REFAPI context version, get it from OpenGL anyway 2023-10-16 06:47:55 +03:00
mittorn c0b068d81b ref_gl: add workarounds for detecting extensions correctly on gles1/gles2 without wrapper (swiftshader works now) 2023-10-16 06:47:55 +03:00
mittorn fbc312b6cf gl2shim: remove float suffix in shaders, that makes glsl100 work in swiftshader 2023-10-16 06:47:55 +03:00
mittorn 342e0d3e2e gl2shim: add glsl100 support 2023-10-16 06:47:55 +03:00
mittorn 202b228691 gl2shim: correct allocation/cleanup 2023-10-16 06:47:55 +03:00
mittorn c9c1286803 ref_gl: fix typo 2023-10-16 06:47:55 +03:00
mittorn eab98b0eda gl2shim: dynamic extension checking and autoconfiguration 2023-10-16 06:47:55 +03:00
mittorn 35be80fc21 ref_gl: request gl1.1 if compatibility profile unavailiable, this fixes launching with GL <= 2.0, improve old version extension detection 2023-10-16 06:47:55 +03:00
mittorn c7dd9d6437 ref_gl: init r_temppool before InitExtensions, fix extension string allocation 2023-10-16 06:47:55 +03:00
mittorn d378878c91 gl2shim: try fix getting program link log 2023-10-16 06:47:55 +03:00
mittorn 4a2f8cafcd gl2shim: try fix errors in ViZual ZtudiO 2023-10-16 06:47:55 +03:00
mittorn d254bac16b ref_gl: integrate gl2shim extensions 2023-10-16 06:47:55 +03:00
mittorn e23b632ce5 ref_gl: add missing non-arb shader functions 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 0265e88d8f gl2shim: fix wrong color vertex 2023-10-16 06:47:55 +03:00
mittorn 4114d2f24d gl2shim: more refactoring 2023-10-16 06:47:55 +03:00
mittorn 8124035763 ref_gl: try fix psvita 2023-10-16 06:47:55 +03:00
mittorn 96127c6eb0 gl2shim: make shaders code more portable 2023-10-16 06:47:55 +03:00
mittorn cf65a39b83 gl2shim: refactoring 2023-10-16 06:47:55 +03:00
mittorn 0341f96b70 gl2shim: use IBO for quads 2023-10-16 06:47:55 +03:00
mittorn c95d91cfe3 gl2shim: limit begin-end chain length, cycle incremental buffers 2023-10-16 06:47:55 +03:00
mittorn cbd10c6279 gl2shim: improve shader version handling, fix particle issues 2023-10-16 06:47:55 +03:00
mittorn 5df9e57743 gl2shim: support incremental non-persistent buffers for arrays 2023-10-16 06:47:55 +03:00
mittorn c178022fb5 gl2shim: persistent incremental streaming buffers, buffer cycling support 2023-10-16 06:47:55 +03:00
mittorn 724c29d711 gl2shim: implement fallback vbo, glDrawRangeElements with non-vbo buffer works now on core contexts 2023-10-16 06:47:55 +03:00
mittorn 74a2dbeb91 gl2shim: batcher experiments (UGLY, DO NOT USE), fix bad shader bindings, Draw QUADS with TRIFAN when possible 2023-10-16 06:47:55 +03:00
mittorn 5d20d24ebc gl2shim: simple matrix invalidation, do not calculate MVP every drawcall 2023-10-16 06:47:55 +03:00
mittorn 0e2fc277c8 gl2shim: bind dummy VAO on DrawElements implementation on glcore, this generates GL Errors, but renders fine on mesa 2023-10-16 06:47:55 +03:00
mittorn 1505740b73 ref_gl: fix enabling multitexturing on GLES 2023-10-16 06:47:55 +03:00
mittorn 6bad07b39d gl2shim: support low (<130) shaders 2023-10-16 06:47:55 +03:00
mittorn f85437dfc5 gl2shim: implement client arrays (not in glcore/vao mode), make studio/world array render work 2023-10-16 06:47:55 +03:00
mittorn c765261db6 ref_gl: fix late studio cvars registration, enable DrawRangeElements in GLES contexts 2023-10-16 06:47:55 +03:00
mittorn 73087ead2d ref_gl: fix build with XASH_GL_STATIC, avoid using ARB shader extension on core context 2023-10-16 06:47:55 +03:00
mittorn 8c88e82709 gl2shim: support more GLSL versions 2023-10-16 06:47:55 +03:00
mittorn 40dd6e0234 gl2shim: Cleanup warnings, use APIENTRY declarations, stub unsupported functions 2023-10-16 06:47:55 +03:00
mittorn eb23b226cc Workaround core context issues 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
mittorn 97489635af gl2shim: limited matrix support 2023-10-16 06:47:55 +03:00
mittorn a9ea3976a7 ref_gl: introduce gl2_shim based on vgl_shim for future limited core/gles context support (SLOW, still needs ffp for matrix operations) 2023-10-16 06:47:55 +03:00
Alibek Omarov de19d78571 ref: fix late registration of studio cvars (thanks, @mittorn) 2023-10-14 08:11:25 +03:00
mittorn 287381d5ca ref_gl: remove complete useless macro, enable VBO under option 2023-10-14 08:04:17 +03:00
Alibek Omarov a738b2a50b ref: restore missing PARM_TEX_MEMORY RenderAPI parameter 2023-10-06 19:24:02 +03:00
Alibek Omarov 95f87e24ee ref: soft: do not register cl_righthand cvar 2023-09-29 13:45:24 +03:00
Alibek Omarov 8eef212726 ref: gl: fix compile 2023-09-11 21:22:53 +03:00
Velaron 1589defda1 ref: gl: don't create cl_righthand cvar 2023-09-08 15:52:07 +03:00
Velaron df921d8664 some cleaner code 2023-09-08 15:52:07 +03:00
Velaron f3949474b9 ref: gl: fix cl_righthand behaviour 2023-09-08 15:52:07 +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
fgsfds f79aaf93f8 ref: gl: psvita: disable NPOT textures, they're broken again 2023-06-25 18:15:18 +03:00
Alibek Omarov 21b47dff32 ref: gl: static-ize globals and functions in gl_warp 2023-06-25 13:17:46 +03:00
Alibek Omarov 16595bf2c0 ref: gl: fix r_showhull check 2023-05-29 14:42:16 +03:00
Alibek Omarov d994c6df9a ref: a bit more verbosity if UserTracer color exceed limit 2023-05-27 22:06:33 +03:00
Alibek Omarov 3a57f26351 ref: gl: move ref_gl cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov 8680757844 ref: soft: move ref_soft cvars to static allocation, remove dead cvars 2023-05-27 21:52:58 +03:00
Alibek Omarov 95a8d2f51f ref: soft: attempt to fix freeze in decals on software renderer 2023-05-27 21:52:58 +03:00
Alibek Omarov 5d7d5319fd engine: move ref cvars to static allocation 2023-05-27 21:52:58 +03:00
Velaron bb1b9dad23 ref: gl: Goldsrc compatible fog implementation 2023-05-20 23:36:04 +03:00
Alibek Omarov 7333ddc1d9 engine: client: move some RenderAPI GetParm queries to engine 2023-05-19 05:03:25 +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 1d62df0e2d ref: gl: turn magic skybox numbers into defined macros 2023-05-19 04:36:05 +03:00
Alibek Omarov 277bead9b7 ref: remove SetCullState function from StudioAPI. It does nothing on GoldSrc. 2023-05-17 17:23:35 +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 cb3b16e2ec engine: client: implement v_dark in engine, instead of making it ref-specific 2023-04-28 16:52:22 +03:00
Alibek Omarov 27aad9f4a0 ref: gl: add size argument to COM_Default/ReplaceExtension calls 2023-04-26 05:20:45 +03:00
Alibek Omarov 8b96e7ca87 ref: add size argument to COM_FileBase calls 2023-04-26 05:20:45 +03:00
Alibek Omarov 8f207362a5 public: remove Q_sprintf, and patch all code that used it to use Q_snprintf instead 2023-04-26 05:20:45 +03:00
Alibek Omarov 096ee34f67 public: remove Q_vsprintf, replace by proper Q_vsnprintf proper calls
Fixes weird off by one error caused by glibc updates? I didn't tracked
what causes it exactly but replacing it seems to work. Anyway, we should
remove all 99999 hacks in libpublic.
2023-04-23 18:19:28 +03:00
Alibek Omarov f55ef63e26 ref: optimize R_LightLambert function
* Quick exit if no local lights
* Try to minimize Q_min() checks by apply it on temp variables
* Cap final light values only once, after all local lights are calculated
2023-04-14 20:33:07 +03:00
Alibek Omarov 79624fa400 ref: gl: cleanup unused functions 2023-04-03 05:09:33 +03:00
Alibek Omarov 550ced9c36 ref: gl: cleanup unused functions in frustum 2023-04-03 05:05:32 +03:00
Alibek Omarov fd795d5612 ref: soft: cleanup unused functions 2023-04-03 04:57:41 +03:00
Alibek Omarov 67903b55cc ref: soft: adapt to RefAPI 4 changes 2023-03-28 21:34:43 +03:00
Alibek Omarov 55bf0e8a53 ref: gl: adapt to RefAPI 4 changes 2023-03-28 20:45:26 +03:00
Alibek Omarov 8bb5ec5e26 ref: remove renderer description export, it's unused now 2023-03-24 02:54:14 +03:00
Alibek Omarov d085c5a843 ref: gl: gl_cull: remove thirdperson check, as it handled in client instead 2023-03-15 06:29:29 +03:00
Alibek Omarov ef0b227967 ref: gl: alias: fix strict aliasing by converting it to use float_bits_t union 2023-03-14 21:29:35 +03:00
Andrey Akhmichin 9040c34f48 ref: gl: replace va function calls. 2023-03-11 17:56:05 +03:00
Andrey Akhmichin af5c74981b ref: soft: replace va function calls. 2023-03-11 15:31:17 +03:00
fgsfds 70a73e47a7 psvita: use crtlib where possible 2023-03-11 07:09:19 +03:00
fgsfds 0d04c20578 ref: gl: psvita: skip deleting the shaders since glDeleteProgram can block for a long time 2023-03-11 07:09:19 +03:00
fgsfds fad506ef03 ref: gl: vgl_shim: remove normal support, it's not necessary 2023-03-11 07:09:19 +03:00
fgsfds 9150bbdfd8 ref: gl: psvita: remove the GL_CheckExtension hack 2023-03-11 07:09:19 +03:00
fgsfds aa4e2f0ae4 ref: gl: psvita: use Cvar_FullSet to disable r_studio_drawelements 2023-03-11 07:09:19 +03:00
fgsfds 2bacc91922 ref: gl: move vgl_shim to ref/gl 2023-03-11 07:09:19 +03:00
fgsfds 82cfd3ecc3 ref: gl: psvita: revert arrayverts change, it doesn't matter that much 2023-03-11 07:09:18 +03:00
fgsfds 5a3e3b3977 ref: gl: add immediate mode shim for psvita 2023-03-11 07:09:18 +03:00
fgsfds 9cf6e421cb ref: gl: psvita: force-enable NPOT textures 2023-03-11 07:09:18 +03:00
fgsfds 34dd52ca90 ref: gl: trust the GL_EXTENSIONS string on psvita 2023-03-11 07:09:18 +03:00
fgsfds 7424b29e56 engine: initial psvita build support 2023-03-11 07:09:14 +03:00
Alibek Omarov f4069de7f2 engine: move SlerpBones, CalcBonePosition/Quaternion from engine to libpublic 2023-02-13 05:23:13 +03:00
Alibek Omarov 12154de6f5 ref: soft: fix -Wsequence-point 2023-02-06 16:42:09 +03:00
Alibek Omarov ced6e8869a ref: fix chrome texture being misaligned 2023-02-01 04:55:47 +03:00
Alibek Omarov 74ce7e9b10 ref: don't apply rendercolor to studio models where it's not needed 2023-01-13 15:25:58 +03:00
Alibek Omarov c6bfc82019 ref: soft: implement screenshots 2023-01-05 07:09:23 +03:00
Alibek Omarov 4bbd0cc404 ref: add new special rendermode that specifically used for modulate mode in engine's ScreenFade 2023-01-05 06:07:56 +03:00
Andrey Akhmichin 7555fefc18 ref: gl: simplify strings operations. 2022-12-20 16:11:21 +03:00
Alibek Omarov fd3c5e8384 ref: gl: VBO is disabled unless somebody picks it up and fixes memory corruption and other bugs 2022-12-08 06:50:12 +03:00
Alibek Omarov 406eb828da ref: gl: disable underwater distortion by default, enable for Quake compatible mode only 2022-12-05 11:59:29 +03:00