mirror of https://github.com/yquake2/ref_vk.git
micro optimisations proposal
This commit is contained in:
parent
8ba435d831
commit
81afaac7bc
|
@ -174,6 +174,9 @@ R_SetFrustum(vec3_t vup, vec3_t vpn, vec3_t vright, vec3_t r_origin,
|
|||
RotatePointAroundVector(frustum[3].normal, vright, vpn,
|
||||
-(90 - fov_y / 2));
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# pragma GCC unroll 4
|
||||
#endif
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
frustum[i].type = PLANE_ANYZ;
|
||||
|
|
|
@ -85,8 +85,7 @@ Mod_Reallocate (void)
|
|||
|
||||
R_Printf(PRINT_ALL, "Reallocate space for %d models.\n", models_known_max);
|
||||
|
||||
models_known = malloc(models_known_max * sizeof(model_t));
|
||||
memset(models_known, 0, models_known_max * sizeof(model_t));
|
||||
models_known = calloc(models_known_max, sizeof(model_t));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue