I am a little new to OpenGL. I am making a 2D application and I have defined a Quad class that defines a square with a texture on it. He loads these textures from a texture atlas, and he does it right. Everything works with regular textures, and the textures are displayed correctly, but not displayed correctly when the texture image is not a square.
For example, I want the Square to have a star texture and a star to appear, and the area around the star-shaped image that is still in the Square will be transparent. But what ultimately happens is that the star looks great, and then there’s another texture behind it from my texture atlas filling the Quad. I assume that the texture behind it is just the last texture loaded into the system? In any case, I do not want this texture to be displayed.
Here is what I mean. I want a star, but not a cloudy texture behind it, to appear:

An important part of my rendering function is:
glDisable(GL_CULL_FACE);
glVertexPointer(vertexStride, GL_FLOAT, 0, vertexes);
glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(colorStride, GL_FLOAT, 0, colors);
glEnableClientState(GL_COLOR_ARRAY);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, textureID);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, 0, uvCoordinates);
glDrawArrays(renderStyle, 0, vertexCount);
source
share