Alright, nevermind.
Tried implementing my GetBitmap function after my loadlibrary and function pointer setup. Stepping into the same line as last time causes the same strange issue: the Pelles C debugger treats the next "Step Into" as "Go/Debug" and loses focus to the window. Now, it doesn't tell me anything either through the debugger or normal execution that would let me know that the calls are not being reached. I added sprintf and MessageBox lines so that I could get the error code (which the debugger couldn't show me because it wouldn't step to the next line) and it's 0, which probably means it is OK. It's interesting that by adding these two lines the debugger allows me to "step into" normally! But why is it skipping lines otherwise?
This might make it clearer, if my explanation was confusing:
Case #1:
fclose(bmFile); <------------------------------------BREAKPOINT HERE.
glActiveTexture(GL_TEXTURE0); <------------------------------------STEP INTO HERE
enumGLError = glGetError(); <------------------------------------Another step into DOES NOT get here! It just runs and gives focus to my window.
glGenTextures(1, &texture);
enumGLError = glGetError();
glBindTexture(GL_TEXTURE_2D, texture);
enumGLError = glGetError();
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, /*Type of texture*/
0, /*Level of Detail number*/
GL_RGB, /*Internal format*/
bmWidthPx, /*Width in texels(pixels?)*/
bmHeightPx, /*Height in texels(pixels?)*/
0, /*Border. Must be 0 (probably only for 2D)*/
GL_BGR, /*Format, of the data the texture will be created from*/
GL_UNSIGNED_BYTE,/*Data type of the pixel data*/
bmBuffer); /*Pointer to the image data to create the texture from*/
//glBindTexture(GL_TEXTURE_2D, 0);
free(bmBuffer);
Case #2:
fclose(bmFile); <------------------------------------BREAKPOINT HERE.
char msgData[100];
glActiveTexture(GL_TEXTURE0); <------------------------------------STEP INTO HERE.
enumGLError = glGetError(); <------------------------------------STEP INTO works here!
sprintf(msgData, "%i", enumGLError); <------------------------------------And here!
MessageBox(NULL, msgData, NULL, MB_OK | MB_ICONINFORMATION); <------------------------------------And for everything after! Returns 0 for error, which leads me to believe it is OK, but the debugger just ignores everything after glActiveTexture.
glGenTextures(1, &texture);
enumGLError = glGetError();
glBindTexture(GL_TEXTURE_2D, texture);
enumGLError = glGetError();
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, /*Type of texture*/
0, /*Level of Detail number*/
GL_RGB, /*Internal format*/
bmWidthPx, /*Width in texels(pixels?)*/
bmHeightPx, /*Height in texels(pixels?)*/
0, /*Border. Must be 0 (probably only for 2D)*/
GL_BGR, /*Format, of the data the texture will be created from*/
GL_UNSIGNED_BYTE,/*Data type of the pixel data*/
bmBuffer); /*Pointer to the image data to create the texture from*/
//glBindTexture(GL_TEXTURE_2D, 0);
free(bmBuffer);
glActiveTexture comes from atio6axx.dll. That is the only thing about it that I think could be related to the way Pelles C is handling this. I checked my registry key related to the Windows 7 compatibility shim, etc, and saw nothing. So that is not occurring here. It looks like this is error free, but the debugger is acting weird. Is it just the way that Pelles C handles returns from certain externally loaded libraries?
Edit: I suppose my real question is: Does this behaviour of the Pelles C debugger mask a real issue with my code?
Attached is code, 64bit.