GLUT emulation on top of alternate toolkit

…this is a continuation of another thread that got OT.

[b]Rob Fletcher said:

I expected you to reply!!!

Of course


So, how long before release 3.0 then?

Perhaps even a basic start could be made though to test the theory!

Should we have a go?


Well, 3.0 is on the horizon, but still some miles to go. The basic start you’re talking about could probably be a great help. You obviously have in depth knowledge about GLUT (I don’t), so doing this could spot lacks in the GLFW design that prevents certain aspects of GLUT emulation. That experience could be used for shaping the GLFW 3.0 API.

I think a starting point would be to emulate these basic parts:

  • Init & exit
  • Opening a window (fullscreen & gamemode too if possible)
  • The main loop (here GLFW doesn’t distinguish between Idle & Draw, but that can be emulated I think - e.g. constant drawing)
  • Keyboard and mouse input

Lower priority:

  • Geometric primitives (these should be easy to implement)
  • Font rendering (e.g. based on GLF or other similar toolkit)

That should not be impossible (with some compromises), and should cover well over 50% of the basic GLUT demo-style programs I think.

At least in the prototyping phase “GLFWGLUT” should be a separate lib. Later on we have to figure out who will use this emulation, and why, to make the best decision of how it should be packaged. It could still be a separate lib, but since it is linked with GLFW it is easy to expose all the GLFW functionality through the same lib too.

What do you think?

[This message has been edited by marcus256 (edited 11-22-2002).]


OK. If I make a basic start,I will see where it takes me …

I would think keeping the emulation lib separate would be a good thing, Rather than exposing the GLFW as well.

What would be interesting is if people thought there were things they think GLUT does best and did that with the emulation lib, and then used GLFW native calls to do other things.

The “mixed-mode” programming model would have to be looked at carefully. In the first instance maybe we would need to put some flags in the emulation layer to say it’s been used, and then to prevent other native GLFW calls from being used! Else, I can envisage mayhem and confusion!

I’ll get back when I have something to lopok at!