added support for textured draw primitives