Help end child hunger
Apr 102011
 

When working with the newest OpenGL functionality most of us rely on third party libs to make the functions available to us. Some examples of these third party libs are GLEW and GLEE.

These libs do a wonderful job and most of the time they save us a lot of work. However, sometimes strange things happen. Consider an application that has requested an OpenGL context version 3.3, with the core profile, using GLEW version 1.5.8.

When calling

GLuint k = glGetUniformBlockIndex(p,"Matrices");

The application crashes with an Unhandled exception. The reason is that glGetUniformBlockIndex has not been loaded in GLEW.

According to GLEW documentation:

GLEW obtains information on the supported extensions from the graphics driver. Experimental or pre-release drivers, however, might not report every available extension through the standard mechanism, in which case GLEW will report it unsupported.

I would expect not to have this issue since I’m using the latest release drivers from nVidia, which clearly state that they support OpenGL 3.3 on my GPU.

Anyway, fortunately GLEW documentation also tells us how to solve the problem:

To circumvent this situation, the glewExperimental global switch can be turned on by setting it to GL_TRUE before calling glewInit(), which ensures that all extensions with valid entry points will be exposed.

Basically, instead of calling only glewInit() just write:

glewExperimental= GL_TRUE;
glewInit();

And that should solve it 🙂

Apr 072011
 

GPU Tools | AMD Developer Central.

AMD has an excellent  collection of tools for OpenCL and Shader development in the GPU Tools area. Included are PerfStudio, a performance analysis and debugging tool, and ShaderAnalizer for analysing the performance of individual shaders. Currently they only work with Compatibility Profile, hope an update will cover the more recent versions.

Mar 282011
 

Randi J. Rost, Bill Licea-Kane, Dan Ginsburg, John M. Kessenic, Barthold Lichtenbelt, Hugh Malan, Mike Weiblen

This is the third edition of the orange book. It covers GLSL 1.4 and entry points from OpenGL 3.1. As usual the book is part tutorial, part reference. Very well written, clear and concise. Check out the companion site.

More information about this title at Amazon.com or Amazon.co.uk

Mar 222011
 

gDEBugger – OpenGL and OpenCL Debugger, Profiler and Memory Analyzer.

A must have tool. It profiles your code using OpenGL with GLSL, showing the number of function calls, your data on the graphics hardware, shaders, uniforms, vertex data, … you name it. You can establish breakpoints at OpenGL functions and run it function by function, or frame by frame. It does not require any additions to your code, and even tells you if you’re calling deprecated functions.

Mar 112011
 

OpenCL Studio is a tool that integrates OpenCL and OpenGL in a single development environment. There is a free version that is limited only in the number of items in your project tree.

The app has a few demo projects, and there are video tutorials on the site.