本文介绍了OpenGL中的着色器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在C ++中使用glShaderSource之类的东西.Visual Studio说不存在诸如glCompileShader或glCreateProgram之类的函数.我使用FreeGLUT包含OpenGL.有人知道我该如何解决吗?

I'm trying to use stuff like glShaderSource in C++.Visual Studio says that functions like glCompileShader or glCreateProgram dont exist.I use FreeGLUT to include OpenGL. Does anybody have an idea how I can fix this?

推荐答案

在Windows上,必须通过扩展名mechansim加载GL1.1以外的任何内容.最方便的方法是使用 GL加载程序,例如 glew .

On windows, anything beyond GL1.1 must be loaded via the extension mechansim. The most convenient way to do so is by using a GL loader like glew.

这篇关于OpenGL中的着色器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:12
查看更多