Steps to set up toolkits Libraries for your OpenGL applications

1. Loading Libraries for OpenGL Functions
OpenGL loading libraries handle the loading of OpenGL functions.

(1) gl3w
Focusing on OpenGL3/4 Core context loading.

Its main part is a simple gl3w_gen.py Python 2.6 script that downloads the glcorearb.h header and generates gl3w.h and gl3w.c from it. Those files can then be added and linked (statically or dynamically) into your project.

Assuming that you already:

  • grabbed python script
  • ran it: python gl3w_gen.py
  • found gl3w.h glcorearb.h and gl3w.c files generated

There are two ways:

First way. Just include those files in your project, so it will be compiled along with your own sources. Note, that you need to preserve GL folder or manually fix includes in gl3w.c.

Second way. Create a visual studio project, and add all three files in it and compile as static library. Then link it to your application (or just compile it in command line or makefile, whatever).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值