diff --git a/Engine.cc b/Engine.cc index 427ac1a..d0533ae 100644 --- a/Engine.cc +++ b/Engine.cc @@ -169,6 +169,7 @@ bool Engine::load(const char * program) else { m_font = new FTBufferFont(path.c_str()); + //m_font = new FTTextureFont(path.c_str()); if (m_font->Error() != 0) { cerr << "Error loading font '" << path << "'" << endl; @@ -453,9 +454,9 @@ int Engine::loadModel(const string & name, bool static_data, float scale) } else { - delete obj; cerr << "error loading object" << endl; } + delete obj; } return 0; } @@ -530,6 +531,8 @@ void Engine::drawText(const char * text, GLfloat r, GLfloat g, GLfloat b, m_font->FaceSize(ptsize); glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING_BIT); glDisable(GL_LIGHTING); +// glEnable(GL_BLEND); +// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glPushMatrix(); glTranslatef(x, y, 0); glColor3f(r, g, b); diff --git a/tests/bowling.lua b/tests/bowling.lua index 36e408b..cd9f224 100644 --- a/tests/bowling.lua +++ b/tests/bowling.lua @@ -26,6 +26,9 @@ function init() --ball = ag.createSphere(0.4) --ball:setColor(0.2, 0.2, 0.9) +-- local crate = ag.loadModel("crate") +-- crate:setPosition(0, 20, 10) + crate_texture = ag.loadTexture("crate.png") end