Commit graph

231 commits

Author SHA1 Message Date
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
bca47bb9bc - removed debug code.
- fixed: planes that are created by splitting translucent 3D-floors may never be rendered.
2014-10-23 17:35:58 +02:00
Christoph Oelckers
36b35e85f3 - fixed: overflow checks for dynamic light buffer were not correct. 2014-10-23 12:06:00 +02:00
Christoph Oelckers
066e53ae4c - fixed: sprites rendered as 'bright' should not be affected by dynamic lights. 2014-10-23 10:54:26 +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
5302a10a7d - diable software lighting for textured automap.
* since it is designed for software-style light diminishing it doesn't work for 2D.
* additionally it left the lighting state in an unsuitable setting for further 2D rendering.
2014-10-23 09:19:30 +02:00
Christoph Oelckers
89ce0b8cb7 - test if GLSL version 1.4 can handle uniform buffers on old Intel hardware without making problems... 2014-10-22 16:54:26 +02:00
Christoph Oelckers
9f1f17c306 - fixed: The PolyBSPs weren't fully initialized. Some GZDoom-only fields in the segs were skipped. 2014-10-14 08:54:08 +02:00
Christoph Oelckers
5d032f3fcf - fixed: Since the engine can no longer change renderers on the fly, thanks to ZDoom's messed up video startup code, we have to abort with a fatal error if we can't create a GL context. Otherwise the user will never see a meaningful message. 2014-10-06 10:00:02 +02:00
Christoph Oelckers
3e2a17538b - fixed: HUD weapons were affected by dynamic lights even when the CVARs said that they shouldn't. 2014-10-06 09:05:42 +02:00
Christoph Oelckers
ead8a2874d - fixed: The texture mode implied by render style did not work for models. 2014-10-05 12:03:55 +02:00
Christoph Oelckers
fd3128a164 - fixed: When changing enhanced nightvision mode the shaders need to have their fixed colormap state reset to ensure that the new settings get used.
- fixed: The shader code for handling special fixed colormaps did not use the color vertex attribute which was most evident with the 'shadow' render style on the spectre.
2014-10-05 09:40:36 +02:00
Christoph Oelckers
48da2f87bb - fixed: The light buffer index must not be reset between rendering a camera texture and the main scene.
Since rendering is asynchronous, the camera texture scene may not be finished once the main scene's lights get filled in. Unfortunately forcing a synchronization with glFinisg has bad side effects on performance the only remaining option is to use separate parts of the buffer for both scenes, which in extreme cases may increase the light buffer's size - but on modern hardware that shouldn't be a problem.
2014-09-21 21:01:11 +02:00
Christoph Oelckers
b2cf7d6512 - fixed memory leak: The sector links for dynamic lights were never freed. 2014-09-21 12:40:08 +02:00
Christoph Oelckers
7359631a43 - fixed weapon drawing rules to account for the death camera. 2014-09-21 11:08:38 +02:00
Christoph Oelckers
4682736585 - fixed: non-tiled mid textures on a fog boundary require some special clamping to be performed in the shader. 2014-09-21 11:08:17 +02:00
Christoph Oelckers
da87a34a6f - fixed: MODELDEF's FrameIndex command was case sensitive. 2014-09-21 09:40:41 +02:00
Christoph Oelckers
43e2d704a3 - always use glPolygonOffset to render translucent geometry. 2014-09-20 09:04:36 +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
c5e00dbc53 fixed: The sampler object for camera textures was never initialized. 2014-09-17 10:52:34 +02:00
Christoph Oelckers
c773a500f2 - only activate shader storage buffers on modern drivers also supporting GL_ARB_buffer storage. Early adopters of this extension (i.e. older AMD drivers mainly) tend to implement this badly. 2014-09-17 09:01:16 +02:00
Christoph Oelckers
a25ed3c807 - fixed: inverted rendering for fuzzy things with light powerup was switched off due to change of render style. 2014-09-15 12:15:19 +02:00
Christoph Oelckers
8e7e16f73a - fixed: The light uniform buffer may not be mapped with GL_MAP_INVALIDATE_BUFFER_BIT, because it needs to be mapped for each portal in a scene but it must preserve the existing data for the remaining translucent objects. 2014-09-15 10:27:09 +02:00
Christoph Oelckers
32f08adaf3 - moved some code to better places.
- allow GL version 3.0 in Windows, too.
2014-09-14 23:01:57 +02:00
Ralgor
5cc43137a1 Only require OpenGL 3.0 compatibility profile. 2014-09-14 14:43:42 -05:00
Ralgor
cfc8f3dbbf Global GL render context shouldn't be initialized inside of gl_PrintStartupLog, since it's not compiled in non MSC builds. 2014-09-14 14:42:14 -05:00
Ralgor
1a70a6aabc The light buffer should check for shader_storage_buffer_object rather than buffer_storage. 2014-09-14 14:29:13 -05:00
Ralgor
ddf58b43c9 Fix compile errors on linux. 2014-09-14 14:28:05 -05:00
Christoph Oelckers
3c2f1952fd Merge branch 'master' into v2.x 2014-09-12 21:01:55 +02:00
Christoph Oelckers
25951362fc - fixed: When applying Boom's Transfer_Heights effect to a sector, gl_FakeFlat needs to remove all portals from the original sector planes that are being replaced in the sector copy. 2014-09-11 13:02:39 +02:00
Christoph Oelckers
acf6c259d8 - changed the handling of alpha textures. The only special case they need is with palette-less textures and this can be handled far more easily and robustly with a predefined translation instead of passing another parameter through all the layers of the texture management code. This also fixes problems with paletted PNGs that get used as an alpha texture because the old method clobbered the image's palette. 2014-09-09 13:21:36 +02:00
Christoph Oelckers
4bb320a27c - route texture binding through the renderstate class for better control. Currently it's just a direct passthrough but this will change. 2014-09-09 12:00:42 +02:00
Christoph Oelckers
d5633701b4 - swapped order of textures in burn shader to avoid some problems with the texture samplers.
- fixed: texture sampler state for the burn texture was never set.
2014-09-09 10:17:44 +02:00
Christoph Oelckers
c6f4c0b6f0 - fixed: FMaterial's tex pointer could be accessed before it was set.
- allow more than two texture units in shaders.
2014-09-09 10:03:34 +02:00
Christoph Oelckers
62880f113b - 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-09-09 08:47:39 +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
alexey.lysiuk
e29fce6951 Fixed missing transparency on upscaled textures
Textures with diagonal patterns were treated as opaque after resizing
Images upscaled by hqNx were affected mostly by this issue

http://forum.drdteam.org/viewtopic.php?f=24&t=5370
http://zandronum.com/tracker/view.php?id=269
http://zandronum.com/tracker/view.php?id=315
2014-09-07 11:52:51 +03:00
Christoph Oelckers
b96dd6c421 - fixed: The missing fourth component of the texture coordinate must be filled with 1.0, not 0.0 before applying the texture matrix. Not doing so will cancel out the translation part of the matrix. 2014-09-02 10:31:48 +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
a280c20b4e - fixed: If we want to cache texture binding state we have to reset it in all places where a texture becomes unbound. 2014-08-31 19:00:17 +02:00
Christoph Oelckers
12160bd29c - remove some obsolete code from decal rendering.
- avoid rebinding the same texture multiple times, as there's considerable overhead in the texture manager.
- check gl_sort_textures only once per scene, not per draw list.
2014-08-30 15:34:14 +02:00
Christoph Oelckers
6a3cd6378a - found out that reading the CPU's real time clock costs a not insignificant amount of time so this is now only done when either the benchmark command is running or the rendertimes are shown. 2014-08-30 14:33:06 +02:00
Christoph Oelckers
49ec7beb8f - separate draw lists for walls and flats. This makes the sorting much more efficient because draw types no longer need to be checked in the compare function. This is a lot more important than having perfect texture order. 2014-08-30 13:04:41 +02:00
Christoph Oelckers
a903cbe12e - sorting draw items by light level no longer makes sense so remove all corresponding code from dicmp. 2014-08-24 13:10:45 +02:00
Christoph Oelckers
bf03d02228 - print OpenGL profile type in startup log. 2014-08-24 01:09:44 +02:00
Christoph Oelckers
904cc2e158 - some code cleanup. 2014-08-23 18:54:24 +02:00
Christoph Oelckers
bf6079af46 - fixed incorrect check for overrideshader. 2014-08-23 00:47:05 +02:00
Christoph Oelckers
1050013017 major cleanup of the texture manager:
- use sampler objects to avoid creating up to 4 different system textures for one game texture just because of different clamping settings.
- avoids flushing all textures for change of texture filter mode.
- separate sprite and regular dimensions on the material level to have better control over which one gets used. It's now an explicit parameter of ValidateTexture. The main reason for this change is better handling of wall sprites which may not be subjected to such handling.
- create mipmaps based on use case, not texture type.
- allows removal of FCloneTexture hack for proper sharing of the same sprite for decals and other purposes.
- better precaching of skyboxes.
2014-08-22 23:50:38 +02:00
Christoph Oelckers
274a4216ea - disabling inlining in the GL loader produces an executable that's 8kb smaller. 2014-08-21 11:47:53 +02:00