mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Optionally allocate extra data for iqm blend frames.
Also, correct the blend parameter type (int->float. oops).
This commit is contained in:
parent
02f8aa6b75
commit
f958afad53
3 changed files with 5 additions and 4 deletions
|
@ -165,7 +165,7 @@ maliasframedesc_t *R_AliasGetFramedesc (int framenum, aliashdr_t *hdr);
|
||||||
float R_AliasGetLerpedFrames (entity_t *ent, aliashdr_t *hdr);
|
float R_AliasGetLerpedFrames (entity_t *ent, aliashdr_t *hdr);
|
||||||
float R_IQMGetLerpedFrames (entity_t *ent, iqm_t *hdr);
|
float R_IQMGetLerpedFrames (entity_t *ent, iqm_t *hdr);
|
||||||
iqmframe_t *R_IQMBlendFrames (const iqm_t *iqm, int frame1, int frame2,
|
iqmframe_t *R_IQMBlendFrames (const iqm_t *iqm, int frame1, int frame2,
|
||||||
int blend);
|
float blend, int extra);
|
||||||
float R_EntityBlend (entity_t *ent, int pose, float interval);
|
float R_EntityBlend (entity_t *ent, int pose, float interval);
|
||||||
void R_BeginEdgeFrame (void);
|
void R_BeginEdgeFrame (void);
|
||||||
void R_ScanEdges (void);
|
void R_ScanEdges (void);
|
||||||
|
|
|
@ -217,7 +217,7 @@ glsl_R_DrawIQM (void)
|
||||||
Mat4Mult (iqm_vp, ent->transform, mvp_mat);
|
Mat4Mult (iqm_vp, ent->transform, mvp_mat);
|
||||||
|
|
||||||
blend = R_IQMGetLerpedFrames (ent, iqm);
|
blend = R_IQMGetLerpedFrames (ent, iqm);
|
||||||
frame = R_IQMBlendFrames (iqm, ent->pose1, ent->pose2, blend);
|
frame = R_IQMBlendFrames (iqm, ent->pose1, ent->pose2, blend, 0);
|
||||||
|
|
||||||
qfeglUniform3fv (iqm_shader.ambient.location, 1, ambientcolor);
|
qfeglUniform3fv (iqm_shader.ambient.location, 1, ambientcolor);
|
||||||
for (i = 0; i < MAX_IQM_LIGHTS; i++) {
|
for (i = 0; i < MAX_IQM_LIGHTS; i++) {
|
||||||
|
|
|
@ -67,12 +67,13 @@ R_IQMGetLerpedFrames (entity_t *ent, iqm_t *iqm)
|
||||||
}
|
}
|
||||||
|
|
||||||
iqmframe_t *
|
iqmframe_t *
|
||||||
R_IQMBlendFrames (const iqm_t *iqm, int frame1, int frame2, int blend)
|
R_IQMBlendFrames (const iqm_t *iqm, int frame1, int frame2, float blend,
|
||||||
|
int extra)
|
||||||
{
|
{
|
||||||
iqmframe_t *frame;
|
iqmframe_t *frame;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
frame = Hunk_TempAlloc (iqm->num_joints * sizeof (iqmframe_t));
|
frame = Hunk_TempAlloc (iqm->num_joints * sizeof (iqmframe_t) + extra);
|
||||||
#if 0
|
#if 0
|
||||||
for (i = 0; i < iqm->num_joints; i++) {
|
for (i = 0; i < iqm->num_joints; i++) {
|
||||||
iqmframe_t *f1 = &iqm->frames[frame1][i];
|
iqmframe_t *f1 = &iqm->frames[frame1][i];
|
||||||
|
|
Loading…
Reference in a new issue