[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.
[/size]
> 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.
[/size]
Read More:
- OpenGL learning — problems encountered in compiling OpenGL program for the first time
- Common problems of shadow map in OpenGL
- Problems in configuring OpenGL
- Problems encountered in running OpenGL
- Two problems in OpenGL Programming
- Problems and solutions in learning opengl
- Some configuration problems of OpenGL in VS2008
- Summary of problems encountered in using OpenGL in QT
- Write about the problems and solutions when configuring OpenGL in vs2015
- A series of problems in configuring OpenGL development environment in vs2015
- Small problems encountered in compiling OpenGL under VS2010
- Problems encountered in configuring OpenGL development environment in vs2015
- Record the problems encountered in OpenGL learning
- Some problems and solutions in learning opengl in vs2017
- Summary of problems encountered in compiling opengl code
- Problems encountered in vs2015 configuration using OpenGL environment
- OpenGL Usage Summary (including problems encountered and solutions)
- Common problems and basic concept knowledge of OpenGL
- OpenGL learning notes: Problems and Solutions
- |-OpenGL – | some small problems about the glut Library