FreeGLUT和GLFW有什么区别? [英] What is the difference between FreeGLUT vs GLFW?

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

问题描述

我的大学开始教授包含OpenGL编程的课程.它们使我们使用FreeGLUT为OpenGL创建窗口和上下文,但是我在lynda.com上找到了有关OpenGL的在线课程,其中他们使用GLFW而不是FreeGLUT.

My university started teaching a course which includes OpenGL programming. They make us use FreeGLUT to create a window and a context for OpenGL, but I found an online course at lynda.com about OpenGL in which they use GLFW instead of FreeGLUT.

所以我想知道我应该使用哪一个,两者之间有什么区别?

So I want to know which one should I use and what are the differences between the two?

推荐答案

FreeGLUT:

  • 基于GLUT API.
  • GLUT与OpenGL本身的存在时间差不多.
  • 许多教程和示例都使用GLUT.
  • 负责实现事件循环并通过回调进行工作(对简单的东西很有用,但是使诸如精确定时的动画循环和低延迟输入之类的事情变得更加困难).

GLFW:

  • 从头开始设计,并牢记其他框架的经验.
  • 对上下文创建和窗口属性进行更好的控制.
  • GLFW- 2 提供基本的线程支持功能(线程创建,同步). -已从GLFW-3中删除
  • GLFW- 2 提供基本的图像文件加载支持. -已从GLFW-3中删除
  • 可以非常详细地访问输入设备.
  • 事件循环受程序员的控制,它可以使计时更加精确,并减少延迟.
  • Designed from scratch with the experiences of other frameworks in mind.
  • Gives much finer control over context creation and window attributes.
  • GLFW-2 Provides basic threading support functions (thread creation, synchronization). –– removed from GLFW-3
  • GLFW-2 Provides basic image file loading support. –– removed from GLFW-3
  • Gives very detailed access to input devices.
  • Event loop is in control of the programmer which allows for much preciser timing and lower latency.

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

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