got bug fixed for triangle rendering