OpenGL中的着色器问题 [英] Problems with Shaders in OpenGL

查看:122
本文介绍了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加载程序,例如

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中的着色器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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