GLUT + console window for simple I/O

Hello,

I need to use GLUT, but I need some sort of test window so I can do printf/scanf or cout/cin. In other words, my OpenGL program needs to have a command-line interface.

It also needs to be very platform-independant. I want to be able to recompile for Mac OS X, AIX, or Linux.

Any suggestions??

Thanks.

In VC++, when you make a project with a console window and then use glut you have both. printf goes to the console window. Can you do the same in linux??

Can you do the same in linux??

Are you serious?

Of course you can.

The console is a central piece of any Unix architecture. You always have access to the standard IO stream (stdin, stdout and stderr), no matter what “kind” of application you are making (Linux doesn’t distinguish between “GUI” and “console” apps like Winblows does).