managing events & more...

I’ve written an application using BC++Builder and Glut libraries (I compiled it as “console application”). The problem is that I would like to put on it a menu bar (with options like File | Open , File | Save , …)
I think it is necesary to rewrite the application using OpenGl (and not Glut) functions to manage things as mouse and keyboard callbacks . Somebody could tell me where or how I can find out help on this topic?

I think Glut does have some basic menu functions. I haven’t used them before so I can’t tell you how to use them but look at some of the functions like glutCreateMenu, glutAddMenuEntry, glutMenuStateFunc, etc. (Those are just a few of many functions I found in glut.h)

If you really don’t want to use glut, though, you would have to create your Window some other way. OpenGL itself doesn’t create windows for you. You’d have to use something like the Win32 API, or Borland’s window classes. (I can’t say I’ve ever tried to initialize OpenGL on one of the Borland form classes, but I’m pretty sure it could be done.)

GLUT has a basic pop-up menu functions, but not the windows type file|edit|help bar style.

Opengl does not have any input functions for mouse or keyboad, that is what glut library add’s, so if you want windows type interface you will have to write your application like a windows app. There are a lot of tutor’s on interfacing opengl with the windows API, using windows direct x input functions for mouse and keyboard input.

Check out these sites.

nehe.gamedev.net // good opengl tutor

www.cornflakezone.com // Windows API + opengl interface.

Originally posted by gjat:
I’ve written an application using BC++Builder and Glut libraries (I compiled it as “console application”). The problem is that I would like to put on it a menu bar (with options like File | Open , File | Save , …)
I think it is necesary to rewrite the application using OpenGl (and not Glut) functions to manage things as mouse and keyboard callbacks . Somebody could tell me where or how I can find out help on this topic?

[This message has been edited by nexusone (edited 04-24-2002).]