Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Saturday, May 12, 2012

A Good Place to Start OpenGL

Many people want to learn OpenGL. Most of these people have no idea where to start. About everyone will learn OpenGL in some deprecated or round-a-bout way that discourages them from continuing their studies.

Well that's stupid and I'd like to at least point people in the right direction for getting started. This definitely isn't a tutorial, but I hope that it does serve to broaden your knowledge of available OpenGL tools, libraries and resources.

Here are the resources:

Basically you should walk through the samples provided over at g-truc to get an idea of what it means to create a current generation OpenGL project. The authors say that the code is not for beginners but they are only being modest and probably just don't intend for them to be used by beginners. I can honestly say that they are some of the best examples of OpenGL code available.

To build them on Windows for Visual Studio 2010 you need to install cmake. After that open up command line by running it as administrator. In this cmd window change to the samples folder that contains the /data, /external, /samples... the top level of the folder. Run the command [cmake -G "Visual Studio 10"]. Do not use the cmake GUI for this as it won't work. Now you should have vs2010 projects built that you can explore by opening the .sln.

What I suggest that you do is copy the projects and get accustomed to how they use OpenGL to express themselves. Their image loading tool, GLI, is for bringing in images to the program to use as textures. FreeGLUT is a "make windows and other stuff" utility that some people use. I honestly think all GLUT stuff is lame and suggest you learn to use GLFW instead. GLM is a great way to encapsulate all of your math needs for things such as vectors and matricies (which you will make heavy use of). It gives you a portable math solution that works great with OpenGL.

Friday, May 4, 2012

gDEBugger you a good life

Debugging graphics can be a pain. It definitely takes an amount of skill and knowledge that comes to you slowly over whats perhaps a long period of practice. Seeing an ambiguous error pop up and knowing that it has something to do with a color inside of a texture on the graphics device is something that may not be obvious to some.

There exists an amazing gift from humanity to itself (specifically the amazing developers at Graphic Remedy ), and it is called gDEBugger. Simply put it is a must have tool that will change the way you develop OpenGL applications for the better, without question. It's like Pix for DirectX (but I think it may be older and thus the original).

Some of it's features include pausing/breaking execution, examining every texture/buffer active, a performance report of your number of OpenGL calls made a frame, frame rate, examining the depth buffer and adjusting the Z-Near/Far, inverting textures, a full report of every active uniform on the device, all shaders in use, which shader program is currently active (I even think you can edit them in real time for hot changes, haven't tried it though so don't quote me), and tons more things like bottleneck locating by either killing all graphics, setting the view port to a 1x1 stenciled pixel... tons of stuff. This tool is a must.

You can get it for FREE. It's free. That's insane: http://www.gremedy.com/.

So yea. Don't say I never gave you anything lol.