render to texture for directx and quad for opengl