Button & ttf

I am working on opengl.But I do not know how to create button & true type font in opengl

It all depends on if you only need it to work on Windows or on other platforms also.

On Windows you can use wglUseFontOutlines to create TTF characters in OpenGL, the alternative is to use FreeType, there are a number of libraries available that render TTF characters on OpenGL using FreeType.

The button itself is just glBegin()/glEnd with some GL_LINES or GL_LINE_STRIPS.

Mikael

A quick search in the forum gave 30 hits for the keywords “button menu”

Here are three of them:
http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/002865.html http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/008071.html http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/015336.html

Seems like GLUI is what your are looking for.