Opengl 20
Internally, the driver would translate these legacy fixed-function calls (like glLightfv or glMatrixMode ) into equivalent shader programs. This transparency smoothed the transition period, allowing developers to adopt programmable shaders incrementally rather than forcing an immediate rewrite of their engines.
Perhaps more revolutionary was the fragment shader (often referred to in early documentation as a pixel shader). This program runs for every pixel (fragment) rendered to the screen. It replaced the fixed texture environment stages. Developers could now calculate lighting per-pixel rather than per-vertex, resulting in smooth, high-fidelity lighting effects like bump mapping and Phong shading. opengl 20
GLFWwindow* window = glfwCreateWindow(800, 600, "OpenGL 2.0 Example", NULL, NULL); if (!window) glfwTerminate(); return -1; This program runs for every pixel (fragment) rendered
// Pseudocode - using GLUT or SDL glutInitContextVersion(2, 0); glutInitContextProfile(GLUT_CORE_PROFILE); // Optional in 2.0 GLFWwindow* window = glfwCreateWindow(800, 600, "OpenGL 2