SDL2, OpenGL 3.3 ... 4.3, depth buffer

I’m doing a game engine with a friends, i am using SDL2 with mixer,image, ttf and net, GLEW 1.10, and LUA 5.2.0… but I have a serius problem when I try to draw 3D objects in a window. When I show a 3D model, I see that back faces interpolates with front faces, and my 3d model looks bad.
I saw that this problem solvates in opengl using:


but its doesnt work [Crying or Very sad]

In my SDL2 OpenGL declaration i have:

SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);

before SDL_Window creation, and I have:


after glewInit();

I’ve two questions: ?Is GLEW the best way to user OpenGL with SDL2? ?Is there any function to check if OpenGL depth buffer is currently enabled?

Sorry for my English but I have secondary school level… jajaja

PD2: If I declare two objects with different Z values, OpenGL draws the last one in my buffer and not that with less z value.

I’m sorry, I have found the problem, when I draw a Text class, I use:


and I don’t activate again.

Thanks All for your time.