OpenGL: Drawing to a texture
- by Danran
Well im just a bit stuck wondering how to draw an item to a texture.
Specifically, i'm using;
glDrawArrays(GL_LINE_STRIP, indices[0], indices.size());
Because what i'm drawing via the above function updates every-frame, i'm just totally not sure how to go about drawing what i have to a texture.
Any help is greatly appreciated!
Edit:
Well unfortunately my graphics card doesn't support FrameBuffer Objects :/. So i've been trying to get the copy contents from backbuffer method working.
Here's what i currently have;
http://pastebin.com/dJpPt6Pd
And sadly all i get is a white square. Its probably something stupid that i'm doing wrong. Just unsure what it could be?