How to create a class to wrap GLUT?

后端 未结 3 991
闹比i
闹比i 2020-12-07 04:27

I\'m writing a game for school in OpenGL. Since there will be several more similar assignments I want to make a small framework for doing common things in OpenGL. I have mad

3条回答
  •  北海茫月
    2020-12-07 04:39

    Before I was using SDL, so my question is, is this the right way of going about this in OpenGL?

    I'd rather bypass GLUT completely (if you want to learn the inner guts of OpenGL and your OS windowing system interface). Plus GLUT is not supported on the iPhone (if you want to target this platform in the future).

    So the idea would be to use WGL on Windows, GLX on Linux and CGL on OS X.

提交回复
热议问题