summaryrefslogtreecommitdiff
path: root/source/gl_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/gl_draw.c')
-rw-r--r--source/gl_draw.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/gl_draw.c b/source/gl_draw.c
index 388019f..4813441 100644
--- a/source/gl_draw.c
+++ b/source/gl_draw.c
@@ -47,6 +47,7 @@ void Draw_SetColor( uint32 flags, const color_t color ) {
void Draw_SetClipRect( uint32 flags, const clipRect_t *clip ) {
clipRect_t rc;
+ float scale;
if( ( draw.flags & DRAW_CLIP_MASK ) == flags ) {
return;
@@ -60,22 +61,24 @@ void Draw_SetClipRect( uint32 flags, const clipRect_t *clip ) {
return;
}
+ scale = 1 / draw.scale;
+
rc.left = 0;
rc.top = 0;
if( flags & DRAW_CLIP_LEFT ) {
- rc.left = clip->left;
+ rc.left = clip->left * scale;
}
if( flags & DRAW_CLIP_TOP ) {
- rc.top = clip->top;
+ rc.top = clip->top * scale;
}
rc.right = gl_config.vidWidth;
rc.bottom = gl_config.vidHeight;
if( flags & DRAW_CLIP_RIGHT ) {
- rc.right = clip->right;
+ rc.right = clip->right * scale;
}
if( flags & DRAW_CLIP_BOTTOM ) {
- rc.bottom = clip->bottom;
+ rc.bottom = clip->bottom * scale;
}
qglEnable( GL_SCISSOR_TEST );