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

I am starting to develop iphone OS.

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

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

I tried and mistakenly disabled and enabled client states and GL modes without any luck. Anyone who has analyzed the situation, experienced this, found out what needs to be changed in the code, please let me know

+3
source share
1 answer

Before you draw a HUD, make sure you turn off GL_LIGHTINGand GL_TEXTURE_2D.

+2
source

Source: https://habr.com/ru/post/1742077/


All Articles