Commit graph

1159 commits

Author SHA1 Message Date
Monster Iestyn
b882aea2e4 Fix clobbering error in hw_md2.c by adding "volatile" to png_FILE.
(Apparently Kart made this exact fix 2 years ago and it was never backported?)
2021-03-21 19:49:32 +00:00
Lach
6ab5432713 Merge branch 'opengl-renderflags-fix' into 'next'
Fix a few renderflags oversights in OpenGL

See merge request STJr/SRB2!1422
2021-03-14 20:51:57 -04:00
Hannu Hanhi
746c84e0b5 Fix wrong color on player models' first frame by updating variable after loading blend texture 2021-03-13 23:07:51 +02:00
Hannu Hanhi
caab4e96cd Remove misplaced SetShader call in CompileShaders 2021-03-06 19:38:17 +02:00
Jaime Ita Passos
f6cb1798cc Fix a few renderflags oversights in OpenGL 2021-03-02 02:27:14 -03:00
Zwip-Zwap Zapony
308ab0e079 Fix OpenGL V_DrawCroppedPatch 2021-02-21 22:16:38 +01:00
Jaime Ita Passos
8318935811 Remove GLMipmap_t.nextmipmap 2021-01-27 21:23:20 -03:00
Jaime Ita Passos
d4044a4f82 Add PF_ColorMapped
Not all surfaces have tint and fade colors. Checking for a specific surface flag, that tells the backend those colors are present, avoids uninitialized reads.
2021-01-27 18:54:33 -03:00
Jaime Ita Passos
5501d495c7 OpenGL backend: Manage uploaded GPU textures with an internal list
Indirectly fixes the game doing whatever after freeing a patch.
This commit implements a FTextureInfo struct type, instead of it being a typedef to the GLMipmap_s struct type.
2021-01-27 17:48:57 -03:00
LJ Sonic
14ee92ef67 Merge branch 'gl-levelflat-fix' into 'next'
Fix a misuse of levelflat_t.picture in OpenGL

See merge request STJr/SRB2!1327
2021-01-25 16:40:02 -05:00
Hannu Hanhi
d252f074b7 Render midtextures on two-sided lines with a z-buffer offset
This will fix z-fighting issues when they overlap with FOFs.
2021-01-10 21:33:54 +02:00
Hannu Hanhi
eb1e7eff8f Take slopes into account even more in FOF wall cutoff in HWR_ProcessSeg 2021-01-10 20:52:03 +02:00
Hannu Hanhi
ed82b94e64 Take slopes into account in FOF wall cutoff in HWR_ProcessSeg 2020-12-29 23:29:00 +02:00
James R
cab089c5b1 Merge branch 'gl-colormap-update' into 'next'
Fix animated skincolors in OpenGL (resolves #187, #247, #301, #370)

Closes #187, #247, #301, and #370

See merge request STJr/SRB2!1301
2020-12-15 20:50:45 -05:00
James R
14c6d93c0c Merge branch 'team-elementalfire' into 'next'
Player-Colored Elemental Fire for competitive gametypes

See merge request STJr/SRB2!1312
2020-12-15 20:47:45 -05:00
Jaime Ita Passos
6160a2d0fe Fix a misuse of levelflat_t.picture in OpenGL (Kitchen Sink SRB2 port) 2020-12-14 02:07:12 -03:00
James R
c8cc9c7a6f Remove trailing whitespace 2020-12-12 02:40:46 -08:00
Zwip-Zwap Zapony
029e79024b V_DrawCroppedPatch Lua exposure and improvements
Separated X and Y scale, and added colormap argument
Added V_*SCALEPATCH and V_PERPLAYER flags support
Made sx,sy,w,h into fixed-point values
Exposed to Lua as "v.drawCropped(...)"
(Also fix HWR_DrawStretchyFixedPatch ignoring vscale without pscale)
2020-12-11 23:43:38 +01:00
Zippy_Zolton
f2095b57fd Player-Colored Elemental Fire for competitive gametypes 2020-12-10 20:37:50 -06:00
James R
e05433f282 Merge branch 'fix-gl-draw-cropped' into 'next'
Fix HWR_DrawCroppedPatch scaling a patch when cropping the top and left sides.

See merge request STJr/SRB2!1297
2020-12-10 15:44:51 -05:00
James R
2ab71571aa Merge branch 'high-resolution-timer-2' into next 2020-12-10 02:55:02 -08:00
Jaime Ita Passos
18ee97c583 Fix animated skincolors in OpenGL 2020-12-06 20:17:14 -03:00
GoldenTails
6546fc8ce7 Fix HWR_DrawCroppedPatch scaling a patch when cropping the top and left sides. 2020-12-06 12:01:31 -06:00
Jaime Ita Passos
5293c52bca Remove SHORT macros for referencing patch width/height/offsets 2020-11-22 20:02:47 -03:00
Jaime Ita Passos
0645c642d2 Improve GPU texture management. 2020-11-22 18:18:26 -03:00
Jaime Ita Passos
152c540c1e Fix sprite textures in models 2020-11-22 17:10:10 -03:00
Jaime Ita Passos
9ab3acae2d Change how texture deletion works in OpenGL 2020-11-22 17:03:04 -03:00
Jaime Ita Passos
5e890ee6f8 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
James R
50e15840fb Merge branch 'udmf-multitag' into 'next'
UDMF: Multitag support

See merge request STJr/SRB2!1097
2020-11-14 19:18:14 -05:00
James R
e3c8415627 OpenGL: don't access field that doesn't exist in precipmobj_t 2020-11-13 00:46:03 -08:00
Nev3r
fb9432ae57 Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag 2020-11-10 11:46:53 +01:00
James R
876aeb6a31 Merge branch 'allowshaders' into 'next'
Let the server or an admin toggle clients' custom shaders

See merge request STJr/SRB2!1181
2020-11-08 21:09:56 -05:00
Jaime Passos
b8f668b2e0 rename 2020-11-08 23:02:05 -03:00
James R
b72789b0c9 Huge perfstats refactor
I needed to update it to make it functional with the precise timer. But I also
got sick of looking at the mess of sprintf followed by draw call.
2020-11-07 01:32:59 -08:00
Hannu Hanhi
c44120eb87 Fix some copyright statements in new files 2020-10-29 16:04:25 +02:00
Jaime Passos
0f9d85694d Implement an "ignore colormaps" sprite rendering flag 2020-10-27 19:54:50 -03:00
Jaime Passos
b03d95c5c6 Bug fixes 2020-10-27 17:02:35 -03:00
Nev3r
c62ef355ef Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag
# Conflicts:
#	src/lua_baselib.c
#	src/lua_maplib.c
2020-10-27 20:48:25 +01:00
Jaime Passos
b872222b50 Implement blend modes 2020-10-27 00:03:41 -03:00
James R
1cd73315f1 Merge branch 'model-fallback' into 'next'
Model fallback

See merge request STJr/SRB2!1167
2020-10-18 16:52:42 -04:00
James R
d279489753 Merge branch 'perfstats' into 'next'
Performance stats

See merge request STJr/SRB2!1186
2020-10-18 15:33:20 -04:00
Jaime Passos
3ac175660c Don't render sprites with negative xscale or yscale in OpenGL 2020-10-17 22:40:49 -03:00
Jaime Passos
70ada935ec Don't free PU_HWRCACHE and PU_HWRCACHE_UNLOCKED memory tags in HWR_ClearAllTextures.
Probably fixes a random annoying crash around that function.
(I was also suspecting renderer switching was doing other slightly weird stuff.)
2020-10-15 14:31:16 -03:00
Jaime Passos
8294479a5f Merge branch 'next' into allowshaders 2020-10-15 01:25:11 -03:00
Jaime Passos
ab526e47cc Implement object-defined floor sprite slopes. 2020-10-14 00:57:13 -03:00
Jaime Passos
4273896311 Implement relative and absolute sprite offsets for objects (mobjs)
Added RF_ABSOLUTEOFFSETS and RF_FLIPOFFSETS
2020-10-13 12:57:36 -03:00
Jaime Passos
1ea3bd8fff Fix uninitialized variable warning 2020-10-12 22:08:45 -03:00
Jaime Passos
831ccccdd6 OpenGL support for splats, fix some shadow draw bugs in Software 2020-10-12 19:53:21 -03:00
James R
d73fbd8616 Merge branch 'slight-shader-cleanup' into 'next'
Shader code cleanup

See merge request STJr/SRB2!1103
2020-10-12 18:22:08 -04:00
Jaime Passos
b620f4835a Support spritexscale and spriteyscale in OpenGL
Fix papersprite scaling with spritexscale and spriteyscale in Software
2020-10-12 17:25:18 -03:00
Jaime Passos
cc97e22e2f Changes to sprite rendering:
- Added render flags (see r_defs.h)
- Implemented floor splats
- Drop shadow sprite rendering through render flags
2020-10-12 00:13:22 -03:00
Jaime Passos
6e5f71dd45 Refactor patch rotation 2020-10-10 18:43:26 -03:00
Jaime Passos
b15bbd505c Merge branch 'next' into patch-stuff-again-2 2020-10-10 17:01:10 -03:00
Hannu Hanhi
4f20a20165 Performance stats 2020-10-10 22:12:34 +03:00
Jaime Passos
0811f60b2a Let the server or an admin toggle clients' custom shaders 2020-10-09 02:06:13 -03:00
Jaime Passos
63d4c1dffc Merge remote-tracking branch 'origin' into slight-shader-cleanup 2020-10-08 22:45:39 -03:00
James R
dbd79a29a4 Replace C90's junk with a modest macro 2020-10-06 23:04:23 -07:00
Jaime Passos
aaa9cff6ac Fix PNG issue in OpenGL + optimize PNG sprite loading 2020-10-02 19:48:13 -03:00
Steel Titanium
386db4b7a1 Model fallback 2020-10-02 15:45:43 -04:00
SteelT
060f46653d Merge branch 'ogl-model-uv-adjust' into 'next'
Re-adjust model UVs when sprite texture dimensions change

See merge request STJr/SRB2!1068
2020-09-25 21:19:59 -04:00
SteelT
a033f482be Merge branch 'pictureformats' into 'next'
PNG conversion refactoring

See merge request STJr/SRB2!675
2020-09-10 15:58:18 -04:00
Jaime Passos
dcaad758f4 Improved memory management for patches 2020-09-07 02:23:07 -03:00
Hannu Hanhi
bda1d1e725 Convince the compiler that I know what I'm doing, I think 2020-08-18 23:21:26 +03:00
Jaime Passos
92c4993d67 Introduce Doom patch format into picture formats
Fixes sprite rotation
2020-08-15 21:52:01 -03:00
Jaime Passos
9b426b474c Merge branch 'pictureformats' into patch-stuff-again-2 2020-08-15 20:48:28 -03:00
Nev3r
b15c760dc2 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag 2020-08-15 13:44:59 +02:00
Jaime Passos
78cc4a78d0 Refactor renderer switching 2020-08-14 22:27:16 -03:00
James R
8394bf6055 Merge branch 'opengl-skydome-fixes' into 'next'
Move the sky dome code out of r_opengl.c, fix issues with shaders

See merge request STJr/SRB2!1071
2020-08-09 20:45:01 -04:00
Jaime Passos
91ed56ef40 Refactor patch loading 2020-08-08 05:16:47 -03:00
Jaime Passos
74dfa9f700 Shader code cleanup 2020-08-07 18:17:05 -03:00
James R
cc508d0ba3 Merge branch 'ogl-model-lighting-shader' into 'next'
Add capability to use model lighting with shaders enabled

See merge request STJr/SRB2!1073
2020-08-05 19:50:31 -04:00
James R
d8834143cb Merge branch 'ogl-sector-alignment-fix' into 'next'
Fix sector flat alignment issues in OpenGL

See merge request STJr/SRB2!1094
2020-08-03 12:47:29 -04:00
James R
f5d9029d2a Merge branch 'ogl-big-room-fix' into 'next'
Big room fix for OpenGL

See merge request STJr/SRB2!1089
2020-08-03 12:44:09 -04:00
Nev3r
ba5d09eb2e Fix smooth brain bruhments. 2020-07-31 22:38:37 +02:00
Nev3r
0520725069 Fix the OpenGL FOF issue with a different approach. Not fond of it either but at least it works. 2020-07-31 14:55:26 +02:00
Nev3r
729c8b2ec6 Fix FOF intersections with multitags for the OpenGL in a kind of hacky way. 2020-07-29 14:53:27 +02:00
Nev3r
c65ada7dd7 Merge branch 'next' into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
2020-07-29 13:55:14 +02:00
Nev3r
f791c1b4ec Fix gl_linedef renaming which went off radars on the udmf branch 2020-07-28 20:39:11 +02:00
Nev3r
6dfe236602 Merge branch 'udmf-next' into 'next'
Merge udmf-next into next

See merge request STJr/SRB2!1075
2020-07-28 14:03:59 -04:00
Hannu Hanhi
85f5cb20e6 Fix sector flat alignment issues in OpenGL 2020-07-26 21:25:11 +03:00
Hannu Hanhi
24b828b362 Use 64-bit R_PointToAngle in OpenGL culling to fix some big room issues 2020-07-25 21:50:24 +03:00
James R
e47fbe7dd9 Compiler error :V 2020-07-24 02:58:05 -07:00
James R
28931b90dc Merge branch 'ogl-polyobject-tex-fix' into 'next'
Fix OpenGL polyobject texture distortion

See merge request STJr/SRB2!1086
2020-07-24 04:49:25 -04:00
James R
932bf9b20e Merge branch 'ogl-shader-light-clamp' into 'next'
Clamp light level for shaders. Fixes #194.

Closes #194

See merge request STJr/SRB2!1085
2020-07-24 04:47:57 -04:00
Hannu Hanhi
e331c9d18e Fix OpenGL polyobject texture distortion 2020-07-23 20:51:05 +03:00
Hannu Hanhi
e4d6e92f37 Clamp light level for shaders. Fixes #194. 2020-07-23 19:05:17 +03:00
Hannu Hanhi
80172ee932 Don't discard zero alpha fog block fragments. Fixes #198. 2020-07-23 18:24:41 +03:00
Jaime Passos
ca060a4372 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into pictureformats 2020-07-21 22:25:00 -03:00
Hannu Hanhi
b03e7f63c5 Fix shader comment 2020-07-19 16:07:53 +03:00
Hannu Hanhi
92ebbdfc10 Don't override custom shaders with model lighting shader 2020-07-18 15:48:37 +03:00
Hannu Hanhi
c1cf41fb0c Add capability to use model lighting with shaders enabled 2020-07-18 15:08:59 +03:00
Jaime Passos
48a6652973 Move the sky dome code out of r_opengl.c, fix issues with shaders 2020-07-17 02:48:05 -03:00
Hannu Hanhi
0e5631fe66 More work on sprite-texture model uv adjustment 2 2020-07-16 22:39:44 +03:00
Hannu Hanhi
afd0858b4d More work on sprite-texture model uv adjustment 2020-07-16 22:11:36 +03:00
Hannu Hanhi
893ff0fa19 Merge remote-tracking branch 'upstream/next' into ogl-model-uv-adjust 2020-07-14 20:30:56 +03:00
James R
839f086216 A few more instances of "gr" to purge 2020-07-12 16:09:43 -07:00
James R
b9a24001d8 Merge remote-tracking branch 'origin/next' into remove-glide-2 2020-07-12 16:05:15 -07:00
Hannu Hanhi
3a488c243f Fix translucency comparison from previous commit 2020-07-12 22:23:15 +03:00
Hannu Hanhi
9909746718 Fix crash by handling precip mobjs correctly in ogl sprite sorting 2020-07-12 21:50:00 +03:00
Hannu Hanhi
ec13272d8c Adjust model uvs when used sprite texture changes 2020-07-12 18:04:56 +03:00