extracted window title to variable

This commit is contained in:
Lexxy Fox 2023-11-01 16:45:02 -05:00
parent 32e512a798
commit 31614c4799

View File

@ -352,7 +352,9 @@ static void visible(int vis) {
update_idle_func(); update_idle_func();
} }
void parse_args(int argc, char *argv[]) { static char *window_title = "Gears";
static void parse_args(int argc, char *argv[]) {
for (GLint i = 1; i < argc; i++) for (GLint i = 1; i < argc; i++)
if (strcmp(argv[i], "-info") == 0) { if (strcmp(argv[i], "-info") == 0) {
printf("GL_VENDOR = %s\n", (char *)glGetString(GL_VENDOR)); printf("GL_VENDOR = %s\n", (char *)glGetString(GL_VENDOR));
@ -372,7 +374,7 @@ int main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
glutInit(&argc, argv); glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
win = glutCreateWindow("Gears"); win = glutCreateWindow(window_title);
init_scene(); init_scene();
glutDisplayFunc(draw); glutDisplayFunc(draw);