PDA

View Full Version : OpenGL Projected Textures in Opengl.org 0xC0000005: Access violation Error



ladbrown
12-22-2015, 03:40 PM
I am trying to get the projected texture in "https://www.opengl.org/archives/resources/code/samples/mjktips/projtex/index.html" to work. I used a .bin file however I get the following error in the imgLoad function, right at (p[0] = borderColorIn[0] * 0xff;) . Any idea?

Unhandled exception at 0x009D4780 in ProjTex.exe: 0xC0000005: Access violation writing location 0x00000000.

mhagain
12-22-2015, 03:42 PM
That's a NULL pointer. Impossible to say which pointer, of course, but check if p or borderColorIn are NULL.

ladbrown
12-22-2015, 03:53 PM
That's a NULL pointer. Impossible to say which pointer, of course, but check if p or borderColorIn are NULL.

I think the issue is with the input image. Anyone knows what format works?

GClements
12-22-2015, 08:48 PM
I think the issue is with the input image. Anyone knows what format works?

The comment at the top of texture1.c says that it's for a SGI .rgb file.