Build 8642
SVN-
General
polymost.cpp: In gloadtile_art_indexed(), reallocate a texture when the tile changes dimensions even if it is shrinking
SVN handles and Git names are merged into one person.
polymost.cpp: In gloadtile_art_indexed(), reallocate a texture when the tile changes dimensions even if it is shrinking
polymost.cpp: fix buffer overflow issue in uploadpalswap() & correct the code to initialize an extra row of black pixels
gameexec.cpp: allow G_ShowView() to execute regardless of the state of g_screenCapture.
This fixes skyboxes not rendering in TILE_SAVESHOT.
sector.cpp: ensure that if scripts have told us not to render normally to the tile, that we still handle restoring our target & setting up the tile appropriately for what the script may have rendered
engine.cpp: make renderSetTarget() more robust so that passing an xsiz or ysiz <= 0 is not accepted and can't cause a segmentation fault
polymer.cpp: fix issue where assert could fail due to HUD model sprites having an owner >= MAXSPRITES
polymost.cpp: Fix issue where tiles whose dimensions had grown would not have their sizes updated in GL and could fail to update their texture data
polymost.cpp: If a tile in the tilesheet is large enough to fit a redefined tile, use that space rather than allocating a new texture
polymost.cpp: if an indexed colour tile is being reloaded, changed dimensions, and no longer matches the calculated tilesheets, generate a separate texture for it.
Similarly, if the tile does match the calculated tilesheets but was a separate texture, delete the texture and load the tile back into the tilesheet.
polymost_scansector(): avoid using a culling method not designed for voxels when handling 1-sided wall aligned sprites that have voxel replacements
Fix rendering skyboxes to a tile by altering renderSetTarget() & renderRestoreTarget() to set & reset xdim & ydim so that G_ShowView() can render while a render target is set,
and additionally modifying G_SetupCamTile() to call EVENT_DISPLAYROOMSCAMERATILE after calling renderSetTarget()
Add updatesectorneighbour() and updatesectorneighbourz() and make them accessible to CON to allow searching for nearby neighbouring sectors from a known sector.
These updatesector counterparts are more performant for tasks that require determining whether nearby sectors exist at a point as they will not exhaustively search the map. This also leads to more correct behaviour when sectors are disjoint, as queries will breadth-first search neighbouring sectors rather than risk accidentally stumbling first across accomodating disjoint sectors.
Fix edge case where mirrors & TROR could interact and render over skyboxes in the classic software renderer
osdfuncs.cpp: fix OSD background sometimes not rendering with the correct gl state
Support clamping in polymost1Frag.glsl and use it for sprites
Separate out polymost1Frag and polymost1Vert shaders from polymost.cpp and add rules for building in the GNUmakefile.
Additionally, git ignore the shader's generated headers folder.
polymost.cpp: Adjust shaders to use texture2DGradARB() if available
Fix 32-bit Polymost issues by enabling SSE instructions and setting GCC to use SSE floating point math exclusively.
Additionally, enable SSE2 to better match 64-bit builds and use -malign-double for the potential performance benefit.
game.cpp: When A_Spawn() is spawning from an already existing sprite, do not reset the owner field if it has been overridden from the default.
polymost.cpp: Fix polymost_domost() issue with COMBINE_STRIPS where in certain cases, merging with the viewport nodes caused accidental reading of sentinel node values.
Additional debug code is included for visualizing the state of the vsp data structure. Further, fix issue in drawpoly where it would access out of bounds of dpxy if fewer than 3 vertices were passed in and fix issue where multiple calls to polymost_setVisibility() were repeatedly setting the visibility factor to the same value.
Use stencil buffer in Polymost to restrict mirrors to only render within the region of the screen occupied by the mirror wall.
Additionally, raise minimum number of stencil buffer bits to accomodate future use of the stencil buffer.
Add EVENT_RESETGOTPICS which gives scripts the chance to reset gotpics (and similar effects trackers) for effects that run in EVENT_DISPLAYROOMS.
EVENT_RESETGOTPICS is called after the last call to EVENT_DISPLAYROOMS in a frame, but before any engine-side calls to renderDrawRoomsQ16()
Fix TROR & skyboxes to work with mirrors in Software & Polymost
engine.cpp: fix sprite sorting/adjustment issue introduced in r7612 that caused sprites with the same y value at the end of the sorted array to not be adjusted properly
polymost.cpp: Fix issue where state would not be reset properly in polymost_drawmaskwall() when rendering translucent maskwalls with no texture
polymost.cpp: fix polymost_dorotatesprite() alpha test/blend issue introduced in r7619
polymost.cpp: fix issue where floors & ceilings with DAMETH_MASKPROPS were not being blended
engine.cpp: fix bug in killsprite where sprites were not being removed properly after sorting changes
Fix Polymer skybox bug introduced in r7620
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().
polymost.cpp: switch from writing gl_FragColor to writing gl_FragData[0] in order to reduce VGPR usage on AMD cards
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
engine.cpp: lintersect(): use klabs() instead of abs()