PDA

View Full Version : Console in glut?



nergal
10-23-2003, 02:34 PM
Im trying to make a console sortof thing with glut, is that a bad ide? http://www.opengl.org/discussion_boards/ubb/smile.gif
I started out to make a subwindow for it and such, but perhaps thats not a good ide because the mainwindow will be effected?
Will be glad for help to build a console in a opengl app.

regards Nergal

Tom78
10-23-2003, 06:46 PM
Why using a sencond Window ? I created my Console ontop of the rendering window and i can switch it on or off by hitting F12. Make it transparent and you will have no problems with multiple windows.

cu
Tom

nergal
10-23-2003, 09:56 PM
Seems like a good idee. I got this subwindow thing to work now, but still got some problems with the regeneration of the window after destruction. Anyway...
How did u solve the issue for input of text, or dont u have a command console?

/Nergal

Tom78
10-24-2003, 06:58 AM
The Input i use is very simple. I use the keyboard function call from GLUT and check if Console.activ is true or false and if it is true i do not use the normal shortcuts, but send the char to Console.AppendChar. Than you just have to add some stuff like the Del-key, but it is no prob. I think this is the most simple way.

cu
Tom