OpenGL: Drawing to a texture
Posted
by
Danran
on Game Development
See other posts from Game Development
or by Danran
Published on 2012-06-22T14:14:45Z
Indexed on
2012/06/22
21:26 UTC
Read the original article
Hit count: 184
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?
© Game Development or respective owner