Commit graph

96 commits

Author SHA1 Message Date
Christoph Oelckers
7f3e18a6cc - fixed a few memory leaks. 2017-01-11 11:37:27 +01:00
alexey.lysiuk
9ed2da176e Fixed signed/unsigned mismatch in comparisons
No more 'comparison of integers of different signs' warnings reported by GCC/Clang
2017-01-06 10:40:51 +01:00
ZZYZX
c845fc126a Enabled user shader for a cameratexture 2016-12-31 12:17:24 +01:00
Christoph Oelckers
a3070e8846 - fixed: FGLTexture::CreateTexBuffer needs to be more careful with setting the texture's translucency information.
First, if it has already been determined the value should be left alone and second, for translated textures the generated buffer is inconclusive so in that case it cannot be used at all.
2016-12-29 14:33:53 +01:00
Magnus Norddahl
bea113a908 Fix tonemap texture filtering (black screen) regression 2016-11-28 02:32:57 +01:00
Christoph Oelckers
96437d95fa - use the new ZDoom code for retrieving a sky's cap color to avoid redundancies. 2016-10-20 10:36:23 +02:00
alexey.lysiuk
c3ced5842a Added multithreaded upscaling with xBRZ (macOS only) 2016-10-14 17:14:49 +03:00
alexey.lysiuk
58d44e89c9 Use single helper for xBRZ scalers 2016-10-14 17:03:26 +03:00
Christoph Oelckers
8b6e09ca09 - changed the license of the OpenGL renderer to LGPL v3.
This was done to clean up the license and to ensure that any commercial fork of the engine has to obey the far stricter requirements concerning source distribution. The old license was compatible with GPLv2 whereas combining GPLv2 and LGPLv3 force a license upgrade to GPLv3. The license of code that originates from ZDoomGL has not been changed.
2016-09-14 20:01:13 +02:00
Christoph Oelckers
a5c0f9a548 - use the predefined fullscreen vertices for clearing a portal instead of using the quad drawer. 2016-09-06 11:58:22 +02:00
Christoph Oelckers
95bedac6ca - inlined FHardwareTexture::GetTexDimension. 2016-09-04 13:14:14 +02:00
Christoph Oelckers
aece9aaa58 - added xBRZ texture scaler after clearing the licensing conditions. A screenshot of the confirmation that this is ok has been added to the 'licenses' folder. 2016-09-03 14:01:51 +02:00
Christoph Oelckers
3389a5a74e - removed most of the specific options for legacy hardware and consolidated them in one variable (does not work yet.) 2016-09-01 11:52:52 +02:00
Christoph Oelckers
03d055a5ec - adjustments for message modes. 2016-08-28 10:11:09 +02:00
Magnus Norddahl
960038bb81 Clear global state tracking variables when the OpenGL context is (re)created 2016-08-26 01:36:21 +02:00
Magnus Norddahl
d380d765c9 OpenGL object labels and debug groups 2016-08-17 23:18:47 +02:00
Magnus Norddahl
41e959e102 Adds the last texture filter mode (trilinear min filter with nearest magnification) 2016-07-23 18:57:37 +02:00
Christoph Oelckers
15933f9c72 - fixed: Texture precaching for sprites had some inverted logic and deleted everything that was still required. 2016-05-10 20:51:23 +02:00
Christoph Oelckers
0e14f00b51 - fixed caching of texture sampler state for old hardware.
- fixed handling of CLAMP_XY_NOMIP sampler mode. This cannot be lumped together with CLAMP_XY because it has different mipmap requirements.
2016-05-03 13:39:41 +02:00
Christoph Oelckers
942138b307 - undid some leftover texture state checks from the first attempt to handle this without sampler objects.
This code was written under the assumption that the glGenerateMipmap function does not exist. But all supported hardware has this function through the GL_EXT_framebuffer_object extension.
2016-05-03 11:27:52 +02:00
Christoph Oelckers
6f2b0a6293 - rewrote texture caching so that not the base texture but the actually used translations for sprites get precached. 2016-05-03 01:00:52 +02:00
alexey.lysiuk
4c4b97316e Fixed inconsistent texture wrapping
Sampler state needs to be reseted when hardware texture resources are released
2016-05-02 13:02:55 +03:00
Christoph Oelckers
24526f7da5 - made adjustments to floating point bounding boxes for nodes and changes to the WarpBuffer function. 2016-05-01 11:56:45 +02:00
Christoph Oelckers
e3fad118d2 - use the templated warp functions instead of the limited GZDoom 1.x version. gl_WarpBuffer has been removed. 2016-04-28 19:04:01 +02:00
Christoph Oelckers
9d71c91f01 - reenabled software warping for shader-less rendering. 2016-04-26 20:20:00 +02:00
Christoph Oelckers
913e3df7e3 - fixed display of alpha textures without shaders.
As it turned out, the translation's alpha channel was clobbered by the whole setup.
2016-04-26 19:11:32 +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
a17e0b70d2 - adjustment for function name changes. 2016-04-23 11:38:33 +02:00
Christoph Oelckers
c786b65727 - allow the engine to run without sampler objects. This will create some overhead in the texture code, but that's still better than having to error out on those few systems where it may be an issue. 2016-04-22 19:54:51 +02:00
Christoph Oelckers
caf80e74c4 - fixed multiplication/division mixup in TextureAdjustWidth.
- fixed: For top textures an incorrect ceiling height was passed to DoTexture.
2016-04-13 23:09:45 +02:00
Christoph Oelckers
84c8f38038 - fixed: The divisions in FTexCoordInfo::TextureOffset and RowOffset were turned into multiplications when converting to floating point. 2016-04-10 00:45:48 +02:00
Christoph Oelckers
4d5671d654 - floatified the texture coordinate code. 2016-04-08 01:42:43 +02:00
Christoph Oelckers
eaf055dff4 - floatified the remaining parts of gl_walls.cpp. 2016-04-08 00:19:51 +02:00
Christoph Oelckers
123d503492 Merge branch 'master' into floatcvt 2016-04-04 12:25:36 +02:00
alexey.lysiuk
cbcde3a950 Fixed check for alpha channel in texture to select hqNx upscaling mode
Now it's the initial check with the adjustment in mode indices only, as old hqNx MMX indices (4..6) are now occupied by generic hqNx implementation
See http://forum.drdteam.org/viewtopic.php?t=6872
2016-04-04 12:13: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
alexey.lysiuk
7134f53638 - fixed: partial transparency wasn't taken into account
Smoothing of edges could mark textures as non-transparent when hqNx upscale filter is used
See http://forum.drdteam.org/viewtopic.php?t=6812
2016-03-09 13:17:42 +02:00
Christoph Oelckers
bd98182095 - fixed: The check for missing textures in Vavoom skyboxes was inverted. 2016-02-09 15:23:45 +01:00
Christoph Oelckers
22e9fc9b76 - re-fixed FTexture::CheckTrans
The original broken code had it always reset the translucency info to 'not present'.
The first fix completely removed that line, although it was merely misplaced, but still necessary to avoid constant re-checking of the same texture.
2016-02-02 11:37:39 +01:00
Christoph Oelckers
37ac6ef9a0 - fixed: Translucency detection for GL textures was broken.
- fixed: Textures which are already scaled should not be upsampled.
- fixed: The transparency check in the upscaling code checked the wrong modes for exclusion when handling translucent textures.
2016-01-30 02:13:47 +01:00
Christoph Oelckers
d037493ffe - fixed handling of FF_FADEWALLS on 3D floors. The problems with the old method became quite obvious in the demo map after the light list bug got fixed. 2016-01-29 17:13:14 +01:00
Christoph Oelckers
685385635f - made adjustments to FGLBitmap for the changes in its base class. 2016-01-26 12:05:40 +01:00
alexey.lysiuk
1c5d0ccd65 - enabled hqNx MMX on all platforms with Intel intrinsics support 2015-12-25 15:41:06 +02:00
alexey.lysiuk
19ae244f66 - fixed: allow to use all hqNx texture upscale modes 2015-12-25 09:52:27 +02:00
Christoph Oelckers
bead3e046b - fixed weapon positioning again, after finding out that the first fix just worked around the actual problem: The entire coordinate calculation must be done in floating point with no integer math at all. Due to roundoff errors the stored int values needed for wall and flat placement significantly lack precision and with the high scaling factor that needs to be used for weapon HUD sprites these can easily become several pixels. After fixing this the border around sprite textures could be reverted to one pixel again.
- fixed: The 'may not be expanded' state should be stored in the texture and reused later. This also needs to revalidate the material if it decides that expansion should be disallowed.
2015-04-04 17:50:22 +02:00
Christoph Oelckers
91eafed5d3 - fixed coordinate calculations for trimmed sprites which were quite a bit broken. 2015-04-04 13:37:55 +02:00
Christoph Oelckers
67334bfa2b - calculate weapon positions fully in floating point to avoid roundoff errors.
- In order to get reliable results the empty border around scaled sprites must be the same scale as the sprite (i.e. 2 pixels for 2x scale and 4 pixels for 4x scale.)
2015-04-04 12:35:10 +02:00
Christoph Oelckers
1e9a6e667e - GL code adjustments for reworked precaching. 2015-04-01 11:59:41 +02:00
Christoph Oelckers
d4d041d5fc - fixed: FMaterial::ValidateTexture must determine whether to expand sprites before actually constructing the FMaterial object. 2015-01-08 18:44:55 +01:00