iamscottmoyers / cambhaxx-gles

GLES experiment
5 stars 0 forks source link

Windowing system abstraction #6

Closed iamscottmoyers closed 11 years ago

iamscottmoyers commented 11 years ago

I'm thinking we should remove the USE_GTK=1 stuff from main.c.

Perhaps:

Need to figure out how the callbacks will work. Maybe pass them to window_system_init().

After this, all windowing system specific stuff should be inside their own windowsystem*.c file.... I'm not sure how long we'll be able to keep it that way though, might have to avoid using features that are only specific to a single windowing system.

17twenty commented 11 years ago

That's a pretty good move, it's unmaintainable to do what we're doing as we get bigger.

I'd propose different source files for each window manager but align their APIs (even if one file only has stubs).

We ideally will need an event manager to abstract us away from having to care about toolkit specifics.

17twenty commented 11 years ago

Gah it's too early. I basically repeated most of your comment !

17twenty commented 11 years ago

Started my day rambling nonsense about this idea, ended it by implementing something. Have a look and see if it's heading towards what you are thinking. Else I can rework if you don't want to touch it!

iamscottmoyers commented 11 years ago

Looks good. I've added GLUT in revision 8c62fd68aa36e2c216a36a514038f36c053e8c4d . Hopefully you weren't already working on it :S.

Now none of the code uses the USE_GTK macro. Looks neat. Maybe we shouldn't even be using -DUSE_GTK anymore?

17twenty commented 11 years ago

Removing -DUSE_GTK seems fine as it's no longer used. Going to close this issue, open another if more issues arise re: window managers.