I'm making a minecraft-clone game in C++ using OpenGL.
I created a skybox using OpenGL's cube map but the camera can go outside of the skybox since it's an infinite world. Then I changed it to update the skybox's coordinate based on camera's coordinate like below but it didn't change anything.
How can I make a skybox stay at a relative position from the camera?
auto coord = camera.getCoords();
// positive x
skyboxMesh->addFace(
coord.x + size, coord.y + size, coord.z - size,
coord.x + size, coord.y + size, coord.z + size,
coord.x + size, coord.y - size, coord.z - size,
coord.x + size, coord.y - size, coord.z + size
);