# How to draw 3ds max gizmos?

I'm trying to achieve the same effect than 3ds max gizmo drawn on the bottom-left and up-right side of the viewports, these ones:

So, let's say i got already the 3d models of those 2 gizmos. What's the transformation i should apply to them?

I think my current attempt is not correct actually, for instance:

Let's say i can apply a model/view/projection matrix on a subviewport to the 3d model... right now i'd be using

model      = mat4.extract_rotation(self.camera.view)
view       = identity()
projection = identity()


where extract_rotation is getting the upper-left 3x3 submatrix of a 4x4 matrix.

Anyway, what's the theory behind these 3ds max gizmos and how i can mimick them on my opengl test?