Michael IV
Michael IV

Reputation: 11424

Flipping texture after its model matrix transposition in OpenGL

In OpenGL we have z direction forward (into the screen ) as negative value.I transpose the model matrix (plane primitive) to make it positive.But there is a problem -The texture becomes flipped in local X axis.I can flip it doing negative scaling of X axis of the matrix.Is there a more elegant ways to achieve this?

Upvotes: 0

Views: 463

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473212

I transpose the model matrix (plane primitive) to make it positive.

Don't do that. If you want to make +Z forward, you want to negate the Z. That means creating a scale matrix with a -1 in the Z.

Upvotes: 2

Related Questions