既然是菜鸟一个,从OpenGL的tutorial开始吧。反正也不打算深入太多,只要满足基本概念理解就可以了。
OpenGL (for “Open Graphics Library”) is an API (Application Programming Interface) to graphics hardware.
Most of OpenGL requires that the graphics hardware contain a framebuffer. Many OpenGL calls control drawing geometric objects such as points, lines, and polygons, but the way that some of this drawing occurs (such as when antialiasing or multisampling is in use) relies on the existence of a framebuffer and its properties.
Some commands explicitly manage the framebuffer.
也就是说,我们需要提供拥有一个FrameBuffer的图形硬件给OpenGL才可以,而它本身不过是一个图形函数库。
在Windows 下 用GDI 作 图 必 须 通 过 设 备 上 下 文(Device Context 简 写DC) 调 用 相 应 的 函 数; 用OpenGL 作 图 也 是 类 似,OpenGL 函 数 是 通 过" 渲 染 上 下 文"(Rendering Context 简 写RC) 完 成 三 维 图 形 的 绘 制。
这个图显然是和OpenGl没有任何关系的,我先放在这边。这个东西其实就像给自己的日记,Display 就是相应的DC,其实应该说是真实的硬件。 而Surface是一个一个的Buffer。那么很好,我看看下一步怎么把概念套起来。
http://www.opengl.org/registry/doc/glspec43.core.20120806.pdf
http://www.realtimerendering.com/
http://www.nullterminator.net/opengl32.html