Some problems in OpenGL

[size=large] I recently tried to write some OpenGL programs. I found some small problems, and I’m going to record them. If I understand them in the future, I will look back and see that I have witnessed some growth.

> First, the context. In fact, we know color coloring, can be divided into direct use color glColor4f(); You can also use a vertex array to color glColorPointer(); To color. However, if this property is enabled: gl.glEnable(gl10.gl_texture_2d); Will invalidate the color of. So, if enabled before, disable this property before painting, and then paint in the color. As a result, the problem is that texture and color have no co-existence, meaning that color never affects texture. However, I think this is not the case. Is the understanding of mixing not enough or something?I hope to find the answer to this question in the follow-up study.

and, before the use of an array, must open his first, such as color array, using the former to gl. GlEnableClientState (GL10. GL_COLOR_ARRAY);

Otherwise it’s white. Checking up is also more troublesome.


Read More: