Jump to content
  • Advertisement
Sign in to follow this  
Bolbi

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

This topic is 1675 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!