first of all I would like to say I am pretty new in debugging with NSight, but I am facing problem. When I try to enter to frame debug mode I get error message (see attached image):
“Cannot enter frame debugging… Reason: glTexEnvi”
Image here (cannot insert directly images): http://imgur.com/NpeNDM6
I am running 4.2 OGL context and I am pretty sure I have never used glTexEnvi in my code (I’ve searched in entire solution to find that pattern with 0 results). My NSight version is one of the newest ones (4.5 I think) and I am using GTX 960. Do you have any clue what could possibly cause this problem? Thanks for any answer.
As you see Nsight only support OGL 4.2 core profile and ‘glTexEnvi’ is some very old OGL API, and it’s not be a part of core profile for a long time.
I am not sure where to find your sample, but I do recommend you check your sample’s dependence project, like some UI lib, or you can try to search ‘glTexEnv’. Sometimes, the library will hide the render codes very deep, you need to find them carefully.
Thanks AYan. I know about OGL support but I’ll double check it when I get back home. I’ve tried to search for ‘glTexEnv’ pattern but with no results. I’ll post more info later.
Ok, some more info about the issue. Firstly I am using SDL2 and I set context like this:
//Set up OGL 4.2 version and force Core profile
maincontext = SDL_GL_CreateContext(mainwindow);
glewExperimental = GL_TRUE;
GLenum rev = glewInit();
But I am still getting the same error message. About ‘glTexEnv’ pattern. I’ve searched entire solution including dependencies and ‘glTexEnv’ occurs only in gl.h and glew.h files nowhere else. Am I missing something? Thanks in advance.
The code looks ok, but hard to tell where. Any chance I can check your sample?
Thanks for the reply. Do you want a source code or just binaries? I’ll post them both later today.
Ok, I stripped my project as much as possible and made archive (ignore the project name :) ). It contains visual studio project file, all libs, includes and it also contains binary. Archive is available from here:
Scanned for the viruses by BitDefender with negative result. Thanks in advance.
UPDATE: I think I’ve found the source of the problem. It looks like DEVIL library (or its dependencies) causing the problem.
Glad to hear that, as you said, it’s due to DevIL library, I just do some search in DevIL’s source code and find glTexEnvi will be called in ilutGLInit(), and that’s the init function call as a part of DevIL Library.
Just comment out ilutRenderer(ILUT_OPENGL); ilutInit(); then recompile, you will find Nsight works smoothly with you sample.
And from your source code, it’s not necessary for you to use DevIL’s ilutFOO functions, that’s a help toolkit of DevIL.
thanks for the help really appreciate it. You saved me a lot of time. I thought I’ll have to rewrite texture loading ;) Well, I think I can flag the topic as resolved.