How to set up gl3w on Windows?

本小妞迷上赌 提交于 2019-12-19 10:08:50

问题


I was looking for a detailed guide to setting up Gl3w, since there are none anywhere I look!


回答1:


First of all, download gl3w at https://github.com/skaslev/gl3w

Then, download Python 3.x:

https://www.python.org/downloads/

Next, run the script. It'll generate gl3w.c in the source folder, and gl3w.h and glcorearb.h in the include/GL/ folder.

Take the three of them, and either add them directly to your project, or (easier to do the includes), move them into your project's source files folder, and add the 3 into the project.

In your main source AND in your "gl3w.c" source, you want to change the include to #include "gl3w.h" Consequently, you'll have to change gl3w.h's include to #include "glcorearb.h"

This is because you changed their folder setups, the compiler will throw "can't find xxx" otherwise.

And don't forget to link to "opengl32", simply add the library as such. In Code::Blocks, you select the root project, go into "build options", select the root project once again (above Debug and Release), go to Linker Settings, Add, and type just "opengl2" without the quotes.

That's all!



来源:https://stackoverflow.com/questions/14115684/how-to-set-up-gl3w-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!