summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-25 15:00:52 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-25 15:00:52 (GMT)
commitb9ec7d8654d161e9646780989db77c47f48a698d (patch)
tree684cd1ce2cc7b04fef0454280273c40430b68029 /src
parent565a3e10e46b487af4194da0c7710c36761be144 (diff)
downloadpowder-b9ec7d8654d161e9646780989db77c47f48a698d.zip
powder-b9ec7d8654d161e9646780989db77c47f48a698d.tar.gz
Fix another blending issue and search_ui display clearing
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c38
-rw-r--r--src/interface.c1
2 files changed, 22 insertions, 17 deletions
diff --git a/src/graphics.c b/src/graphics.c
index bb66bf1..8ac2230 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1621,10 +1621,13 @@ void render_parts(pixel *vid)
int cglowV = 0, cglowC = 0, cglow = 0;
int cflatV = 0, cflatC = 0, cflat = 0;
int clineV = 0, clineC = 0, cline = 0;
+ GLuint origBlendSrc, origBlendDst;
//Set coord offset
glScalef(1,-1,1);
glTranslatef(0, -YRES/*-(YRES+MENUSIZE)*/, 0);
+ glGetIntegerv(GL_BLEND_SRC, &origBlendSrc);
+ glGetIntegerv(GL_BLEND_DST, &origBlendDst);
//Render to the particle FBO
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo);
#endif
@@ -2264,6 +2267,22 @@ void render_parts(pixel *vid)
// -- END FLAT -- //
}
+ if(cblob)
+ {
+ // -- BEGIN BLOB -- //
+ glEnable( GL_POINT_SMOOTH ); //Blobs!
+ glPointSize(2.5f);
+
+ glColorPointer(4, GL_FLOAT, 0, &blobC[0]);
+ glVertexPointer(2, GL_INT, 0, &blobV[0]);
+
+ glDrawArrays(GL_POINTS, 0, cblob);
+
+ //Clear some stuff we set
+ glDisable( GL_POINT_SMOOTH );
+ // -- END BLOB -- //
+ }
+
if(cglow || cblur)
{
// -- BEGIN GLOW -- //
@@ -2317,22 +2336,6 @@ void render_parts(pixel *vid)
// -- END GLOW -- //
}
- if(cblob)
- {
- // -- BEGIN BLOB -- //
- glEnable( GL_POINT_SMOOTH ); //Blobs!
- glPointSize(2.5f);
-
- glColorPointer(4, GL_FLOAT, 0, &blobC[0]);
- glVertexPointer(2, GL_INT, 0, &blobV[0]);
-
- glDrawArrays(GL_POINTS, 0, cblob);
-
- //Clear some stuff we set
- glDisable( GL_POINT_SMOOTH );
- // -- END BLOB -- //
- }
-
if(cline)
{
// -- BEGIN LINES -- //
@@ -2452,7 +2455,8 @@ void render_parts(pixel *vid)
//Reset coords/offset
glTranslatef(0, YRES+MENUSIZE, 0);
- glScalef(1,-1,1);
+ glScalef(1,-1,1);
+ glBlendFunc(origBlendSrc, origBlendDst);
#endif
}
diff --git a/src/interface.c b/src/interface.c
index 229ec88..7e4e59d 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -3199,6 +3199,7 @@ int search_ui(pixel *vid_buf)
drawtext(vid_buf, gx+(w-textwidth(search_owners[mp]))/2, gy+YRES/GRID_Z+16, search_owners[mp], 128, 128, 128, 255);
}
+ clearScreen(1.0f);
sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE));
ui_edit_process(mx, my, b, &ed);