opengl-tutorials/ogl

Tutorial 2 should make clear you need shaders for the white triangle too

fabio-t opened this issue · 0 comments

In tutorial 2, at this point we are supposed to run code and see a white triangle:

http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/#drawing-our-triangle

However, we'll only see a black screen if using the core profile. That's because shaders are mandatory there.

Maybe it could be made clear in the text that, with these settings (used in Tutorial 1) we won't actually see the white triangle?

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); // We want OpenGL 3.3
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // To make MacOS happy; should not be needed
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // We don't want the old OpenGL 

As an absolute beginner, I was not quite sure why the triangle wasn't drawn, so I didn't even attempt to go to the next step, shaders. Just spent far too long tweaking options and searching the web for a solution.. :)