Refactored glGenerateMipmap and added ES3 validation. TRAC #23277 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang