Opengl es OpenGL ES纹理掩蔽

Opengl es OpenGL ES纹理掩蔽,opengl-es,Opengl Es,我想通过opengl es实现一个像colorsplash效果这样的效果,所以我在网站上搜索并获得指南(http://www.idevgames.com/forums/thread-899.html) 现在我在第三步为块绘制时间,我不知道如何创建多纹理遵循指南,你能帮我吗?给我一些建议或一些代码要做多重纹理,你需要把不同的纹理放入不同的纹理单元,并为它们设置纹理坐标。大概是这样的: // Put a texture into texture unit 0 glActiveTexture (GL_

我想通过opengl es实现一个像colorsplash效果这样的效果,所以我在网站上搜索并获得指南(http://www.idevgames.com/forums/thread-899.html)


现在我在第三步为块绘制时间,我不知道如何创建多纹理遵循指南,你能帮我吗?给我一些建议或一些代码要做多重纹理,你需要把不同的纹理放入不同的纹理单元,并为它们设置纹理坐标。大概是这样的:

// Put a texture into texture unit 0
glActiveTexture (GL_TEXTURE0);
glBindTexture (GL_TEXTURE_RECTANGLE_EXT, texID0);
...    
// Put a texture into texture unit 1
glActiveTexture (GL_TEXTURE1);
glBindTexture (GL_TEXTURE_RECTANGLE_EXT, texID1);
...
// Now draw our textured quad - you could also use VBOs
glBegin (GL_QUADS);
// Set up the texture coordinates for each texture unit for the first vertex
glMultiTexCoord2f (GL_TEXTURE0, x0, y0);
glMultiTexCoord2f (GL_TEXTURE1, x1, y1);
// Define the first vertex's location
glVertex2f (x, y);
... // Do the other 3 vertexes
glEnd();