mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- some hackery to make the camera textures in DN3D work again.
They depend on a deleted texture not writing to the depth buffer, but other parts in the engine like ROR surfaces depend on them writing a proper depth buffer value, so for now there is a global variable that allows to exclude a single tile from ever getting rendered.
This commit is contained in:
parent
72889540a5
commit
381e53017d
5 changed files with 13 additions and 2 deletions
|
@ -1204,6 +1204,7 @@ int32_t engineLoadBoardV5V6(const char *filename, char fromwhere, vec3_t *dapos,
|
||||||
# include "polymost.h"
|
# include "polymost.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern int skiptile;
|
||||||
|
|
||||||
static vec2_t const zerovec = { 0, 0 };
|
static vec2_t const zerovec = { 0, 0 };
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ Ken Silverman's official web site: http://www.advsys.net/ken
|
||||||
#include "flatvertices.h"
|
#include "flatvertices.h"
|
||||||
#include "palettecontainer.h"
|
#include "palettecontainer.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
|
#include "gamecontrol.h"
|
||||||
|
|
||||||
CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
@ -314,9 +315,12 @@ static void polymost_updaterotmat(void)
|
||||||
|
|
||||||
static void polymost_flatskyrender(vec2f_t const* const dpxy, int32_t const n, int32_t method, const vec2_16_t& tilesiz);
|
static void polymost_flatskyrender(vec2f_t const* const dpxy, int32_t const n, int32_t method, const vec2_16_t& tilesiz);
|
||||||
|
|
||||||
|
// Hack for Duke's camera until I can find out why this behaves erratically.
|
||||||
|
int skiptile = -1;
|
||||||
|
|
||||||
static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32_t method, const vec2_16_t &tilesize)
|
static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32_t method, const vec2_16_t &tilesize)
|
||||||
{
|
{
|
||||||
if (method == DAMETH_BACKFACECULL ||
|
if (method == DAMETH_BACKFACECULL || globalpicnum == skiptile ||
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
g_nodraw ||
|
g_nodraw ||
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5740,6 +5740,8 @@ int GameInterface::app_main()
|
||||||
|
|
||||||
tileDelete(MIRROR);
|
tileDelete(MIRROR);
|
||||||
|
|
||||||
|
skiptile = W_FORCEFIELD + 1;
|
||||||
|
|
||||||
Gv_ResetSystemDefaults(); // called here to populate our fake tilesizx and tilesizy arrays presented to CON with sizes generated by dummytiles
|
Gv_ResetSystemDefaults(); // called here to populate our fake tilesizx and tilesizy arrays presented to CON with sizes generated by dummytiles
|
||||||
|
|
||||||
if (numplayers == 1 && boardfilename[0] != 0)
|
if (numplayers == 1 && boardfilename[0] != 0)
|
||||||
|
|
|
@ -91,7 +91,8 @@ FHardwareTexture* GLInstance::CreateIndexedTexture(FGameTexture* tex)
|
||||||
|
|
||||||
FHardwareTexture* GLInstance::CreateTrueColorTexture(FGameTexture* tex, int palid, bool checkfulltransparency, bool rgb8bit)
|
FHardwareTexture* GLInstance::CreateTrueColorTexture(FGameTexture* tex, int palid, bool checkfulltransparency, bool rgb8bit)
|
||||||
{
|
{
|
||||||
if (tex == TexMan.GameByIndex(0)) return nullptr;
|
if (tex == TexMan.GameByIndex(0))
|
||||||
|
return nullptr;
|
||||||
auto texbuffer = tex->GetTexture()->CreateTexBuffer(palid, checkfulltransparency? 0: CTF_ProcessData);
|
auto texbuffer = tex->GetTexture()->CreateTexBuffer(palid, checkfulltransparency? 0: CTF_ProcessData);
|
||||||
// Check if the texture is fully transparent. When creating a brightmap such textures can be discarded.
|
// Check if the texture is fully transparent. When creating a brightmap such textures can be discarded.
|
||||||
if (checkfulltransparency)
|
if (checkfulltransparency)
|
||||||
|
|
|
@ -7130,6 +7130,9 @@ int GameInterface::app_main()
|
||||||
G_PostLoadPalette();
|
G_PostLoadPalette();
|
||||||
|
|
||||||
tileDelete(MIRROR);
|
tileDelete(MIRROR);
|
||||||
|
|
||||||
|
skiptile = W_FORCEFIELD + 1;
|
||||||
|
|
||||||
if (RR)
|
if (RR)
|
||||||
tileDelete(0);
|
tileDelete(0);
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
|
|
Loading…
Reference in a new issue