diff options
| author | oy <Tom_Adams@web.de> | 2012-01-08 01:47:53 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2012-01-08 01:47:53 +0100 |
| commit | be37147342ff9032f0557d732abfc6cfd2c77efe (patch) | |
| tree | 44b644a6ab37ea2dba8243056357a00fc5a03c43 /src/game | |
| parent | 58f57795081e677e1450844bad1043b72c7c0bea (diff) | |
| download | zcatch-be37147342ff9032f0557d732abfc6cfd2c77efe.tar.gz zcatch-be37147342ff9032f0557d732abfc6cfd2c77efe.zip | |
fixed border rendering in the editor's image preview. Closes #908
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/editor/editor.cpp | 3 | ||||
| -rw-r--r-- | src/game/editor/popups.cpp | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index c19fc86f..6b0a401c 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -2679,11 +2679,12 @@ void CEditor::RenderImages(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) r.h *= m_Map.m_lImages[i]->m_Height/Max; Graphics()->TextureSet(m_Map.m_lImages[i]->m_TexID); Graphics()->BlendNormal(); + Graphics()->WrapClamp(); Graphics()->QuadsBegin(); IGraphics::CQuadItem QuadItem(r.x, r.y, r.w, r.h); Graphics()->QuadsDrawTL(&QuadItem, 1); Graphics()->QuadsEnd(); - + Graphics()->WrapNormal(); } } diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index c19adb82..64d0c799 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -742,13 +742,14 @@ int CEditor::PopupSelectImage(CEditor *pEditor, CUIRect View) ImageView.w *= pEditor->m_Map.m_lImages[ShowImage]->m_Width/Max; ImageView.h *= pEditor->m_Map.m_lImages[ShowImage]->m_Height/Max; pEditor->Graphics()->TextureSet(pEditor->m_Map.m_lImages[ShowImage]->m_TexID); + pEditor->Graphics()->BlendNormal(); + pEditor->Graphics()->WrapClamp(); + pEditor->Graphics()->QuadsBegin(); + IGraphics::CQuadItem QuadItem(ImageView.x, ImageView.y, ImageView.w, ImageView.h); + pEditor->Graphics()->QuadsDrawTL(&QuadItem, 1); + pEditor->Graphics()->QuadsEnd(); + pEditor->Graphics()->WrapNormal(); } - else - pEditor->Graphics()->TextureSet(-1); - pEditor->Graphics()->QuadsBegin(); - IGraphics::CQuadItem QuadItem(ImageView.x, ImageView.y, ImageView.w, ImageView.h); - pEditor->Graphics()->QuadsDrawTL(&QuadItem, 1); - pEditor->Graphics()->QuadsEnd(); return 0; } |