diff --git a/Starsphere.cpp b/Starsphere.cpp index 16bb0a0f5c9338ed298b38dd41d6abc1fdc824e1..214cc6f863b1e1fe23bf4636253447f621da78b6 100644 --- a/Starsphere.cpp +++ b/Starsphere.cpp @@ -512,13 +512,17 @@ void Starsphere::initialize(const int width, const int height, const Resource *f // create font instance using font resource (base address + size) m_PolygonFont = new FTGLPolygonFont(&font->data()->at(0), font->data()->size()); -// face = new OGLFT::Outline( "LiberationSans-Regular.ttf", 6, 72 ); - face = new OGLFT::Outline(&font->data()->at(0), font->data()->size(), 6, 72 ); + face = new OGLFT::TranslucentTexture( "LiberationSans-Regular.ttf", 17, 100 ); +// face = new OGLFT::Outline(&font->data()->at(0), font->data()->size(), 6, 72 ); if ( face == 0 || !face->isValid() ) { cerr << "Could not construct face" << endl; } +#if defined( GL_RASTER_POSITION_UNCLIPPED_IBM ) + glEnable( GL_RASTER_POSITION_UNCLIPPED_IBM ); +#endif glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); - face->setForegroundColor( 1., 0., 0. ); + face->setForegroundColor( 1.0, 1.0, 0.0, 1.0 ); +// face->setBackgroundColor( 0.0, 0.0, 0.0, 0.0 ); m_PolygonFont->CharMap(ft_encoding_unicode); // m_PolygonFont->Depth(0.05); @@ -715,9 +719,14 @@ void Starsphere::render(const double timeOfDay) glColor3f(1.0, 1.0, 0.0); glTranslatef(xStartPosLeft, yStartPosTop, 0); - glScalef(fontScaleLarge, fontScaleLarge, 1.0); - m_PolygonFont->Render("Einstein@Home"); - face->draw(0.0, -20.0, "Einstein@Home"); +// glScalef(fontScaleLarge, fontScaleLarge, 1.0); + glScalef(0.001, 0.001, 1.0); +// m_PolygonFont->Render("Einstein@Home"); + glEnable( GL_TEXTURE_2D ); + glEnable(GL_DEPTH_TEST); + face->draw(0.0, -10.0, "Einstein@Home"); + glDisable(GL_DEPTH_TEST); + glDisable( GL_TEXTURE_2D ); glLoadIdentity(); glColor4f(1.0, 1.0, 1.0, 0.5); diff --git a/Starsphere.h b/Starsphere.h index 4f47ba38e3f977580d3ae6e117255593ed99fba0..04b102dff63aa5facd08696a1015adb7c553a0ea 100644 --- a/Starsphere.h +++ b/Starsphere.h @@ -127,7 +127,7 @@ private: // resource handling FTFont *m_PolygonFont; - OGLFT::Outline* face; + OGLFT::TranslucentTexture* face; // local HUD contents string m_UserName;