I want to debug my program with renderdoc. I created my context with SDL_GL standard function. I get this error when running the application using render doc.
"OpenGL. Context not created via CreateCont Only OpenGL 3.2+ contexts are supported"
I added this argument before I created my context:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
That should force a core profile, yet the error is still there.
What am I doing wrong here?
-----Edit-----
Even after forcing version 3.2 (exact version required) the thing still complaints.
Here is the init block of my window class:
//System init
if(!SDL_WasInit(SDL_INIT_EVERYTHING))
SDL_Init(SDL_INIT_EVERYTHING);
this->SDL_window = SDL_CreateWindow(title,10,10,w,h,SDL_WINDOW_OPENGL);
if(this->SDL_window!=NULL)
{
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
this->context = SDL_GL_CreateContext(SDL_window);
if(!this->context)
{
SDL_DestroyWindow(SDL_window);
COUT<<"FAILED TO CREATE CONTEXT. PRINTING ERROR AND THROWING EXCEPTION"<<ENDL;
COUT<<SDL_GetError()<<ENDL;
throw "ENGINE::WINDOW::GLCONTEXTERR";
}
glewExperimental = GL_TRUE;
glewInit();
}
else
{
COUT<<"FAILED TO CREATE WINDOW. PRINTING ERROR AND THROWING EXCEPTION"<<ENDL;
COUT<<SDL_GetError()<<ENDL;
throw "ENGINE::WINDOW::SDLWINDOWERR";
}