Last active
December 12, 2015 03:09
-
-
Save Shaptic/4705214 to your computer and use it in GitHub Desktop.
CFont::CFont() constructor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFont::CFont() : m_ready(false), m_loaded(false) | |
{ | |
// Initialize FreeType. | |
if(!CFont::Initialize()) return; | |
// Load the shader. | |
if(!m_FontRender.LoadFromFile("Default.vs", "FontRender.fs")) | |
return; | |
// Give the font shader an identity matrix for the model-view | |
// and the projection matrix that was created with the window. | |
m_FontRender.Bind(); | |
if(!m_FontRender.SetMatrix("modelview", math::IDENTITY_MATRIX) || | |
!m_FontRender.SetMatrix("proj", CWindow::GetProjectionMatrix())) | |
return; | |
m_FontRender.Unbind(); | |
m_ready = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment