From 506ab6ea0ea88c14a279ef31b715d2e8e1e7f358 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 25 Oct 2011 00:16:57 +0100 Subject: [PATCH] Cursors for OpenGL, Coords are a bit off, which is annoying and I cannot draw to parts FBO because It's already been rendered D:< --- src/graphics.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index c52fb1b80..ffcf38548 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -3102,12 +3102,13 @@ void render_zoom(pixel *img) //draws the zoom box glTexCoord2d(zcx1, zcy0); glVertex3f(zoom_wx+ZSIZE*ZFACTOR, YRES+MENUSIZE-zoom_wy, 1.0); glEnd(); + glBindTexture(GL_TEXTURE_2D, 0); glDisable( GL_TEXTURE_2D ); if(zoom_en) { - //glEnable(GL_COLOR_LOGIC_OP); + glEnable(GL_COLOR_LOGIC_OP); //glEnable(GL_LINE_SMOOTH); glLogicOp(GL_XOR); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); @@ -3118,7 +3119,7 @@ void render_zoom(pixel *img) //draws the zoom box glVertex3i(zoom_x+ZSIZE, YRES+MENUSIZE-(zoom_y-1), 0); glVertex3i(zoom_x-1, YRES+MENUSIZE-(zoom_y-1), 0); glEnd(); - //glDisable(GL_COLOR_LOGIC_OP); + glDisable(GL_COLOR_LOGIC_OP); } #else int x, y, i, j; @@ -3432,6 +3433,41 @@ corrupt: //draws the cursor void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry) { +#ifdef OGLR + int i; + if (t