refactoring and ARB extenson for instance rendering