简体   繁体   中英

OpenGL from terminal application on OSX

I have a fairly straight forward question. I have a commandline application I'm writing in C, and I want to bring up an OpenGL window from that application itself, not invoking another app. Can I use GLUT, or something?

Thanks!

yes, if all you are doing is opening OpenGL windows (interactive or not) without need for system controls, GLUT will definitely make your life easy.

here is one of the best GLUT tutorials I know of: http://www.lighthouse3d.com/tutorials/glut-tutorial/

for OSX you may need to change your includes.

#include <GL/glut.h>

to

#include <GLUT/glut.h>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM