microwerx icon

Untitled

microwerx | PRO | 06/17/17 02:54:28 PM UTC | 0 ⭐ | 662 👁️ | Never ⏰ | []
text |

790 B

|

None

|

0 👍

/

0 👎

	glBindBuffer(GL_ARRAY_BUFFER, abo);
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, eabo);
 	GLsizei stride = sizeof(float) * 8;
	glVertexAttribPointer(vloc, 3, GL_FLOAT, GL_FALSE, stride, (const void *)0);
	glVertexAttribPointer(nloc, 3, GL_FLOAT, GL_FALSE, stride, (const void *)12);
	glVertexAttribPointer(tloc, 2, GL_FLOAT, GL_FALSE, stride, (const void *)24);
	if (vloc >= 0) glEnableVertexAttribArray(vloc);
	if (nloc >= 0) glEnableVertexAttribArray(nloc);
	if (tloc >= 0) glEnableVertexAttribArray(tloc);
	glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, 0);
	if (vloc >= 0) glDisableVertexAttribArray(vloc);
	if (nloc >= 0) glDisableVertexAttribArray(nloc);
	if (tloc >= 0) glDisableVertexAttribArray(tloc);
 	glBindBuffer(GL_ARRAY_BUFFER, 0);
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);

Comments