示例#1
0
        void testRender()
        {
            buildGLContext();
            
            FTGLPixmapFont* pixmapFont = new FTGLPixmapFont( FONT_FILE);            

            pixmapFont->Render(GOOD_ASCII_TEST_STRING);
            CPPUNIT_ASSERT( pixmapFont->Error() == 0x97);   // Invalid pixels per em       
            CPPUNIT_ASSERT( glGetError() == GL_NO_ERROR);        

            pixmapFont->FaceSize(18);
            pixmapFont->Render(GOOD_ASCII_TEST_STRING);

            CPPUNIT_ASSERT( pixmapFont->Error() == 0);        
            CPPUNIT_ASSERT( glGetError() == GL_NO_ERROR);        
        }
示例#2
0
        void testDisplayList()
        {
            buildGLContext();
        
            FTGLPixmapFont* pixmapFont = new FTGLPixmapFont( FONT_FILE);            
            pixmapFont->FaceSize(18);
            
            int glList = glGenLists(1);
            glNewList( glList, GL_COMPILE);

                pixmapFont->Render(GOOD_ASCII_TEST_STRING);

            glEndList();

            CPPUNIT_ASSERT( glGetError() == GL_NO_ERROR);
        }