如何在Windows上设置gl3w? [英] How to set up gl3w on Windows?

查看:309
本文介绍了如何在Windows上设置gl3w?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找有关设置Gl3w的详细指南,因为我找不到任何地方!

解决方案

首先,从 https:下载gl3w. //github.com/skaslev/gl3w

然后,下载Python 3.x:

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

接下来,运行脚本.它将在源文件夹中生成gl3w.c,并在include/GL/文件夹中生成gl3w.h和glcorearb.h.

接受其中三个,或者直接将它们添加到您的项目中,或者(更容易执行包含操作),将它们移动到项目的源文件文件夹中,然后将三个添加到项目中.

在您的主要来源和"gl3w.c"来源中,您想要将包含更改为#include"gl3w.h" 因此,您必须将gl3w.h的包含项更改为#include"glcorearb.h"

这是因为您更改了他们的文件夹设置,否则编译器将抛出找不到xxx".

别忘了链接到"opengl32",只需添加库即可.在Code :: Blocks中,选择根项目,进入构建选项",再次选择根项目(在Debug和Release之上),转到Linker Settings,添加,然后仅输入"opengl2"(不带引号). /p>

仅此而已!

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

解决方案

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!

这篇关于如何在Windows上设置gl3w?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆