FreeGlut相关地址:

http://www.transmissionzero.co.uk/software/freeglut-devel/ 

选择 freeglut 2.8.0 MinGW Package

这样的话,就能在codeblock+MinGW下实现跨平台的opengl编程了。 

相关wiki:

http://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks 

使用的时候在codeblock -> project build options -> Linker settings -> link libraries中的设置是:

opengl32

glu32

libfreeglut.a

libfreeglut_static.a

 

代码中:

#include <windows.h>

#include <gl/glut.h>

好吧,最后发现自己在瞎折腾,只要 linker settings中设置:

opengl32

glu32

就能直接使用glut相关的方法了,丫的,中午自己晕了。 

 

注意如果是 win764位系统请将 几个opengl要用的dll放在 windows\SysWOW64\文件夹下

关于 opengl 的几个主要的公用库请见 https://www.opengl.org/sdk/docs/tutorials/OGLSamples/

https://www.opengl.org/wiki/Image_Libraries

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2022-01-25
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2021-11-20
  • 2022-02-03
  • 2021-11-02
  • 2022-12-23
相关资源
相似解决方案