Skip to main content
gamedev.net
🔒 Locked

Problems with FTGL

Started by atp Oct 16, 2008 at 9:35 PM 0 replies 700+ views
Original Post
atp
atp
I'm trying to get FTGL working so I can utility true type font and no longer be dependent on bitmap fonts ><. I wrote the code that I thought would draw the text using FTGL, but it didn't work. I decided I should look at some of the samples that came with it, but when I run them, I get a runtime exception! This is the segment of code that is executed when the exception occurs:

glPushMatrix();
        glColor3f(1.0, 1.0, 1.0);
        int renderMode = FTGL::RENDER_FRONT | FTGL::RENDER_BACK;
        if(layouts[currentLayout])
            layouts[currentLayout]->Render(myString, -1,
                                           FTPoint(), renderMode);
        else
            fonts[current_font]->Render(myString, -1,
                                        FTPoint(), FTPoint(), renderMode);

        if(current_font == FTGL_EXTRUDE)
        {
            glBindTexture(GL_TEXTURE_2D, textureID[1]);
            renderMode = FTGL::RENDER_SIDE;
            if(layouts[currentLayout])
>>>>>           layouts[currentLayout]->Render(myString, -1,
                                               FTPoint(), renderMode);
            else
                fonts[current_font]->Render(myString, -1,
                                            FTPoint(), FTPoint(), renderMode);
        }
    glPopMatrix();
The Render method is being called when the exception occurs as indicated by the arrows. When I look at the stack, the exception is propagating from the glu32.dll library of all things. I'm skeptical that it's really a problem in the module. Does any have an idea of what might be going on here?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.