Commit graph

85 commits

Author SHA1 Message Date
Christoph Oelckers
d84e079282 - render partial sprites oon the back side of a portal for actors in front of it. This is needed because the stencil will clip away those parts. 2016-04-30 16:57:53 +02:00
Christoph Oelckers
434e39e62f - made adjustments to ZDoom's last changes. 2016-04-28 17:55:58 +02:00
Christoph Oelckers
09f54b0940 - cleaned up the clip plane management for portals.
Unfortunately the math behind the old clip planes is utterly impenetrable and so poorly documented that I have no idea how to set that up, so it is deactivated for now. It wasn't working anyway.
2016-04-27 00:41:00 +02:00
Christoph Oelckers
eb27057853 - enable shader-less rendering. Still very incomplete, but at least the basics are working. 2016-04-26 16:44:03 +02:00
Christoph Oelckers
3b1500438d - got rid of VAO's. they have no impact on performance and are a general nuisance if some render paths cannot use them.
- cleaned up gl_interface and removed gl.compatibility.
2016-04-26 16:26:34 +02:00
Christoph Oelckers
f066457a48 - add shader patching to allow running the engine with GLSL 1.2.
- made some initial preparations for the shader-less fallback path.
2016-04-26 15:26:52 +02:00
Christoph Oelckers
f77c4642cb - made the adjustments. 2016-04-24 13:35:43 +02:00
Christoph Oelckers
1c7b512cc0 - GL handling of new portal data organization.
This also fixes some oversights with plane and horizon portals which were included in several checks.
2016-04-20 20:08:53 +02:00
Christoph Oelckers
1f32f5a258 - some minor fixing and cleanup on gL portal code. 2016-04-20 11:39:41 +02:00
Christoph Oelckers
95de1faa80 - fixed: The portal coverage builder initialized node_t::len differently than the polyobject splitter.
This was creating quite a mess when loading savegames with both portals and polyobjects.
2016-04-17 01:16:46 +02:00
Christoph Oelckers
bf2b61f61c - removed remaining STACK_ARGS from GL code. 2016-04-11 10:55:09 +02:00
Christoph Oelckers
25d7eaed0a - fixed parentheses in ADynamicLight::DistToSeg.
- floatifed OpenGL sector grouping.
- optimized light node collection. It should not create light nodes for out of range segs.
2016-04-08 12:38:09 +02:00
Christoph Oelckers
4d5671d654 - floatified the texture coordinate code. 2016-04-08 01:42:43 +02:00
Christoph Oelckers
5a2eac8f15 - floatified vertices and removed the now redundant fx and fy members. This needs an added check for polyobject origins, though, so that such subsectors don't get rendered. 2016-04-03 11:40:14 +02:00
Christoph Oelckers
af78937a15 - updated GL renderer. 2016-04-02 23:17:16 +02:00
Christoph Oelckers
cf44d2e37a - adjustments. 2016-03-30 20:01:44 +02:00
Christoph Oelckers
cadd8f2d4a - made adjustments for changes to linedef delta. 2016-03-29 16:31:58 +02:00
Christoph Oelckers
59bb003285 - GL adjustments for plane changes. 2016-03-29 13:45:50 +02:00
Christoph Oelckers
a87c292f10 - adjustments to GL code for texture scale and vertex coordinate access. 2016-03-29 11:26:33 +02:00
Christoph Oelckers
b54b34a512 - adjustments for floating point changes. 2016-03-21 02:57:02 +01:00
Christoph Oelckers
dbd89c2702 - refactoring of portal grouping for the renderer, to allow more efficient clipping. 2016-03-04 14:10:13 +01:00
Christoph Oelckers
bd67f3b3e5 - added skybox cast for GL code. 2016-02-20 02:20:43 +01:00
Christoph Oelckers
bd9907f20f - missing #includes in GL code. 2016-02-16 22:06:26 +01:00
Christoph Oelckers
dda73b531c Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/CMakeLists.txt
#	src/p_setup.cpp
#	src/r_defs.h
#	src/version.h

This only updates to a compileable state. The new portals are not yet functional in the hardware renderer because they require some refactoring in the data management first.
2016-02-05 12:31:41 +01:00
Christoph Oelckers
9305cd86a0 - remove the GLWallLightEntry type. Everything it contains can be retrieved from the existing lightlist just as easily, and this approach avoids a lot of memory allocations.
- removed the SplitWall profiling timer because all it measures now is an almost empty function.
2016-02-01 01:03:34 +01:00
Christoph Oelckers
71da7406bd - since we no longer split walls at 3D floor boundaries, those planes no longer need to be added to the vertex height lists. 2016-02-01 00:42:37 +01:00
Christoph Oelckers
5816049510 - made necessary adjustments for the coordinate refactoring in ZDoom. 2016-01-21 12:36:37 +01:00
Christoph Oelckers
cd778b6bdc - fixed CollectPortalSectors 2016-01-13 00:15:04 +01:00
Christoph Oelckers
df6ffe6418 - adjustments for recent ZDoom changes. 2015-04-16 22:50:26 +02:00
Christoph Oelckers
a8398e70b0 - fixed: The brightfog flag in the GL related map settings was never initialized.
- fixed: brightfog should not disable colored lighting for the weapon sprite.
2014-12-31 23:01:06 +01:00
Christoph Oelckers
315827015c - made aspect ratio correction factor configurable through MAPINFO. 2014-12-29 23:52:20 +01:00
Christoph Oelckers
e5cd90f323 - use separate vertex buffers per model to avoid large memory usage peaks. Also delete the geometry data for the models once it has been copied into the vertex buffer. 2014-10-24 11:43:25 +02:00
Christoph Oelckers
618c23303f - fixed: The interpolation factor for models was never passed to the shader. 2014-10-23 09:57:27 +02:00
Christoph Oelckers
92dcf2e5ef - fixed some of those supremely annoying and supremely pointless GCC/Clang compiler warnings. 2014-09-17 11:03:05 +02:00
Christoph Oelckers
9b8869e78d Merge branch 'master' into v2.x
Conflicts:
	src/gl/textures/gl_material.cpp
2014-09-09 01:30:11 +02:00
Christoph Oelckers
86d9c7ec8e - add some compatibility settings to fix rendering glitches in BTSX_E1 MAP12. 2014-09-09 01:27:41 +02:00
Christoph Oelckers
fa3a62e954 - fix a render glitch with Back to Saturn X MAP06: Do not flood missing upper and lower textures with the backsector's flat if that backsector is malformed (i.e. has no area.) 2014-08-31 23:01:53 +02:00
Christoph Oelckers
86d37e06f9 - lowered requirements of GL 2.x to OpenGL 3.3.
There was one issue preventing the previous 2.0 betas from running under GL 3.x: The lack of persistently mapped buffers.
For the dynamic light buffer today's changes take care of that problem.
For the vertex buffer there is no good workaround but we can use immediate mode render calls instead which have been reinstated.

To handle the current setup, the engine first tries to get a core profile context and checks for presence of GL 4.4 or the GL_ARB_buffer_storage extension.
If this fails the context is deleted again and a compatibility context retrieved which is then used for 'old style' rendering which does work on older GL versions.

This new version does not support GL 3.2 or lower, meaning that Intel GMA 3000 or lower is not supported. The reason for this is that the engine uses a few GL 3.3 features which are not present in the latest Intel driver.
In general the Intel GMA 3000 is far too weak, though, to run the demanding shader of GZDoom 2.x, so this is no real loss. Performance would be far from satisfying.

A command line option '-gl3' exists to force the fallback render path. On my Geforce 550Ti there's approx. 10% performance loss on this path.
2014-08-19 15:56:33 +02:00
Christoph Oelckers
a8e9c1832f - decided to restrict the 2.0 beta to OpenGL 4.x with GL_ARB_buffer_storage extension and removed all code for supporting older versions.
Sadly, anything else makes no sense.
All the recently made changes live or die, depending on this extension's presence.
Without it, there are major performance issues with the buffer uploads. All of the traditional buffer upload methods are without exception horrendously slow, especially in the context of a Doom engine where frequent small updates are required.
It could be solved with a complete restructuring of the engine, of course, but that's hardly worth the effort, considering it's only for legacy hardware whose market share will inevitably shrink considerably over the next years.
And even then, under the best circumstances I'd still get the same performance as the old immediate mode renderer in GZDoom 1.x and still couldn't implement the additions I'd like to make.

So, since I need to keep GZDoom 1.x around anyway for older GL 2.x hardware, it may as well serve for 3.x hardware, too. It's certainly less work than constantly trying to find workarounds for the older hardware's limitations that cost more time than working on future-proofing the engine.

This new, trimmed down 4.x renderer runs on a core profile configuration and uses persistently mapped buffers for nearly everything that is getting transferred to the GPU. (The global uniforms are still being used as such but they'll be phased out after the first beta release.
2014-08-01 22:42:39 +02:00
Christoph Oelckers
beabfad293 Merge branch 'master' into Glew_Version_For_Real 2014-07-28 22:23:56 +02:00
Christoph Oelckers
318aebc4ad - fixed: the vertex collection code used incorrect indices for checking the checkmap array. 2014-07-28 22:23:17 +02:00
Christoph Oelckers
29a56fe01c Merge branch 'master' into Glew_Version_For_Real 2014-07-27 17:59:50 +02:00
Christoph Oelckers
925305aa05 - fixed: The code for updating vertex dirty state had been completely missing. I have no idea when it disappeared... 2014-07-27 17:58:51 +02:00
Christoph Oelckers
97341fcb31 - reenabled the flat vertex buffer for GL 3.x NVidia hardware. On AMD and Intel it'll stay off because past tests have shown that it won't improve performance at all. 2014-07-27 13:46:35 +02:00
Christoph Oelckers
c1d8f235c2 - renamed some stuff that clashed with gl function names. 2014-07-27 12:33:54 +02:00
Christoph Oelckers
6c9a818220 - allow different render modes if persistent buffers are not available (untested!) 2014-07-26 10:23:07 +02:00
Christoph Oelckers
eb9d2d9917 - reactivate compatibility profile so that immediate mode drawing can be used on older hardware not supporting persistently mapped buffers.
- reactivate alpha testing per fixed function pipeline
- use the 'modern' way to define clip planes (GL_CLIP_DISTANCE). This is far more portable than the old glClipPlane method and a lot more robust than checking this in the fragment shader.
2014-07-17 02:37:18 +02:00
Christoph Oelckers
eedc5a69be - replaced builtin position vertex attribute. 2014-07-15 01:02:48 +02:00
Christoph Oelckers
1b7f5a2e6a - replaced builtin texture coordinate vertex attribute. 2014-07-15 00:59:01 +02:00
Christoph Oelckers
150135a07d - reinstate drawcall timing. 2014-07-13 23:14:28 +02:00