]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_particles.c
Add GL_ExtensionSupported in vid_null.c because vid_shared.c relies on
[xonotic/darkplaces.git] / cl_particles.c
index 4247755d8d18188dee35a57a0526655c7eab3045..6d99fe0156a5ec8ab63d4d2d1c55d7e96d766b65 100644 (file)
@@ -2325,7 +2325,7 @@ static void R_InitParticleTexture (void)
                Image_WriteTGABGRA ("particles/particlefont.tga", PARTICLEFONTSIZE, PARTICLEFONTSIZE, particletexturedata);
 #endif
 
-               decalskinframe = R_SkinFrame_LoadInternalBGRA("particlefont", TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, particletexturedata, PARTICLEFONTSIZE, PARTICLEFONTSIZE, false);
+               decalskinframe = R_SkinFrame_LoadInternalBGRA("particlefont", TEXF_ALPHA | TEXF_FORCELINEAR | TEXF_RGBMULTIPLYBYALPHA, particletexturedata, PARTICLEFONTSIZE, PARTICLEFONTSIZE, 0, 0, 0, false);
                particlefonttexture = decalskinframe->base;
 
                Mem_Free(particletexturedata);
@@ -2554,7 +2554,7 @@ static void R_DrawDecal_TransparentCallback(const entity_render_t *ent, const rt
        // now render the decals all at once
        // (this assumes they all use one particle font texture!)
        GL_BlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
-       R_SetupShader_Generic(particletexture[63].texture, NULL, GL_MODULATE, 1, false, false, true);
+       R_SetupShader_Generic(particletexture[63].texture, false, false, true);
        R_Mesh_PrepareVertices_Generic_Arrays(numsurfaces * 4, particle_vertex3f, particle_color4f, particle_texcoord2f);
        R_Mesh_Draw(0, numsurfaces * 4, 0, numsurfaces * 2, NULL, NULL, 0, particle_elements, NULL, 0);
 }
@@ -2862,6 +2862,13 @@ static void R_DrawParticle_TransparentCallback(const entity_render_t *ent, const
                        t2f[6] = v[1];t2f[7] = tex->t1;
                        break;
                }
+               if (r_showparticleedges.integer)
+               {
+                       R_DebugLine(v3f, v3f + 3);
+                       R_DebugLine(v3f + 3, v3f + 6);
+                       R_DebugLine(v3f + 6, v3f + 9);
+                       R_DebugLine(v3f + 9, v3f);
+               }
        }
 
        // now render batches of particles based on blendmode and texture
@@ -2877,7 +2884,7 @@ static void R_DrawParticle_TransparentCallback(const entity_render_t *ent, const
                if (texture != particletexture[p->texnum].texture)
                {
                        texture = particletexture[p->texnum].texture;
-                       R_SetupShader_Generic(texture, NULL, GL_MODULATE, 1, false, false, false);
+                       R_SetupShader_Generic(texture, false, false, false);
                }
 
                if (p->blendmode == PBLEND_INVMOD)