Yes, that works. But I am trying to get the content of a render buffer
Texture* tex = Texture::Create(width, height);
Buffer* buffer = Buffer::Create(width, height, 1, 0);
buffer->SetColorTexture(tex);
buffer->Enable();
buffer->Clear();
world->Render();
buffer->Disable();
Context::SetCurrent(context);
tex = buffer->GetColorTexture();
const char* pixelBuf = new char[tex->GetMipmapSize(0)];
tex->GetPixels(pixelBuf);
A call to mat->SetTexture(tex) works, probably because the texture handle is being passed, but the above call to GetPixels() doesn't. As I said, I assume the texture isn't actually retrieved from the GPU to the main memory.