zacharycarter / zengine

2D | 3D Game development library
157 stars 13 forks source link

I think zglPushMatrix() is functionally incorrect #44

Closed define-private-public closed 6 years ago

define-private-public commented 6 years ago

I mentioned this in #41, but zglPushMatrix() is setting the current (new) matrix is pushes on as the identity matrix. Instead it should be cloning the current matrix then pushing that onto the stack. That is how the old fixed function glPushMatrix() worked.

Just to verify this, take a look at kazmath's pushMatrix() equivalent function:

https://github.com/Kazade/kazmath/blob/master/kazmath/GL/matrix.c#L230

It doesn't load an identity; it copies the previous matrix.

define-private-public commented 6 years ago

Twas fixed in #45