mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Change CTransform4f to inherit from CMatrix4f
This commit is contained in:
@@ -101,7 +101,6 @@ CVector2f CFont::RenderString(const TString& rkString, CRenderer* /*pRenderer*/,
|
||||
GlyphTransform.Scale(CVector3f((float) pGlyph->Width / 2, (float) pGlyph->Height, 1.f));
|
||||
GlyphTransform.Scale(Scale);
|
||||
GlyphTransform.Translate(CVector3f(XTrans, YTrans, 0.f));
|
||||
CMatrix4f Glyph4f = GlyphTransform.ToMatrix4f();
|
||||
|
||||
// Get glyph layer
|
||||
u8 GlyphLayer = pGlyph->RGBAChannel;
|
||||
@@ -109,7 +108,7 @@ CVector2f CFont::RenderString(const TString& rkString, CRenderer* /*pRenderer*/,
|
||||
else if (mTextureFormat == 8) GlyphLayer = 3;
|
||||
|
||||
// Load shader uniforms, buffer texture
|
||||
glUniformMatrix4fv(ModelMtxLoc, 1, GL_FALSE, (GLfloat*) &Glyph4f);
|
||||
glUniformMatrix4fv(ModelMtxLoc, 1, GL_FALSE, (GLfloat*) &GlyphTransform);
|
||||
smGlyphVertices.BufferAttrib(eTex0, &pGlyph->TexCoords);
|
||||
|
||||
// Draw fill
|
||||
|
||||
@@ -84,7 +84,7 @@ void CSkeleton::Draw(FRenderOptions /*Options*/)
|
||||
CTransform4f Transform;
|
||||
Transform.Scale(0.025f);
|
||||
Transform.Translate(pBone->AbsolutePosition());
|
||||
CGraphics::sMVPBlock.ModelMatrix = Transform.ToMatrix4f();
|
||||
CGraphics::sMVPBlock.ModelMatrix = Transform;
|
||||
CGraphics::UpdateMVPBlock();
|
||||
CDrawUtil::DrawSphere(CColor::skWhite);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user