mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 21:51:09 +00:00
This commit is contained in:
commit
82ee9e7399
8 changed files with 24 additions and 27 deletions
|
@ -483,7 +483,7 @@ FTextureID gl_GetSpriteFrame(unsigned sprite, int frame, int rot, angle_t ang, b
|
|||
|
||||
//==========================================================================
|
||||
//
|
||||
// Recalculate all heights affectting this vertex.
|
||||
// Recalculate all heights affecting this vertex.
|
||||
//
|
||||
//==========================================================================
|
||||
void gl_RecalcVertexHeights(vertex_t * v)
|
||||
|
|
|
@ -623,20 +623,6 @@ void gl_CleanLevelData()
|
|||
mo=next;
|
||||
}
|
||||
|
||||
for(auto &v : level.vertexes) if (v.numsectors > 0)
|
||||
{
|
||||
if (v.sectors != nullptr)
|
||||
{
|
||||
delete [] v.sectors;
|
||||
v.sectors = nullptr;
|
||||
}
|
||||
if (v.heightlist != nullptr)
|
||||
{
|
||||
delete [] v.heightlist;
|
||||
v.heightlist = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (level.sides.Size() > 0 && level.sides[0].segs)
|
||||
{
|
||||
delete [] level.sides[0].segs;
|
||||
|
|
|
@ -164,7 +164,7 @@ void FGLRenderer::Initialize(int width, int height)
|
|||
}
|
||||
else mVAOID = 0;
|
||||
|
||||
gllight = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/gllight.png"), FTexture::TEX_MiscPatch);
|
||||
if (gl.legacyMode) gllight = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/gllight.png"), FTexture::TEX_MiscPatch);
|
||||
glpart2 = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart2.png"), FTexture::TEX_MiscPatch);
|
||||
glpart = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart.png"), FTexture::TEX_MiscPatch);
|
||||
mirrortexture = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/mirror.png"), FTexture::TEX_MiscPatch);
|
||||
|
@ -196,6 +196,7 @@ FGLRenderer::~FGLRenderer()
|
|||
if (mLights != NULL) delete mLights;
|
||||
if (glpart2) delete glpart2;
|
||||
if (glpart) delete glpart;
|
||||
if (gllight) delete gllight;
|
||||
if (mirrortexture) delete mirrortexture;
|
||||
if (mFBID != 0) glDeleteFramebuffers(1, &mFBID);
|
||||
if (mVAOID != 0)
|
||||
|
|
|
@ -394,16 +394,20 @@ bool FTexture::FindHoles(const unsigned char * buffer, int w, int h)
|
|||
}
|
||||
if (startdraw==0 && lendraw==h) return false; // nothing saved so don't create a split list
|
||||
|
||||
FloatRect * rcs = new FloatRect[gapc];
|
||||
|
||||
for(x=0;x<gapc;x++)
|
||||
if (gapc > 0)
|
||||
{
|
||||
// gaps are stored as texture (u/v) coordinates
|
||||
rcs[x].width=rcs[x].left=-1.0f;
|
||||
rcs[x].top=(float)gaps[x][0]/(float)h;
|
||||
rcs[x].height=(float)gaps[x][1]/(float)h;
|
||||
FloatRect * rcs = new FloatRect[gapc];
|
||||
|
||||
for (x = 0; x < gapc; x++)
|
||||
{
|
||||
// gaps are stored as texture (u/v) coordinates
|
||||
rcs[x].width = rcs[x].left = -1.0f;
|
||||
rcs[x].top = (float)gaps[x][0] / (float)h;
|
||||
rcs[x].height = (float)gaps[x][1] / (float)h;
|
||||
}
|
||||
gl_info.areas = rcs;
|
||||
}
|
||||
gl_info.areas=rcs;
|
||||
else gl_info.areas = nullptr;
|
||||
gl_info.areacount=gapc;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -764,7 +764,7 @@ void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1,
|
|||
int spiralduration = (duration == 0) ? 35 : duration;
|
||||
|
||||
p->alpha = 1.f;
|
||||
p->ttl = duration;
|
||||
p->ttl = spiralduration;
|
||||
p->fadestep = FADEFROMTTL(spiralduration);
|
||||
p->size = 3;
|
||||
p->bright = fullbright;
|
||||
|
|
|
@ -1488,7 +1488,7 @@ void P_SetRenderSector()
|
|||
seg = ss->firstline;
|
||||
for(j=0; j<ss->numlines; j++)
|
||||
{
|
||||
if(seg->sidedef && (seg->PartnerSeg == nullptr || seg->sidedef->sector!=seg->PartnerSeg->sidedef->sector))
|
||||
if(seg->sidedef && (seg->PartnerSeg == nullptr || (seg->PartnerSeg->sidedef != nullptr && seg->sidedef->sector!=seg->PartnerSeg->sidedef->sector)))
|
||||
{
|
||||
ss->render_sector = seg->sidedef->sector;
|
||||
break;
|
||||
|
|
|
@ -156,6 +156,12 @@ struct vertex_t
|
|||
heightlist = NULL;
|
||||
}
|
||||
|
||||
~vertex_t()
|
||||
{
|
||||
if (sectors != nullptr) delete[] sectors;
|
||||
if (heightlist != nullptr) delete[] heightlist;
|
||||
}
|
||||
|
||||
bool operator== (const vertex_t &other)
|
||||
{
|
||||
return p == other.p;
|
||||
|
|
|
@ -1337,7 +1337,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE nothing, LPSTR cmdline, int n
|
|||
_CrtSetDbgFlag (_CrtSetDbgFlag(0) | _CRTDBG_LEAK_CHECK_DF);
|
||||
|
||||
// Use this to break at a specific allocation number.
|
||||
//_crtBreakAlloc = 53039;
|
||||
_crtBreakAlloc = 124459;
|
||||
#endif
|
||||
|
||||
DoMain (hInstance);
|
||||
|
|
Loading…
Reference in a new issue