I was just playing with render script stuff and decided to try this.
All you need to do is increase the depth that you’re rendering. Your projection near-Z and far-Z are probably -1 and 1, so if you rotate things at all, most of the geometry will be out of range, that’s why you only get a line. You’ll also probably want to enable the depth test, if you have different things rotated different ways and overlapping each other.
code snippet
-- The last two numbers in this line are the crucial bit:
self.gui_projection = vmath.matrix4_orthographic(0, self.win_w, 0, self.win_h, -200, 200)
render.set_viewport(0, 0, self.win_w, self.win_h)
render.set_view(IDENTITY_MATRIX)
render.set_projection(self.gui_projection)
render.clear({[render.BUFFER_DEPTH_BIT] = 1})
render.enable_state(render.STATE_DEPTH_TEST)
render.enable_state(render.STATE_STENCIL_TEST)
render.draw(self.gui_pred)
This is still orthographic of course. If you actually want perspective it would be a little bit more fiddly since you’d need to move the “camera” “closer” on the Z axis to actually see anything (or move all your GUI nodes far into the negative-Z).
[Edit] OK, you’ll want to clear the depth buffer too, or your GUI can get overlapped by your sprites. (fixed code snippet).