Home » Developing U++ » Bugs (& fixes) » glut init-error.
Re: glut init-error. [message #48924 is a reply to message #40047] |
Fri, 03 November 2017 10:58  |
slashupp
Messages: 231 Registered: July 2009
|
Experienced Member |
|
|
I know this is old, but I hit same problem and solved it like below,
putting this here for next guy 
give your class a ctor in which you do the following to let
glut initialize properly:
OpenGLUT2::OpenGLUT2()
{
char *myargv[1];
int myargc=1;
myargv [0]=strdup(GetExeTitle().ToStd().c_str());
glutInit(&myargc, myargv);
//...whatever else you need in the ctor...
}
Fake parameters does not work - it must either be an exact copy of
what was passed to main, or at least supply correct data as above.
[Updated on: Fri, 03 November 2017 11:00] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Jun 03 11:07:46 CEST 2025
Total time taken to generate the page: 0.02183 seconds
|