Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
OpenGL 红皮书中的模板测试说:
仅当有模板缓冲区时才会进行模板测试。
我怎样才能知道我的 OpenGL / 显卡实现中是否有模板缓冲区?
所有现代显卡都会有一个模板缓冲区,红皮书指的是当前是否启用了模板测试(使用glEnable(GL_STENCIL_TEST)and glDisable(GL_STENCIL_TEST))。
glEnable(GL_STENCIL_TEST)
glDisable(GL_STENCIL_TEST)