OpenGL ES displaying HUD display has no color on top of textured 3D objects

流过昼夜 提交于 2019-12-10 20:44:55

问题


Im a beginner on iphone OS development.

I followed jeff's tutorial here about hud display in iphone OS http://iphonedevelopment.blogspot.com/2010/02/drawing-hud-display-in-opengl-es.html The sample works on the accompanying project with the isocahedron as the background of the HUD and the is working as expected with colors and the text.

But when I copied the code into my modified project with the textured objects from one of his tutorial series on this one http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html, I see that the HUD display has no colors no matter how I change the color settings.

I trial and error of disabling and enabling the client states and the GL Modes with no luck. Anyone who had analyzed the situation, has experienced such, has find out what's needed to change in the code, please let me know


回答1:


Check that you disable GL_LIGHTING and GL_TEXTURE_2D before you draw the HUD.



来源:https://stackoverflow.com/questions/2681102/opengl-es-displaying-hud-display-has-no-color-on-top-of-textured-3d-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!