[freespace2] G400 text problem... someone test this

Bradley Bell btb at icculus.org
Tue May 6 04:01:33 EDT 2003


Quoting Bradley Bell <btb at icculus.org>:

> Quoting Taylor Richards <mtrs at bellsouth.net>:
> 
> > Clearing the zbuffer after the shader fixes this for me but I'm only
> > looking at the mainhall.  If someone wouldn't mind, test this to see if
> > it gets all of the issues on the HUD too.  I don't think there are any
> > adverse effects from this (speed wise or other).  If there is a better
> > or more complete way of doing this please let me know.  If this patch
> > doesn't work for you on the mainhall then you're doing it wrong ;-)
> 
> Yep, it fixes it for the mainhall, and fixes it for the hud most of the time.
> 
> It still does it occasionally, such as whenever I collide with anything, so
> it
> could be related to the flashing "collision" text.

Hey, I took a wild guess, and added another zbuffer clear to gr_opengl_rect. 
This fixes it:

--- src/graphics/gropengl.cpp	2003/05/04 04:56:53	1.62
+++ src/graphics/gropengl.cpp	2003/05/06 07:58:07
@@ -760,6 +760,9 @@
 void gr_opengl_rect(int x,int y,int w,int h)
 {
 	gr_opengl_rect_internal(x, y, w, h, gr_screen.current_color.red,
gr_screen.current_color.green, gr_screen.current_color.blue,
gr_screen.current_color.alpha);
+
+
// clear zbuffer to fix G400
+
gr_zbuffer_clear(TRUE);
 }
 
 void gr_opengl_shade(int x,int y,int w,int h)







More information about the freespace2 mailing list