PDA

View Full Version : GLUT + console window for simple I/O



05-16-2001, 08:30 AM
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.

bsperlin
05-16-2001, 09:57 AM
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??

rts
05-16-2001, 10:33 AM
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).