A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
Hello @Sid Kraft ,
Thanks for your question.
The glutInit function initializes the GLUT library. It expects the command-line arguments provided to your application.
arg1: A pointer to an integer representing the number of command-line arguments.
arg2: An array of strings representing the actual command-line arguments.
While you can pass dummy variables, I recommend passing the arguments directly from your main function:
int main(int argc, char** argv) {
glutInit(&argc, argv);
// window creation
return 0;
}
If you need to pass dummy variables because your main function does not have parameters, use this setup:
int main() {
int dummy_argc = 1;
char* dummy_argv[1] = { (char*)"ProgramName" };
glutInit(&dummy_argc, dummy_argv);
return 0;
}
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback. Thank you.