OpenGL Windows Question

Started by
1 comment, last by doesnotcompute 10 years, 6 months ago

Recently I started looking through OpenGL and I think it would be great to learn and work with. I've used other graphic libraries before so this isn't a tech "how to do this" question. My question however is, being that my primary platform is Windows, how should I setup my environment? I have access to VS2010 - 2012 and I've used other IDE's before as well. I've glanced through information about GLEW and GLFW and from what I've read their used to make certain things easier in OpenGL and cross platform support.

tl;dr: I'm on Windows, should I be using GLEW, GLFW or any other libraries? Is there a certain IDE that doesn't play well with OpenGL vs another? Most of the links I've read about the subject are either outdated or don't use GLEW/GLFW for anything so that's why I'm here.

Thanks!

Advertisement

GLFW is your best bet here, it's really an active project, and they just released the version 3, which add nice features like multi monitor support and physical key input. an alternative is freeglut, it only come as source release, but you can found window binary for it pretty easily. keep in mind that GLFW abstract mainly windows creation and input management, for rendering, you just have to use regular opengl calls that work the same way across platform. You will have use for glew only if you use function that aren't available on microsoft opengl implementation, like vertex buffer generation.

Also, for debugging, you could look into gDebugger : http://www.gremedy.com/ , it come with everything you need to debug graphic code (buffer visualization, breakpoint on specific opengl call, etc.)

I personally use GLFW/GLEW under windows and linux and I haven't any trouble setting it up under vs2010, the api is quite straightforward. Just keep in mind that it still a library bound to pc, so if you aim to tinker with mobile devices/opengl es, you could look into alternative like regal, which aim to be a full cross platform library : https://github.com/p3/regal it's still in early development, but have a lot of potential.

Another advice, if you just start with opengl, it's probably better to avoid any old tutorial using fixed function pipeline (like the one using deprecated glbegin glend function)

At a minimum on Window you should use GLEW. There are no system headers/libs for accessing modern OpenGL on Windows so you need to query every function at runtime using wglGetProcAddress. GLEW automates all of this, it queries all the function pointers your card supports and puts them in global function pointers so you can use it like a regular C API. It also provides a header with all the typedefs and constants you'll need to work with these functions.

It's worth pointing out that gDebugger is basically a legacy application now. It was purchased by AMD and has been integrated into their CodeXL profiler/debugger.

This topic is closed to new replies.

Advertisement