开发者

Learning OpenGL without GLUT? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

I have yet to find a good resource that doesn't include GLUT as it's back-end. Sure there's the Nehe tutorials, but I find those a bit obscure. It uses the Win32 API, yet I want to perform cross-platform development. GLUT is somewhat aimed for towards Windows than the other 2, even though it's supposed to be cross-platform. What are some good resources that teach OpenGL without GLUT? And please don't suggest FreeGLUT, that's just basically GLUT all over ag开发者_运维问答ain.


Most important is, that you already onderstood that OpenGL is not tied to GLUT. And yes, doing all that OS specific stuff yourself becomes tedious.

I now recommend people to use GLFW http://glfw.org, an excellent OpenGL framework with thorough support for OpenGL-3 and built in extension loading mechanism. Instead of having a black box event loop, like GLUT, GLFW gives you full control over how events are processed.

Once your demands get more advanced you may end up writing your own framework, but for most projects GLFW is an excellent choice.

And of course most traditional toolkits like GTK+, Qt, wxWidgets, Fox... provide some OpenGL widget.


I don't see how FreeGLUT is geared more towards Windows than any of the other major operating systems - the API is cross-platform, and FreeGLUT is a very stable project which works well on the operating systems which it claims to support. On what evidence do you base this claim? That said, you could use SDL or the JogAmp APIs. The latter, however, is written in Java, but if you're so concerned about maintaining cross-platform support without any recompilation of the source code, then you may want to consider programming in Java. The JogAmp APIs include support for OpenGL, OpenCL, OpenMAX, and have support for lightweight native windows, so the performance penalty should not be very drastic. Moreover, JOGL provides support for various OpenGL profiles and facilitates the task of choosing which minimum OpenGL version you would like to support in your applications.


Check out the code from http://www.galaxy-forces.com/

It initializes and uses OpenGL without glut or other libraries. Windows, Mac and Linux is supported.

I realize there are reasons for not wanting to use other libraries... All other answers tries to get you to use other libraries.

I suppose this answer is doing the same, but at least you will have the code. All is public domain.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜