title: Simple opengl triangle function not drawing anything to screen
body: <p>I am just getting started with OpenGL, and have already hit a pretty frustrating bug with it. I've followed the learnopengl tutorial, encapsulating most stuff into a renderer class, which has uints for buffers and such. Here is the main code that does everything:</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;gfx/gfx.h&gt;
  #include &lt;gfx/gl.h&gt;
  
  #include &lt;gfx/shaders.h&gt;
  
  #include &lt;iostream&gt;
  
  void Renderer::init() {
  
      vertex_shader_id = glCreateShader(GL_VERTEX_SHADER);
      glShaderSource(vertex_shader_id, 1, &amp;vertex_shader, nullptr);
      glCompileShader(vertex_shader_id);
  
      GLint vertex_shader_status;
      glGetShaderiv(vertex_shader_id, GL_COMPILE_STATUS, &amp;vertex_shader_status);
      
      if (vertex_shader_status == false) {
          std::cout &lt;&lt; &quot;vsh compilation failed due to&quot;;
          char vertex_fail_info_log[1024];
          glGetShaderInfoLog(vertex_shader_id, 1024, nullptr, vertex_fail_info_log);
          std::cout &lt;&lt; vertex_fail_info_log &lt;&lt; std::endl;
          abort();
      }
      
      fragment_shader_id = glCreateShader(GL_FRAGMENT_SHADER);
      glShaderSource(fragment_shader_id, 1, &amp;fragment_shader, nullptr);
      glCompileShader(fragment_shader_id);
  
      GLint fragment_shader_status;
      glGetShaderiv(fragment_shader_id, GL_COMPILE_STATUS, &amp;fragment_shader_status);
      
      if (fragment_shader_status == false) {
          std::cout &lt;&lt; &quot;fsh compilation failed due to&quot;;
          char fragment_fail_info_log[1024];
          glGetShaderInfoLog(fragment_shader_id, 1024, nullptr, fragment_fail_info_log);
          std::cout &lt;&lt; fragment_fail_info_log &lt;&lt; std::endl;
          abort();
      }
      
      shader_program = glCreateProgram();
      glAttachShader(shader_program, vertex_shader_id);
      glAttachShader(shader_program, fragment_shader_id);
      glLinkProgram(shader_program);
  
      GLint shader_program_status;
      glGetProgramiv(shader_program, GL_LINK_STATUS, &amp;shader_program_status);
      
      if (shader_program_status == false) {
          std::cout &lt;&lt; &quot;shprogram compilation failed due to&quot;;
          char shader_program_fail_info_log[1024];
          glGetShaderInfoLog(shader_program, 1024, nullptr, shader_program_fail_info_log);
          std::cout &lt;&lt; shader_program_fail_info_log &lt;&lt; std::endl;
          abort();
      }
      
      glUseProgram(shader_program);
  
      glDeleteShader(vertex_shader_id);
      glDeleteShader(fragment_shader_id);
  
      
  }
   
  void Renderer::draw(f32 verts[]) {
      
      glUseProgram(shader_program);
      
      glClearColor(1, 0, 0, 1.0);
      glClear(GL_COLOR_BUFFER_BIT);
  
      glCreateVertexArrays(1, &amp;vertex_array);
      glBindVertexArray(vertex_array);
      
      glCreateBuffers(1, &amp;vbo);
      glBindBuffer(GL_ARRAY_BUFFER, vbo);
      glBufferData(GL_ARRAY_BUFFER, sizeof(verts), verts, GL_STATIC_DRAW);
  
      glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(f32), (void*)0);
      glEnableVertexAttribArray(0);
  
      glBindVertexArray(vertex_array);
      glUseProgram(shader_program);
      glDrawArrays(GL_TRIANGLES, 0, 3);
  }
  </code></pre>
  <p>Here is shaders.h :</p>
  <pre><code>#ifndef SHADERS_H
  #define SHADERS_H
  
  const char* vertex_shader =
  &quot;#version 460 core\n&quot;
  &quot;layout (location = 0) in vec3 aPos;\n&quot;
  
  &quot;void main() {\n&quot;
  &quot;gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n&quot;
  &quot;}\n\0&quot;;
  
  
  const char* fragment_shader =
  &quot;#version 460 core\n&quot;
  &quot;out vec4 FragColor;\n&quot;
  
  &quot;void main() {\n&quot;
  &quot;FragColor = vec4(0.0f, 1.0f, 0.0f, 1.0f);\n&quot;
  &quot;}\n\0&quot;;
  
  #endif
  </code></pre>
  <p>I cannot figure out for life of me, what is wrong. The red clear color shows up, but nothing else.</p>