I\'m trying to render to a texture using OpenGL ES 2.0, but I can\'t seem to make it work.
This is how I proceed:
struct RenderTexture {
I had exact the same problem as u do. Try to add
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
right after glBindTexture(GL_TEXTURE_2D, tex); and black square have to disappear.
glBindTexture(GL_TEXTURE_2D, tex);