mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix: Always render editor quads
This commit is contained in:
parent
aa64e86f12
commit
8d2828ed6f
|
@ -72,6 +72,7 @@ public:
|
||||||
// map render methods (gc_render_map.cpp)
|
// map render methods (gc_render_map.cpp)
|
||||||
static void RenderEvalEnvelope(CEnvPoint *pPoints, int NumPoints, int Channels, float Time, float *pResult);
|
static void RenderEvalEnvelope(CEnvPoint *pPoints, int NumPoints, int Channels, float Time, float *pResult);
|
||||||
void RenderQuads(CQuad *pQuads, int NumQuads, int Flags, ENVELOPE_EVAL pfnEval, void *pUser);
|
void RenderQuads(CQuad *pQuads, int NumQuads, int Flags, ENVELOPE_EVAL pfnEval, void *pUser);
|
||||||
|
void ForceRenderQuads(CQuad *pQuads, int NumQuads, int Flags, ENVELOPE_EVAL pfnEval, void *pUser);
|
||||||
void RenderTilemap(CTile *pTiles, int w, int h, float Scale, vec4 Color, int RenderFlags, ENVELOPE_EVAL pfnEval, void *pUser, int ColorEnv, int ColorEnvOffset);
|
void RenderTilemap(CTile *pTiles, int w, int h, float Scale, vec4 Color, int RenderFlags, ENVELOPE_EVAL pfnEval, void *pUser, int ColorEnv, int ColorEnvOffset);
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
@ -88,6 +88,11 @@ void CRenderTools::RenderQuads(CQuad *pQuads, int NumQuads, int RenderFlags, ENV
|
||||||
if(!g_Config.m_ClShowQuads || g_Config.m_ClShowEntities)
|
if(!g_Config.m_ClShowQuads || g_Config.m_ClShowEntities)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ForceRenderQuads(pQuads, NumQuads, RenderFlags, pfnEval, pUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRenderTools::ForceRenderQuads(CQuad *pQuads, int NumQuads, int RenderFlags, ENVELOPE_EVAL pfnEval, void *pUser)
|
||||||
|
{
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
float Conv = 1/255.0f;
|
float Conv = 1/255.0f;
|
||||||
for(int i = 0; i < NumQuads; i++)
|
for(int i = 0; i < NumQuads; i++)
|
||||||
|
|
|
@ -28,9 +28,9 @@ void CLayerQuads::Render()
|
||||||
Graphics()->TextureSet(m_pEditor->m_Map.m_lImages[m_Image]->m_TexID);
|
Graphics()->TextureSet(m_pEditor->m_Map.m_lImages[m_Image]->m_TexID);
|
||||||
|
|
||||||
Graphics()->BlendNone();
|
Graphics()->BlendNone();
|
||||||
m_pEditor->RenderTools()->RenderQuads(m_lQuads.base_ptr(), m_lQuads.size(), LAYERRENDERFLAG_OPAQUE, m_pEditor->EnvelopeEval, m_pEditor);
|
m_pEditor->RenderTools()->ForceRenderQuads(m_lQuads.base_ptr(), m_lQuads.size(), LAYERRENDERFLAG_OPAQUE, m_pEditor->EnvelopeEval, m_pEditor);
|
||||||
Graphics()->BlendNormal();
|
Graphics()->BlendNormal();
|
||||||
m_pEditor->RenderTools()->RenderQuads(m_lQuads.base_ptr(), m_lQuads.size(), LAYERRENDERFLAG_TRANSPARENT, m_pEditor->EnvelopeEval, m_pEditor);
|
m_pEditor->RenderTools()->ForceRenderQuads(m_lQuads.base_ptr(), m_lQuads.size(), LAYERRENDERFLAG_TRANSPARENT, m_pEditor->EnvelopeEval, m_pEditor);
|
||||||
}
|
}
|
||||||
|
|
||||||
CQuad *CLayerQuads::NewQuad()
|
CQuad *CLayerQuads::NewQuad()
|
||||||
|
|
Loading…
Reference in a new issue