fixed some bugs for rendering.

Test application now draws a simple UV unit quad