cant change opengl sdl double buffering attribute

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
bool InitGL(SDL_Window* window)
{
	SDL_GL_CreateContext(window);

	int test;

	SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &test);
	cout << test << endl;

	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,false);

	SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &test);
	cout << test << endl;

	return (glewInit() == GLEW_OK);
}


when i run it i get
1
2
1
1

in the console, but shouldn't i get
1
2
1
0

since i'm setting it to false ?
Why don't you check the return value from SDL_GL_SetAttribute ?
Topic archived. No new replies allowed.