Build 7622
SVN-
General
Fix Polymer skybox bug introduced in r7620
SVN handles and Git names are merged into one person.
Fix Polymer skybox bug introduced in r7620
Fix polymost_drawtilescreen() to not be improperly affected by globalshade.
Remove enabling/disabling of deprecated GL_TEXTURE_2D in Polymost.
For Polymer, temporarily workaround coupling with Polymost and usage of the fixed-function pipeline. Additionally, fix typo in polymost_printtext256().
Reduce state changes and fix translucent maskwall depth buffer issue
Fix maskwall array indirection bug and two if conditional oversights from r7612
Fix depth buffer issue causing translucent sprites to not render properly in Polymost.
Use polymost_spriteHasTranslucency() and polymost_maskWallHasTranslucency() to determine if a sprite has translucency. Optimize sprite rendering when in Polymost by only sorting sprites with translucency.
polymost.cpp: fix fragment shader issue where fullbrights in a texture could affect rendering when u_useColorOnly was enabled
Fix issue where swingdoors would refuse to open or close if an enemy was in front of the door in an overlapping but unrelated/disjoint sector
engine.cpp: lintersect(): fix integer overflow and negative case issue
Re-introduce earlier lintersect() work that was reverted.
engine.cpp/.h: clean up & fix lintersect(). Additionally, add support for finding intersections of collinear line segments. This reverts r7290.
engine.cpp: fix crash when calling `setrendermode 3` where PolymostProcessVoxels would be called before Polymost is initialized.
PolymostProcessVoxels would call videoNextPage during processing which would attempt to render the OSD and lead to a segfault due to Polymost not being properly initialized.
polymost.h: fix order of parameters to match polymost.cpp
polymost.cpp: fix lockup bug that would occur with polymost_waitForSubBuffer() when glClientWaitSync consistently returned GL_WAIT_FAILED on certain hardware/drivers.
Additionally, fix conditional check for r_persistentStreamBuffer requirements in polymost_glinit().
Support software renderer upscaling engine-side in sdlayer and sdlayer12 with various scaling factors (beyond just pixel doubling).
When glsurface is available, use GL to upscale the render buffer. Additionally, fix build issues with sdlayer12 introduced by GLAD changes (r6656).
polymost.cpp: fix rendering for indexed colour textures to match original behaviour when !r_usetileshades or globalflags & GLOBAL_NO_GL_TILESHADES
Additionally, fix issue in polymost_setShade() where shade calculation was happening after a check for whether or not the shade needed to be updated.
sdlayer.cpp: fix software renderer crash affecting Mapster32 due to improper handling of lockcount in videoBeginDrawing()/videoEndDrawing() when using glsurface
glsurface.h/.cpp: change how the palette is handled and fix tinting/fading
Don't allow GL modes if GL Major Version is less than 2.
Additionally, fix build issues for RENDERTYPE=WIN introduced in r6827.
astub.cpp: fix issue where globalpal was not declared if polymost.h was not included
engine.cpp: fix issue introduced in r6905 where voxels with fractional scaling would not be handled correctly in Polymost
tiles.cpp: fix texcache.cpp:CLEAR_GL_ERRORS() hang on some drivers when trying to create GL textures for tiles when we have no GL context.
This could occur when returning to 2D mode from 3D mode in Mapster32 as videoSet2DMode() does not affect the result of videoGetRenderMode() despite destroying the GL context.
engine.cpp: fix issue with voxmodel_t voxels not having their scale set properly due to defs being processed before PolymostProcessVoxels()
engine.cpp: fix classicDrawVoxel() positioning bugs by:
+avoid adding the pivot's z offset again after it was already added in classicDrawSprite() +offset the voxel object by half of the voxel object's z size
polymost_drawpoly(): fix issue where mirrors wouldn't update the depth buffer
engine.cpp/.h: clean up & fix lintersect(). Additionally, add support for finding intersections of collinear line segments.
polymost_bindPth(): Fix issue where non-indexed colour, non-hightile textures (including those with polytintflags HICTINT_USEONART or HICTINT_ALWAYSUSEART) would not render correctly while r_useindexedcolortextures is set.