如果有什麼想回饋的(如對文章或部落格的感想),除了留言以外也能填表單跟我說:表單連結。若是對更多 JavaScript 知識有興趣,歡迎參考我的新書《JavaScript 重修就好》

Opengl2 [exclusive] -

This programmability was nothing short of liberating. Suddenly, a single OpenGL 2.0 implementation could simulate realistic water surfaces with dynamic reflections, create cel-shaded cartoons with hard-edged lighting, or render soft shadows using percentage-closer filtering. The era of “shader effects” began, and with it came a Cambrian explosion of visual techniques. Games like Doom 3 (2005) and Half-Life 2: The Lost Coast showcased the power of per-pixel lighting and normal mapping, techniques that relied heavily on the programmable shaders standardized by OpenGL 2.0.

The true power of OpenGL 2.0 was realized through its . Hardware vendors like NVIDIA and AMD could expose new features (e.g., floating-point textures, multiple render targets, geometry shaders) through extensions before they became part of the core specification. This allowed OpenGL 2.0 to remain relevant for years after its release, as programmers could optionally use these extensions to push hardware further while staying within the same basic framework. opengl2

However, OpenGL 2.0 did not abandon its past. Crucially, it maintained with the fixed-function pipeline of OpenGL 1.x. A developer could still use glBegin() and glEnd() with immediate mode, or use vertex arrays with lighting disabled, and the code would run perfectly. This was a strategic decision that ensured a smooth migration path. Studios with legacy codebases could gradually adopt shaders for specific effects while keeping the rest of their rendering engine unchanged. This dual nature made OpenGL 2.0 a pragmatic choice for industry adoption—it was both a modern, programmable API and a stable, well-understood platform. This programmability was nothing short of liberating

In the rapid evolution of computer graphics, few milestones are as significant as OpenGL 2.0, released in 2004. While its predecessors established the fundamental pipeline for 3D rendering, OpenGL 2.0 did not just iterate; it revolutionized how developers interacted with graphics hardware. It bridged the gap between a rigid, fixed-function pipeline and the dawn of fully programmable shaders, offering a powerful duality that would define a generation of video games and real-time graphics applications. OpenGL 2.0 stands as a monument to a critical transition period—a versatile workhorse that made advanced effects accessible while still honoring the straightforward model of classical OpenGL. Games like Doom 3 (2005) and Half-Life 2:

Despite its strengths, OpenGL 2.0 carried the weight of its own legacy. The fixed-function features, while useful for compatibility, also imposed a certain mentality. Many developers continued to think in terms of state machines and global contexts, rather than the more flexible, object-oriented model that would later dominate. Furthermore, the API still relied on the deprecated ( glBegin / glEnd ) for many tutorials and simple programs. This method of sending vertices one by one was horribly inefficient for modern GPUs, leading to performance bottlenecks. As a result, OpenGL 2.0 could be a trap for the unwary—it allowed novice programmers to write simple, working code that would never run quickly in a real-world application.

OpenGL 2.0’s core contribution was the formal integration of the . This was the key that unlocked the black box of the GPU. For the first time, developers could write small programs—vertex shaders and fragment shaders—that ran directly on the graphics processor. A vertex shader allowed complete control over geometry transformation, per-vertex lighting, and skinning. The fragment shader (often called a pixel shader) offered per-pixel control over color, lighting, bump mapping, and shadows.

評論