Freeglut vs Glew的区别? [英] difference of freeglut vs glew?

查看:128
本文介绍了Freeglut vs Glew的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始学习OpenGL(> 3.3)&我注意到很多例子教程同时使用freeglut和&出现问题,但根本不解释差异.谷歌搜索和搜索后,我发现的最好的描述是阅读广告恶作剧的人 OpenGL相关工具包和API ,但发现缺少它.我什至都读过SO上的标签信息.

I've recently started learning OpenGL (> 3.3) & I've noticed a lot of examples & tutorials use both freeglut & glew, but don't really explain the difference at all. The best description I've found, after googling & reading ad nauseum, has been this OpenGL Related toolkits and APIs but found it lacking. I've even read the tag info on SO.

作为真正对OpenGL陌生的人,我仍在尝试掌握不同的概念.我已经进入创建使用glew的基本程序,创建上下文(在Windows,VS2010上)和&绘制真正的基本形状,所有这些都不需要显式包含freeglut.所以我不明白为什么会需要它.

As someone really new to OpenGL I'm still trying to get a grasp of the different concepts. I've gotten to the stage of creating a basic program that uses glew, create context (on windows, VS2010), & draw really basic shapes, all without the need for explicitly including freeglut. So I don't understand why I would need it.

那么我的问题是,两者之间的差异是多少?
游离谷蛋白
gle
-(& glfw)
一个人可以其他人不能做的?

So my question then is, what's the difference between:
-freeglut
-glew
-(& glfw)
What can one do that the other can't?

推荐答案

OpenGL扩展牧马人( GLEW )用于访问现代OpenGL API函数(版本3.2到最新版本).我们使用的是OpenGL的旧版本,那么我们就可以简单地访问OpenGL函数,包括 #include< GL/gl.h> .但是在现代OpenGL中,API函数是在运行时确定的,而不是在运行时确定的编译时间.GLEW将处理OpenGL API的运行时加载.有关GLEW的信息,请参见此处

The OpenGL Extension Wrangler (GLEW) is used to access the modern OpenGL API functions(version 3.2 up to latest version).If we use an ancient version of OpenGL then we can access the OpenGL functions simply including as #include <GL/gl.h>.But in modern OpenGL, the API functions are determined at run time, not compile time. GLEW will handle the run time loading of the OpenGL API.About GLEW see here

GLFW freeglut 将允许我们创建一个窗口,并以跨平台方式接收鼠标和键盘输入.OpenGL不处理窗口的创建或输入,因此我们必须使用这些库来处理窗口,键盘,鼠标,操纵杆,输入和其他用途.

GLFW or freeglut will allow us to create a window, and receive mouse and keyboard input in a cross-platform way. OpenGL does not handle window creation or input, so we have to use these library for handling window, keyboard, mouse, joysticks, input and other purpose.

GLFW freeglut 是我们的替代品,我们可以根据需要选择任意一种,但 GLEW 不同于它们OpenGL API的运行时加载.

GLFW and freeglut are alternative for us according to our need we can choose any one but GLEW is different from them which is used for run time loading of the OpenGL API.

这篇关于Freeglut vs Glew的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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