Registered: 14 years ago
In short, the static keyword prevents you from using the global variables or functions in another source file. Apart from the main function, the only other function that is not declared static is the void OpenGLInit(void) function.
If you had a larger programme that had more than one source file to compile, you could call it from the other source programme by either including the function declaration in that file but preceding it by the keyword extern.
This would satisfy the compiler and it won't complain that the function is not defined in that source file. However, if you tried that with a static function or variable, your source file would compile properly but the linker would complain.
Basically, if you don't declare something static, it is globally available to all functions and classes in your entire programme. If you DO declare something as static, it only has file scope, you can only use it in the file that it's declared.