From 2fdbde7d3e57683ffd199fe1765dc2b88588e63e Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 29 Aug 2008 12:53:20 +0000 Subject: [PATCH] compiler warning --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index a7a1ec31eb..83c589026d 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -8216,10 +8216,10 @@ void CLP(GraphicsStateGuardian):: do_issue_scissor() { const LVecBase4f &frame = _target._scissor->get_frame(); - int x = _viewport_x + _viewport_width * frame[0]; - int y = _viewport_y + _viewport_height * frame[2]; - int width = _viewport_width * (frame[1] - frame[0]); - int height = _viewport_height * (frame[3] - frame[2]); + int x = (int)(_viewport_x + _viewport_width * frame[0] + 0.5f); + int y = (int)(_viewport_y + _viewport_height * frame[2] + 0.5f); + int width = (int)(_viewport_width * (frame[1] - frame[0]) + 0.5f); + int height = (int)(_viewport_height * (frame[3] - frame[2]) + 0.5f); GLP(Enable)(GL_SCISSOR_TEST); GLP(Scissor)(x, y, width, height);