显示HUD显示的OpenGL ES在带纹理的3D对象顶部没有颜色 [英] OpenGL ES displaying HUD display has no color on top of textured 3D objects

查看:99
本文介绍了显示HUD显示的OpenGL ES在带纹理的3D对象顶部没有颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iPhone OS开发的初学者.

Im a beginner on iphone OS development.

我在这里按照jeff的教程讲解了iP​​hone OS中的hud显示 http://iphonedevelopment.blogspot.com/2010/02/drawing-hud-display-in-opengl-es.html 该示例将以等面体作为HUD的背景,用于伴随的项目,并且按预期的方式使用颜色和文本.

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.

我反复尝试禁用和启用客户端状态和GL模式的尝试和错误. 分析过这种情况的任何人,经历过这种情况的人,都知道需要更改代码中的哪些内容,请告诉我

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

推荐答案

在绘制HUD之前,请检查是否已禁用GL_LIGHTINGGL_TEXTURE_2D.

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

这篇关于显示HUD显示的OpenGL ES在带纹理的3D对象顶部没有颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆