OpenGL ES显示HUD显示器在有纹理的3D物体上没有颜色

时间:2022-09-10 22:02:05

Im a beginner on iphone OS development.

我是iphone操作系统开发的初学者。

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.

我跟随jeff的教程介绍了iphone OS中的hud显示:http://iphonedevelopment.blogspot.com/2010/02/drawing-hud- displayin -opengl .html,该示例在与isocahedron相关的项目中使用,作为hud的背景,并以颜色和文本的方式工作。

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.

但是,当我将代码复制到我的修改过的项目中时,我发现不管我如何改变颜色设置,HUD显示都没有颜色。

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

我尝试了禁用和启用客户端状态和GL模式的错误。任何分析过这种情况的人,有过这种经历的人,都知道需要在代码中修改什么,请告诉我

1 个解决方案

#1


2  

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

在绘制HUD之前,检查是否禁用了GL_LIGHTING和GL_TEXTURE_2D。

#1


2  

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

在绘制HUD之前,检查是否禁用了GL_LIGHTING和GL_TEXTURE_2D。