fix the bug using GL_UNSIGNED_BYTE
set gl viewport