Desperate Desperate - 1 year ago 88
C Question

call to GLeeInit() gives EXC_BAD_ACCESS

So I'm trying to solve an exercise for a computer graphics class and I already have a problem trying to get the project to run.

So we just started working with OpenGL and we are using the GLee library. Since I'm working on OSx and the project wasn't really made for this I already had some trouble forcing my mac to use OpenGL 3.0 instead of 2.1 but I figured that a call to GLeeInit() is supposed to fix this. Now this is where I have a problem. When I call GLeeInit() this gives me a bunch of EXC_BAD_ACCESS' and the whole stuff exits with return code 11.

To me it seems that I somewhere try have a null-pointer access but I have no idea what the actual problem is.

EDIT: Taking advice from the first answer I'll simply remove calls to GLee since I probably don't need GLee on OS x. Now I get stuck with the following error "ERROR: 0:1: '' : version '130' is not supported" which tells me absolutely nothing..

EDIT: Trying to get my shaders to work here is the code for the shorter one.. so I think it's not as mentioned a problem that I try to compile a 2.0 shader as 3.0 or something like that

\#version 130

in vec4 color_out;

// Fragment program entry point
void main(void)
gl_FragColor = color_out;

Answer Source

Since I'm working on OSx

… you don't need GLee. Seriously. You don't need GLee, or GLEW, or any other extension loader at all, because you're on MacOS X. Loading modern OpenGL entry points is required only on Windows, Linux, Solaris and BSD. But in MacOS X you get all the OpenGL entry points, including those of OpenGL-3 and -4 out of the box.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download