From 6d6fade23a791ee9fb1ccf186a03b5c8de3d4e5d Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Thu, 13 Feb 2003 21:48:28 +0000 Subject: [PATCH] Change mach64 test to only happen at particle system inits, rather than testing for every individual particle injection. Mach64 now gets id particle effects. Disabling the majority of effects isn't the best method, IMO. --- libs/video/renderer/gl/gl_dyn_part.c | 36 +++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/libs/video/renderer/gl/gl_dyn_part.c b/libs/video/renderer/gl/gl_dyn_part.c index 572d1bd19..e3a0c7bff 100644 --- a/libs/video/renderer/gl/gl_dyn_part.c +++ b/libs/video/renderer/gl/gl_dyn_part.c @@ -86,8 +86,6 @@ particle_new (ptype_t type, int texnum, const vec3_t org, float scale, return NULL; } */ - if(gl_feature_mach64 && type == pt_smokecloud && texnum == part_tex_smoke ) - return; part = &particles[numparticles++]; @@ -133,21 +131,27 @@ R_InitParticles (void) if (r_maxparticles && r_init) { if (vaelements > 3) pVAsize = min (vaelements - (vaelements % 4), r_maxparticles * 4); - else + else if (vaelements >= 0) pVAsize = r_maxparticles * 4; - Con_Printf ("Particles: %i maximum vertex elements.\n", pVAsize); + else + pVAsize = 0; + if (pVAsize) { + Con_Printf ("Particles: %i maximum vertex elements.\n", pVAsize); - if (particleVertexArray) - free (particleVertexArray); - particleVertexArray = (varray_t2f_c4ub_v3f_t *) - calloc (pVAsize, sizeof (varray_t2f_c4ub_v3f_t)); - qfglInterleavedArrays (GL_T2F_C4UB_V3F, 0, particleVertexArray); + if (particleVertexArray) + free (particleVertexArray); + particleVertexArray = (varray_t2f_c4ub_v3f_t *) + calloc (pVAsize, sizeof (varray_t2f_c4ub_v3f_t)); + qfglInterleavedArrays (GL_T2F_C4UB_V3F, 0, particleVertexArray); - if (pVAindices) - free (pVAindices); - pVAindices = (int *) calloc (pVAsize, sizeof (int)); - for (i = 0; i < pVAsize; i++) - pVAindices[i] = i; + if (pVAindices) + free (pVAindices); + pVAindices = (int *) calloc (pVAsize, sizeof (int)); + for (i = 0; i < pVAsize; i++) + pVAindices[i] = i; + } else { + Con_Printf ("Particles: Vertex Array use disabled.\n"); + } } else { if (particleVertexArray) { free (particleVertexArray); @@ -1534,7 +1538,7 @@ R_DrawParticles (void) void r_easter_eggs_f (cvar_t *var) { - if (easter_eggs) { + if (easter_eggs && !gl_feature_mach64) { if (easter_eggs->int_val) { R_ParticleExplosion = R_ParticleExplosion_EE; R_TeleportSplash = R_TeleportSplash_EE; @@ -1560,7 +1564,7 @@ void r_particles_style_f (cvar_t *var) { if (r_particles_style) { - if (r_particles_style->int_val) { + if (r_particles_style->int_val && !gl_feature_mach64) { R_BlobExplosion = R_BlobExplosion_QF; R_ParticleExplosion = R_ParticleExplosion_QF; R_ParticleExplosion2 = R_ParticleExplosion2_QF;