]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_lightning.c
added a -I option on Mac OSX SDL builds to include the relevant Headers
[xonotic/darkplaces.git] / r_lightning.c
index 3ab8cb1c271298cef59de7979238d78c43e489d0..584a02413782af5a7ca9406c9a1b1807e30e5e1f 100644 (file)
@@ -92,7 +92,7 @@ void r_lightningbeams_setuptexture(void)
                        if (px >= 0 && py >= 0 && px < BEAMWIDTH && py < BEAMHEIGHT)
                                image[py*BEAMWIDTH+px] += 16;
                }
-       
+
                for (py = 0;py < BEAMHEIGHT;py++)
                {
                        for (px = 0;px < BEAMWIDTH;px++)
@@ -103,7 +103,7 @@ void r_lightningbeams_setuptexture(void)
                                pixels[(py*BEAMWIDTH+px)*4+3] = 255;
                        }
                }
-       
+
                Image_WriteTGABGRA(va("lightningbeam%i.tga", imagenumber), BEAMWIDTH, BEAMHEIGHT, pixels);
        }
 
@@ -242,12 +242,14 @@ void R_DrawLightningBeam_TransparentCallback(const entity_render_t *ent, const r
        GL_DepthRange(0, 1);
        GL_PolygonOffset(r_refdef.polygonfactor, r_refdef.polygonoffset);
        GL_DepthTest(true);
+       GL_CullFace(GL_NONE);
        if (r_lightningbeam_qmbtexture.integer && r_lightningbeamqmbtexture == NULL)
                r_lightningbeams_setupqmbtexture();
        if (!r_lightningbeam_qmbtexture.integer && r_lightningbeamtexture == NULL)
                r_lightningbeams_setuptexture();
 
        R_Mesh_VertexPointer(vertex3f, 0, 0);
+       R_SetupGenericShader(true);
        // FIXME: fixed function path can't properly handle r_refdef.view.colorscale > 1
        if (r_refdef.fogenabled)
        {