GLFW/GLUT/GLU ... whats the best?

Started by
3 comments, last by 21st Century Moose 9 years, 11 months ago

I want to use OpenGL and I have no idea what all of these "GLU, GLUT" or whatever are

and what is the best.

If you know any good tut for OpenGL 3+ pls show.

thx guys :D

Advertisement

There is no "best" as they all serve different purposes.

GLU is a software library bolted on top of OpenGL to provide some additional functionality or to simplify some parts of OpenGL. Much of what's in it related to functionality that's been deprecated in GL3.x+ core contexts, so you can probably be better off forgetting it even existed.

GLEW provides a way of accessing GL functionality higher than 1.1 on certain systems. You can write this yourself, but GLEW certainly makes it easier (and less error-prone). You almost certainly need this (but there are other libraries available with the same functionality too).

GLUT mostly provides a quick and dirty way of getting a window open, creating a GL context for it, and handling some basic input and other events. Much tutorial material you'll find will use it, so it's good to know it. Again, it's all code that you can write yourself (using a library just means that you don't have to, so you can focus on learning OpenGL rather than OS code).

Other libraries such as GLFW, SDL provide similar to GLUT but with more functionality (and more complexity). That doesn't make them "better" or "worse"; for learning, GLUT is fine (and - as I mentioned - it's widespread use in tutorials means that it's going to be familiar code).

The ArcSynthesis tutorials (http://www.arcsynthesis.org/gltut/) are highly regarded and can be used for learning GL3.x+ without any of the older, more crufty, more confusing material.

The OpenGL.org "Getting Started" wiki page is also a good resource: http://www.opengl.org/wiki/Getting_Started

The NeHe set of tutorials used to be well-regarded but I'd probably avoid them nowadays (you'll almost certainly pick up bad habits and learn things the wrong way from particularly the earlier ones).

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

I'd second the ArcSynthesis tutorials, and also recommend having a look at Anton's OpenGL 4 Tutorials.

as for tutorials, id recommend www.open.gl, its one of the best tutorials out there for OpenGL 3.x/4 imho

if youre going for 3.x/4, all the "GLU, GLUT" thingies youll need are

GLEW (GL extension wrangler library) - will give you access to all the OpenGL functions you need

and a library that creates the context for you (i.e. opens a window for you to draw in, handles input for you, etc.)

GLFW and SDL would be my recommendations, SDL offers a little more extra functionality like networking/sound/image loading, GLFW is just context creation and input handling, youll have to load textures yourself or use another library for that (like SOIL)

------------------------------
Join the revolution and get a free donut!

SDL offers a little more extra functionality like networking/sound/image loading

I'll actually +1 this recommendation over mine, because image loading is important and can trip you up if you're not prepared in advance for it. Good call.

A cool thing about SDL is that it can start off quite simple - you can get a basic window and GL context going in a coupla lines of code - but it has added depth for when you get more experienced.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement