X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FOpenGL.cc;h=12c6c813ff0de41f1e0f29c7682b75c27c87af52;hb=86730c1d88ded8f44d0c5d2e2c7268185aea73ec;hp=14884ef7aa9f10afa6719787a0270b4cce8d50a2;hpb=8018147e3d481c672cd337466f5a344beaa7a11c;p=org.ibex.core.git diff --git a/src/org/xwt/plat/OpenGL.cc b/src/org/xwt/plat/OpenGL.cc index 14884ef..12c6c81 100644 --- a/src/org/xwt/plat/OpenGL.cc +++ b/src/org/xwt/plat/OpenGL.cc @@ -180,7 +180,7 @@ void OpenGL$RectGLPicture::natInit(Object *data_, jboolean alphaOnly) { void OpenGL$RectGLPicture::draw(jint dx, jint dy, jint cx1, jint cy1, jint cx2, jint cy2) { cx2 = min(cx2, dx + width); - cy2 = min(cx2, dy + height); + cy2 = min(cy2, dy + height); if (cy2 <= cy1 || cx2 <= cx1) return; glEnable(GL_TEXTURE_RECTANGLE_EXT); glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textureName); @@ -274,7 +274,7 @@ void OpenGL$SquareGLPicture::natInit(Object *data_, jboolean alphaOnly) { void OpenGL$SquareGLPicture::draw(jint dx, jint dy, jint cx1, jint cy1, jint cx2, jint cy2) { cx2 = min(cx2, dx + width); - cy2 = min(cx2, dy + height); + cy2 = min(cy2, dy + height); if (cy2 <= cy1 || cx2 <= cx1) return; float tx1 = (float) (cx1 - dx) / (float) texWidth; float ty1 = (float) (cy1 - dy) / (float) texHeight;