Labdabeta 182 Posting Pro in Training Featured Poster

I want to use opengl to draw some stuff, not to the screen but to a data buffer instead. Is this possible? IE:

uint32_t *data;
glSetDrawTarget(data,GL_RGBA|GL_UNSIGNED_INT_8_8_8_8);//this is the line I cannot figuro out how to do
//and now my buffer is full of custom data
glSetDrawTarget(NULL,NULL);//reset to screen?