diff options
| author | BeaR <cinaera@web.de> | 2012-10-14 14:04:48 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2013-02-24 18:23:06 +0100 |
| commit | d58afefaae99f239151483025e516e8da5b6dd17 (patch) | |
| tree | 3af78094b1cbb5a9b8824aecf44e1b7e742d3181 /src/game/editor/layer_tiles.cpp | |
| parent | 0be51ca98aec2f44cd01a5bf7c3a78fdfd78ea3d (diff) | |
| download | zcatch-d58afefaae99f239151483025e516e8da5b6dd17.tar.gz zcatch-d58afefaae99f239151483025e516e8da5b6dd17.zip | |
Some graphic batching:
Speed up for displaying debugtext and envelopepreview (This reduces the performance hit especially for the 'Show Info' mode in the editor) Conflicts: src/engine/client/client.cpp src/game/editor/editor.cpp src/game/editor/editor.h
Diffstat (limited to 'src/game/editor/layer_tiles.cpp')
| -rw-r--r-- | src/game/editor/layer_tiles.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/editor/layer_tiles.cpp b/src/game/editor/layer_tiles.cpp index 325d527b..032f391f 100644 --- a/src/game/editor/layer_tiles.cpp +++ b/src/game/editor/layer_tiles.cpp @@ -338,6 +338,7 @@ void CLayerTiles::ShowInfo() float ScreenX0, ScreenY0, ScreenX1, ScreenY1; Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1); Graphics()->TextureSet(m_pEditor->Client()->GetDebugFont()); + Graphics()->QuadsBegin(); int StartY = max(0, (int)(ScreenY0/32.0f)-1); int StartX = max(0, (int)(ScreenX0/32.0f)-1); @@ -352,17 +353,18 @@ void CLayerTiles::ShowInfo() { char aBuf[64]; str_format(aBuf, sizeof(aBuf), "%i", m_pTiles[c].m_Index); - m_pEditor->Graphics()->QuadsText(x*32, y*32, 16.0f, 1,1,1,1, aBuf); + m_pEditor->Graphics()->QuadsText(x*32, y*32, 16.0f, aBuf); char aFlags[4] = { m_pTiles[c].m_Flags&TILEFLAG_VFLIP ? 'V' : ' ', m_pTiles[c].m_Flags&TILEFLAG_HFLIP ? 'H' : ' ', m_pTiles[c].m_Flags&TILEFLAG_ROTATE? 'R' : ' ', 0}; - m_pEditor->Graphics()->QuadsText(x*32, y*32+16, 16.0f, 1,1,1,1, aFlags); + m_pEditor->Graphics()->QuadsText(x*32, y*32+16, 16.0f, aFlags); } x += m_pTiles[c].m_Skip; } + Graphics()->QuadsEnd(); Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1); } |