Commit graph

170 commits

Author SHA1 Message Date
Jaime Passos
1379cfafc1 Unbind VBO from model during mid-frame
https://git.magicalgirl.moe/STJr/SRB2/merge_requests/397?commit_id=79fed1e954ce77fabb2f09573e2fcd00d6326cef#note_11536
2019-05-02 17:56:06 -04:00
mazmazz
ccd742d92e Fix blinking MD2 models
MD2 models are forced to load float frames, so mesh->indices is never loaded, so glDrawElements can't be used. Use glDrawArrays instead.
2019-01-03 00:57:14 -05:00
mazmazz
81352aece1 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
mazmazz
1686448b2a Compile fix -- remove (void)alpha from DoScreenWipe 2018-12-27 22:29:12 -05:00
Arthur
60afa76c3a Eliminate some old GL functions so we don't slide back into bad habits! 2018-12-27 22:10:10 -05:00
Arthur
5f6108f278 Fix screen transitions 2018-12-27 22:09:00 -05:00
mazmazz
cd6964876e Buildbot fixes 2018-12-27 01:00:09 -05:00
mazmazz
fe77293122 Compile fixes -- specify GLubyte for pglColor4ubv 2018-12-27 00:50:43 -05:00
Arthur
c0fbd2f841 Removed gr_voodoocompatibility as even low-power mobile devices do not have this limitation
No longer using byte2float in DrawPolygon -- use the surface color data directly
Vertex Buffer Objects for non-interpolated model frames
Removed some old unused paletted texture stuff
2018-12-27 00:35:29 -05:00
Arthur
f18e09e638 Removed unused PF_Md2 flag
More OpenGL performance increase by making assumptions about client state
2018-12-27 00:30:07 -05:00
Arthur
f01d708edf boolean fix for VS
add GL_NORMALIZE
2018-12-27 00:24:21 -05:00
mazmazz
1ec384e3d0 More mixed d&c fixes 2018-12-26 23:50:35 -05:00
mazmazz
43e1432cf6 Mixed D&C fixes 2018-12-26 23:39:34 -05:00
mazmazz
afe299559e Fix floating point comparisons 2018-12-26 23:15:28 -05:00
mazmazz
dcc17021b5 Merge tag 'SRB2_release_2.1.23' into md3-vanilla-ssn 2018-12-26 22:55:25 -05:00
Arthur
c696a9c5a2 Removed all glBegin/glEnd references
MD2/MD3 now works, with the exception of WAD textures for some odd reason
2018-12-23 17:00:11 -05:00
mazmazz
235a511b3f Small Mixed D&C fix 2018-12-19 20:56:58 -05:00
AJ Freda
2e99f299fd Fixed a few unnoticable mistakes [vanilla] 2018-12-19 20:52:47 -05:00
mazmazz
e2cf95ce5c Interpolation fix attempt?
* Fix pglNormal3bv pointer because typo
2018-12-19 01:57:54 -05:00
mazmazz
c39e8bfa0f Hide/add Kart FTransform mirror and anglez behind ifdef 2018-12-19 00:17:51 -05:00
mazmazz
35b18c6086 Buildbot fixes (changed byte types to char; mixed d&c) 2018-12-18 20:23:08 -05:00
mazmazz
0fdf9dd11c GCC compile fixes 2018-12-18 19:17:33 -05:00
Arthur
9f71cbecda Support for 'tinyframes', and lots more optimization 2018-12-18 17:52:47 -05:00
Arthur
b762dc7bca Common model format, with MD2/MD3 loading 2018-12-18 17:52:45 -05:00
Alam Ed Arias
386f9d4e54 fix compiling for MSVC 2018-12-14 20:42:37 -05:00
Alam Ed Arias
261e1e623c Clear float equal warnings 2018-12-14 20:34:06 -05:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn
43743722c7 Merge branch 'public_next'
# Conflicts:
#	src/f_finale.c
#	src/hardware/hw_draw.c
#	src/hardware/hw_main.c
#	src/hardware/r_opengl/r_opengl.c
#	src/sdl12/hwsym_sdl.c
#	src/sdl12/i_video.c
2018-04-06 18:42:07 +01:00
Sryder
9c1bf9798a Revert "Fix screenshot functionality in fullscreen in SDL2"
This reverts commit 83d4f29367.

The reason I am reverting this is because the last commit actually fixes the *old* screenshot functionality, as the screen is being drawn back onto the buffer after they're swapped in the "real" size. Meaning the old function actually works perfectly fine now.
2018-03-18 18:33:53 +00:00
Sryder
4e40a810f7 Fix wipes in low resolutions 2018-03-18 17:12:12 +00:00
Sryder
8e18d804fe Draw the final screen texture in the centre with black bars
Only applies when the monitor aspect ratio is different to the game's aspect ratio.
2018-03-17 19:22:14 +00:00
Sryder
0742655892 Better fog block colouring
They still aren't perfect, but now they are at least not quite so obviously just translucent polygons over the level. A mixture between partially modulating the background colours and adding the fog colour. Notably white fog blocks look like they're brightening what's behind them.
Additive was also setting noalphatest before, can probably decide that depending on what it needs anyway. I don't think it's currently used anyway.
2018-03-15 23:58:37 +00:00
Sryder
4114464930 Small hacky fix for MD2s and sprites until sorting for walls, floors, and sprites is done
Sorts all translucent sprites and MD2s so they're drawn after all the opaque ones. Fixes most of the observable issues between translucent MD2s and opaque sprites/MD2s.
2018-03-09 09:58:10 +00:00
Sryder
83d4f29367 Fix screenshot functionality in fullscreen in SDL2 2018-03-08 22:28:38 +00:00
Sryder
e6dff75aab Optimise the screen texture setup for SDL2, Post-processor, and wipes.
Only use glCopyTexImage2D when first creating the screen texture, use glCopyTexSubImage2D anytime after that as it does not define a new texture each time.
Flushing of the screen textures has been implemented for when the screen size changes (so that the screen textures don't stay at a wrong size) and the game is closed, I believe they would leave a memory leak before.
2018-03-07 22:55:21 +00:00
Sryder
954850b221 Decrease far clipping plane
The Far clipping plane did not need to be nearly as high as it was, the new value is 32768, which I suspect is about how far software can render before it completely falls apart.
It is desirable to increase the near clipping plane to between 6-10, but it can introduce more issues with close geometry not being drawn when the player or camera is scaled or viewheight is set to MIN in first person view. It would also stop sprites from being drawn ever so slightly too early, but this isn't too much of an issue and isn't too noticeable with those values. Might look into scaling near clipping plane in accordance to camera scale in the future.
The reason for wanting to increase the near clipping plane is because the small value can cause very noticeable Z-fighting where there shouldn't be on older GPU's, usually Intel ones, that don't support 24-bits for the depth buffer.
2018-03-07 00:39:33 +00:00
Sryder
254c53cb3d Merge branch 'master' of git@git.magicalgirl.moe:STJr/SRB2.git into openglquickfixes 2018-03-06 16:11:05 +00:00
Monster Iestyn
b52c843139 Merge branch 'public_next' 2017-11-01 18:39:25 +00:00
Monster Iestyn
2b1fb67a5f DrawMD2i: change duration and tics to INT32, fix up any related code 2017-10-30 19:12:51 +00:00
Monster Iestyn
0cc8fbdb4e Don't use interpolation code if the frame lasts instantaneously or infinitely
Also removed the + 1 from newtime, since there was never really any need for it. It just offset the interpolation so it went like (1 -> 2] instead of [1 -> 2), so you never saw the base appearance for each frame except at the end of any frames interpolating to it

Changed DrawMD2Ex's duration/tics type to INT32 so -1 comparisons work, probably want to change the signs elsewhere too but this is fine for now
2017-10-24 20:45:55 +01:00
Monster Iestyn
d38873854d Now that MiniGL is gone, the 1.2 Params macros will always be defined
ATI_RAGE_PRO_COMPATIBILITY isn't used, and was disabled in r_minigl.c (the only other file that mentioned it) anyway. So let's get rid of support for it!
2017-09-30 17:09:45 +01:00
Monster Iestyn
20709f55b5 Murdered MiniGL (yes it's not a port, but we don't need it anymore anyway) 2017-09-30 17:00:37 +01:00
Monster Iestyn
330399ea9b Dreamcast is gone, so there is no need for KOS_GL_COMPATIBILITY anymore 2017-09-29 18:28:47 +01:00
Sryder13
db99537a6b Various Transparent Texture Fixes
Draw Textures and Flats that have holes in them like a solid polygon so they use the depth buffer and don't need to be sorted
Disable all linear filtering on textures and flats that have holes in them, the linear filtering introduces translucency into the textures where the edges are. Leaving them with either a black border, or causing pixels behind the slightly translucent areas to not be drawn. Doesn't apply to sprites and the HUD as they are always already sorted properly.
Make the Alpha Testing more strict on non-translucent blend modes. This makes it so any transparency below 0.5 is discarded instead. Would make anything that is blended and has holes in it look slightly better, only the HUD and MD2s where the texture has holes are effected currently.
Set TF_TRANSPARENT on flat texture flags when there are holes in the texture.
Minor fix to make sure MD2s always set the right blend mode
2017-09-09 00:44:13 +01:00
Alam Ed Arias
6847a89bc2 OpenGL: check for 1.3+ or 2.0+, not just 1.3/2.X to 4.X 2017-05-29 23:04:03 -04:00
Alam Ed Arias
6be7693ecb OpenGL: Load the GLU and OpenGL 1.3 multitexturing functions during runtime 2017-05-29 22:52:51 -04:00
Monster Iestyn
f96844b262 Fix screenshots taken in OpenGL with 1366x768 being messed up
This is based on GZDoom's own fix for the same issue, had to add support for glPixelStorei first though
2017-05-29 21:28:36 +01:00
Alam Ed Arias
2823c7bffb build: fixup warnings from GCC 6.2.1 2017-03-12 17:23:56 -04:00
Alam Ed Arias
2c8008e11e NULL checks 2016-06-13 10:07:10 -04:00
Alam Ed Arias
1e3631425f r_opengl: move DrawMD2i code to DrawMD2Ex 2016-06-12 16:08:48 -04:00