What is the difference? (OpenGL)

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

What is the difference? (OpenGL)

Postby AronE. on Fri Jul 15, 2016 11:27 am


So many GL's.... How are they different from each other? Which are the most used ones and why? I tried researching it myself but got nowhere with finding an answer.
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 31
Joined: Mon Sep 14, 2015 9:04 am

Re: What is the difference? (OpenGL)

Postby lelandbdean on Fri Jul 15, 2016 1:04 pm

Generally, if you're on desktop you probably already have an OpenGL C library (and headers) installed on your system.
You can use OpenGL already, if that's the case. (Tutorials will show you how to link it, etc).

If you're stuck I would recommend checking out this thread: http://forums.elysianshadows.com//viewtopic.php?f=6&t=4547
and go to the OpenGL section. I recommend the NeHe tutorials.

GLSL (GL Shader Language) Part of OpenGL. OpenGL shaders are written in this and compiled into shader programs by OpenGL. With modern OpenGL you'll care about this sooner rather than later. With older OpenGL versions, you can get away with not learning this immediately if you're not doing anything too fancy.

As for all these other libs: I haven't used some of them, and finding someone who has used every OpenGL-related lib there is might be difficult.
Don't be paralyzed by worry that you aren't picking the objective best library out of a zillion--just dig into something and see how it goes.
Also, RTFM when possible (it'll save you a lot of grief in the long run).

GLbinding: a generated, cross-platform C++ binding for OpenGL which is solely based on the new xml-based OpenGL API specification.
GLee: (GL Easy Extension) is a free cross-platform extension loading library for OpenGL. Claims 400 extensions (dear God why)
GLEW: (GL Extension Wrangler) a cross-platform open-source C/C++ extension loading library. (Standard-ish)
GL3W: (Name is pun of GLEW, I assume) focuses on the core profile of OpenGL 3 and 4. It only loads the core entrypoints for these OpenGL versions. Doesn't load extensions.
GLUT: (GL Utility Toolkit) a somewhat high-level wrapper for parts of OpenGL. Helps you get shit off the ground faster and learn OpenGL
GLFW: (GL ???) a high level OpenGL wrapper, seemingly. Also has input handling built in. Don't know how it compares to SDL.

You can make an OpenGL-rendered program without using any of the libraries above, but it will be more involved (and you'll learn more).

Sources: Prior experience/ Google
if I fucked up any of those Twitter-tier descriptions call me out
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 18
Joined: Thu Mar 28, 2013 11:37 pm

Re: What is the difference? (OpenGL)

Postby dandymcgee on Fri Jul 15, 2016 5:11 pm

lelandbdean wrote:GL3W: (Name is pun of GLEW, I assume) focuses on the core profile of OpenGL 3 and 4. It only loads the core entrypoints for these OpenGL versions. Doesn't load extensions.

Personally, I use GL3W for this very reason. The fact that it only loads core profile and excludes all of the deprecated functions makes it easy for me to avoid accidentally using fixed-pipeline stuff. I found it very difficult to find a reliable reference that marks everything as core or not, so I'd prefer to just not hook the stuff I don't need. That said, there are are some downsides, and this won't work if you *need* "old" OpenGL for some reason (e.g. target hardware doesn't support modern OGL). They are all slight variations of the same idea, which is that you need to query and hook into all of the OpenGL methods so that you can call them. You can do this yourself with a million dllimport calls and a ton of OS-specific, version-specific logic.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
ES Beta Backer
ES Beta Backer
Posts: 4707
Joined: Tue Apr 29, 2008 4:24 pm
Location: San Francisco

Return to Programming Discussion

Who is online

Users browsing this forum: No registered users and 1 guest