Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
slashupp is currently offline  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 Smile

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

 
Read Message
Read Message
Previous Topic: int64 in JSON
Next Topic: Upp 12405 broken ?
Goto Forum:
  


Current Time: Tue Jun 03 11:07:46 CEST 2025

Total time taken to generate the page: 0.02183 seconds