dartsim / grip

GRIP is a graphical interface that assists with developing applications based on DART.
http://www.golems.org/
8 stars 6 forks source link

Function called without first calling 'glutInit' #29

Open saulrh opened 11 years ago

saulrh commented 11 years ago

I get the following error after GRIP loads a world:

freeglut ERROR: Function <glutSolidCube> called without first calling 'glutInit'.

The world loads, but GRIP crashes as soon as it tries to render. GRIP is unusable in this state.

ehuang3 commented 11 years ago

I will replace drawCube (and other draw calls) with pure gl calls instead of glut calls. I believe dart's apps uses glut but it seems grip does not use glut.

saulrh commented 11 years ago

Turns out it was a bad commit that Tobias made to DART; it's been fixed.

saulrh commented 11 years ago

You can remove the glut calls if you want, though. Probably not a big deal.

ehuang3 commented 11 years ago

Let's leave this issue open for now, I want to remove the glut calls because they will crash GRIP if used.

tobiaskunz commented 11 years ago

Why are they crashing GRIP?

ehuang3 commented 11 years ago

I believe glut expects to be called within it's own execution context, glutMainLoop(). Therefore it reports an error when called out of context. glutSolidCube is a convenience function for drawing a cube that glut provides.

tobiaskunz commented 11 years ago

Are we calling glutInit when using GRIP? May be we are just not initializing glut.

ehuang3 commented 11 years ago

No, we are not calling glutInit in GRIP. wx runs the main loop in GRIP. I do not think we can run glut in GRIP as glut expects control of the main loop.