- pass mirroring info to model drawers.
Actual evaluation only implemented in OpenGL. Not tested yet because the bug report had no testable example.
This commit is contained in:
parent
decea97a34
commit
94d1a73ae8
9 changed files with 23 additions and 18 deletions
|
|
@ -171,7 +171,9 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s
|
|||
float stretch = (smf->modelIDs[0] != -1 ? Models[smf->modelIDs[0]]->getAspectFactor() : 1.f) / level.info->pixelstretch;
|
||||
objectToWorldMatrix.scale(1, stretch, 1);
|
||||
|
||||
BeginDrawModel(actor, smf, objectToWorldMatrix);
|
||||
float orientation = scaleFactorX * scaleFactorY * scaleFactorZ;
|
||||
|
||||
BeginDrawModel(actor, smf, objectToWorldMatrix, orientation < 0);
|
||||
RenderFrameModels(smf, actor->state, actor->tics, actor->GetClass(), translation);
|
||||
EndDrawModel(actor, smf);
|
||||
}
|
||||
|
|
@ -207,7 +209,9 @@ void FModelRenderer::RenderHUDModel(DPSprite *psp, float ofsX, float ofsY)
|
|||
objectToWorldMatrix.rotate(smf->pitchoffset, 0, 0, 1);
|
||||
objectToWorldMatrix.rotate(-smf->rolloffset, 1, 0, 0);
|
||||
|
||||
BeginDrawHUDModel(playermo, objectToWorldMatrix);
|
||||
float orientation = smf->xscale * smf->yscale * smf->zscale;
|
||||
|
||||
BeginDrawHUDModel(playermo, objectToWorldMatrix, orientation < 0);
|
||||
RenderFrameModels(smf, psp->GetState(), psp->GetTics(), playermo->player->ReadyWeapon->GetClass(), 0);
|
||||
EndDrawHUDModel(playermo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
virtual ModelRendererType GetType() const = 0;
|
||||
|
||||
virtual void BeginDrawModel(AActor *actor, FSpriteModelFrame *smf, const VSMatrix &objectToWorldMatrix) = 0;
|
||||
virtual void BeginDrawModel(AActor *actor, FSpriteModelFrame *smf, const VSMatrix &objectToWorldMatrix, bool mirrored) = 0;
|
||||
virtual void EndDrawModel(AActor *actor, FSpriteModelFrame *smf) = 0;
|
||||
|
||||
virtual IModelVertexBuffer *CreateVertexBuffer(bool needindex, bool singleframe) = 0;
|
||||
|
|
@ -74,7 +74,7 @@ public:
|
|||
|
||||
virtual VSMatrix GetViewToWorldMatrix() = 0;
|
||||
|
||||
virtual void BeginDrawHUDModel(AActor *actor, const VSMatrix &objectToWorldMatrix) = 0;
|
||||
virtual void BeginDrawHUDModel(AActor *actor, const VSMatrix &objectToWorldMatrix, bool mirrored) = 0;
|
||||
virtual void EndDrawHUDModel(AActor *actor) = 0;
|
||||
|
||||
virtual void SetInterpolation(double interpolation) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue