This is when the camera has not been rotated (I can translate the camera and the skybox stay the same):

In this one I have rotated the camera slighly:

As you can see it doesn't work as a proper skybox and I have no idea what the problem is.
This is my cubemap code:
// These are global variables
GLchar* CubeMapFaces[] = // cubemap faces filenames
{
"CubeMap\\pos_x.tga", "CubeMap\\neg_x.tga",
"CubeMap\\pos_y.tga", "CubeMap\\neg_y.tga",
"CubeMap\\pos_z.tga", "CubeMap\\neg_z.tga",
};
GLuint CubeMapTargets[] =
{
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
};
GLuint Textures[3];
// This is in my setup function where I load shaders and models and other initializing
// Cube map stuff
glBindTexture(GL_TEXTURE_CUBE_MAP, Textures[2]);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
for(GLuint i = 0; i < 6; i++)
{
ILinfo TextureInfo;
LoadImage(CubeMapFaces[i], &TextureInfo); // Wrapper I made for DevIL image library
glTexImage2D(CubeMapTargets[i], 0, GL_RGB, TextureInfo.Width, TextureInfo.Height, 0, TextureInfo.Format, GL_UNSIGNED_BYTE, TextureInfo.Data);
}
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
// In my rendering function
// ModelView is a matrix class I've made
ModelView.Load(Camera.GetCameraMatrix(true)); // Here I load the rotation only camera matrix
glBindTexture(GL_TEXTURE_CUBE_MAP, Textures[2]); // Bind my cubemap texture
glDisable(GL_CULL_FACE); // disable face culling so the inside of the cube is rendered
// Shaders is my own shader manager class
Shaders.Bind(1); // load my cubemap shaders
Shaders.SetUniformData("modelview", GL_FLOAT_MAT4, 1, ModelView.GetMatrix()); // Set the modelview uniform
Shaders.SetUniformData("projection", GL_FLOAT_MAT4, 1, Perspective.GetMatrix()); // Set the projection uniform
SkyBox.Draw(); // Draw my skybox cube
glEnable(GL_CULL_FACE);
// And finally here is my skybox shaders
// Vertex shader
#version 400
in vec4 in_Vertex;
out vec3 TexCoord;
uniform mat4 modelview;
uniform mat4 projection;
void main()
{
TexCoord = in_Vertex.xyz;
gl_Position = modelview * projection * in_Vertex;
}
// Fragment shader
#version 400
in vec3 TexCoord;
out vec4 FragColor;
uniform samplerCube CubeMap;
void main()
{
FragColor = texture(CubeMap, TexCoord);
}






