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.
如果我有一个使用 vertexColors 的网格,然后启用 GL_LIGHTING,那么 vertexColors 将被忽略并被计算的光照替换。
OpenGL ES 1.1 中是否有办法同时拥有两者 - 顶点颜色和动态照明?
谢谢!
您可以使用
glEnable(GL_COLOR_MATERIAL);
让材质参数跟踪当前颜色。在桌面 OpenGL 实现上,还有glColorMaterial来配置是否将颜色应用为漫反射值的环境,在 OpenGL-ES 中我认为它总是适用于两者。