Ejemplo n.º 1
0
void Quad::draw(Camera *camera)
{	
	glm::mat4 transform = glm::translate(position.x, position.y, position.z)
		* toMat4(rotation)
		* glm::translate(0.0f, 3.0f, 0.0f)
		* glm::scale(size.x, size.y, 1.0f);

	
	// FIXME: ugly hack, should put texture into mesh or 'ting...
	if (textureHandle)
	{
		glActiveTexture(GL_TEXTURE0);
		glBindTexture(GL_TEXTURE_2D, textureHandle);
		renderMesh->draw(camera, transform);
		glBindTexture(GL_TEXTURE_2D, 0);
	}
}