Merge pull request #233 from unknownbrackets/thin3d

d3d: fix scissoring by using top=actual top
This commit is contained in:
Henrik Rydgård 2014-08-25 12:40:44 +02:00
commit 196facb355
2 changed files with 2 additions and 3 deletions

View File

@ -268,7 +268,7 @@ public:
}
void SetScissorRect(int left, int top, int width, int height) override {
glstate.scissorRect.set(left, top, width, height);
glstate.scissorRect.set(left, targetHeight_ - (top + height), width, height);
}
void SetViewports(int count, T3DViewport *viewports) override {

View File

@ -100,10 +100,9 @@ void UIContext::ActivateTopScissor() {
const Bounds &bounds = scissorStack_.back();
float scale = 1.0f / g_dpi_scale;
int x = scale * bounds.x;
int y = scale * (dp_yres - bounds.y2());
int y = scale * bounds.y;
int w = scale * bounds.w;
int h = scale * bounds.h;
thin3d_->SetScissorRect(x, y, w, h);
thin3d_->SetScissorEnabled(true);
} else {