title: Skybox is completely black
body: <p>I'm following ThinMatrix's guide on Youtube and trying to create a skybox for my engine. However, my skybox comes out black. I've tried all the different suggestions and common mistakes that people suggested in the comments, I can not for the life of me figure out what is wrong with it. </p>
  
  <p>I'm not getting any error either :/ </p>
  
  <p>Bellow are the relevant methods in the relevant classes. I can provide more code if needed.</p>
  
  <p>Loader.java</p>
  
  <pre><code> public int loadCubeMap(String[] cubeMapTextures) { 
          int textureID = GL11.glGenTextures(); 
  
          GL13.glActiveTexture(GL13.GL_TEXTURE0); 
          GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, textureID); 
  
          for (int i = 0; i &lt; cubeMapTextures.length; i++) { 
            TextureData data = decodeTexture("res/skybox/" + cubeMapTextures[i] + ".png"); 
  
            GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL11.GL_RGBA, data.getWidth(), data.getHeight(), 
                0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, data.getBuffer()); 
          } 
  
          GL11.glTexParameteri(GL13.GL_PROXY_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); 
          GL11.glTexParameteri(GL13.GL_PROXY_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); 
          GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); 
          GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); 
  
          textures.add(textureID); 
          return textureID; 
        } 
  
        private TextureData decodeTexture(String fileName) { 
          int width = 0; 
          int height = 0; 
          ByteBuffer buffer = null; 
  
          try { 
            FileInputStream in = new FileInputStream(fileName); 
            PNGDecoder decoder = new PNGDecoder(in); 
  
            width = decoder.getWidth(); 
            height = decoder.getHeight(); 
            buffer = ByteBuffer.allocateDirect(4 * width * height); 
            decoder.decode(buffer, width * 4, Format.RGBA); 
  
            buffer.flip(); 
            in.close(); 
          } catch (Exception e) { 
            e.printStackTrace(); 
            System.err.println("Failed loading:  " + fileName); 
            System.exit(-1); 
          } 
  
          return new TextureData(height, width, buffer); 
        } 
  </code></pre>
  
  <p>SkyboxRenderer.java</p>
  
  <pre><code>private static final float SIZE = 500f;
  private static final float[] VERTICES = {        
      -SIZE,  SIZE, -SIZE,
      -SIZE, -SIZE, -SIZE,
      SIZE, -SIZE, -SIZE,
       SIZE, -SIZE, -SIZE,
       SIZE,  SIZE, -SIZE,
      -SIZE,  SIZE, -SIZE,
  
      -SIZE, -SIZE,  SIZE,
      -SIZE, -SIZE, -SIZE,
      -SIZE,  SIZE, -SIZE,
      -SIZE,  SIZE, -SIZE,
      -SIZE,  SIZE,  SIZE,
      -SIZE, -SIZE,  SIZE,
  
       SIZE, -SIZE, -SIZE,
       SIZE, -SIZE,  SIZE,
       SIZE,  SIZE,  SIZE,
       SIZE,  SIZE,  SIZE,
       SIZE,  SIZE, -SIZE,
       SIZE, -SIZE, -SIZE,
  
      -SIZE, -SIZE,  SIZE,
      -SIZE,  SIZE,  SIZE,
       SIZE,  SIZE,  SIZE,
       SIZE,  SIZE,  SIZE,
       SIZE, -SIZE,  SIZE,
      -SIZE, -SIZE,  SIZE,
  
      -SIZE,  SIZE, -SIZE,
       SIZE,  SIZE, -SIZE,
       SIZE,  SIZE,  SIZE,
       SIZE,  SIZE,  SIZE,
      -SIZE,  SIZE,  SIZE,
      -SIZE,  SIZE, -SIZE,
  
      -SIZE, -SIZE, -SIZE,
      -SIZE, -SIZE,  SIZE,
       SIZE, -SIZE, -SIZE,
       SIZE, -SIZE, -SIZE,
      -SIZE, -SIZE,  SIZE,
       SIZE, -SIZE,  SIZE
  };
  
  private static String[] textureFiles = {"stormydays_rt", "stormydays_lf", "stormydays_up", "stormydays_dn", "stormydays_bk", "stormydays_ft"};
  
  private RawModel cube;
  private int textureID;
  private SkyboxShader shader;
  
  public SkyBoxRenderer(Loader loader, Matrix4f projectionMatrix) {
      cube = loader.loadToVAO(VERTICES, 3);
      textureID = loader.loadCubeMap(textureFiles);
      shader = new SkyboxShader();
      shader.start();
      shader.loadProjectionMatrix(projectionMatrix);
      shader.stop();
  }
  
  public void render(Camera camera) {
      shader.start();
      shader.loadViewMatrix(camera);
  
      GL30.glBindVertexArray(cube.getVaoID());
      GL20.glEnableVertexAttribArray(0);
      GL13.glActiveTexture(GL13.GL_TEXTURE0);
      GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, textureID);
      GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, cube.getVertexCount());
      GL20.glDisableVertexAttribArray(0);
      GL30.glBindVertexArray(0);
  
      shader.stop();
  }
  </code></pre>
  
  <p>SkyboxShader.java</p>
  
  <pre><code> private static final String VERTEX_FILE = "src/shaders/skyboxVertexShader.txt"; 
    private static final String FRAGMENT_FILE = "src/shaders/skyboxFragmentShader.txt"; 
  
    private int location_projectionMatrix; 
    private int location_viewMatrix; 
  
    public SkyboxShader() { 
        super(VERTEX_FILE, FRAGMENT_FILE); 
    } 
  
    public void loadProjectionMatrix(Matrix4f matrix){ 
        super.loadMatrix(location_projectionMatrix, matrix); 
    } 
  
    public void loadViewMatrix(Camera camera){ 
        Matrix4f matrix = Maths.createViewMatrix(camera); 
        super.loadMatrix(location_viewMatrix, matrix); 
    } 
  
    @Override 
    protected void getAllUniformLocations() { 
        location_projectionMatrix = super.getUniformLocation("projectionMatrix"); 
        location_viewMatrix = super.getUniformLocation("viewMatrix"); 
    } 
  
    @Override 
    protected void bindAttributes() { 
        super.bindAttribute(0, "position"); 
    } 
  </code></pre>
  
  <p>And here is my GLSL code
  skyboxVertexShader</p>
  
  <pre><code>#version 400
  
  in vec3 position;
  out vec3 textureCoords;
  
  uniform mat4 projectionMatrix;
  uniform mat4 viewMatrix;
  
  void main(void){
  
      gl_Position = projectionMatrix * viewMatrix * vec4(position, 1.0); 
      textureCoords = position;
  
  }
  </code></pre>
  
  <p>skyboxFragmentShader</p>
  
  <pre><code>#version 400
  
  in vec3 textureCoords;
  out vec4 out_Color;
  
  uniform samplerCube cubeMap;
  
  void main(void){
      out_Color = texture(cubeMap, textureCoords);
  }
  </code></pre>