Fix: Always render editor quads

This commit is contained in:
def 2014-01-11 22:57:23 +01:00
parent aa64e86f12
commit 8d2828ed6f
3 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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++)

View file

@ -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()