The widget code: https://github.com/Balanced-Annihilatio ... s.lua#L292
For now I disabled glLoadIdentity() cause I cant get the models to show when I enable it.
Example whats currently broken about at certain camera positions, fading away to the background color.
the relevant code:
Code: Select all
glPushMatrix()
--glLoadIdentity()
glScissor(X1, Y_MIN, X2 - X1, Y_MAX - Y_MIN)
glTranslate(0.5*(X2+X1), 0.5*(Y_MAX+Y_MIN), 0)
glRotate(18, 1, 0, 0)
glRotate(rot, 0, 1, 0)
CenterUnitDef(drawTable[ct].unitDefID)
glUnitShape(drawTable[ct].unitDefID, GetMyTeamID(), false, true, true)
glScissor(false)
glPopMatrix()