fix gizmo drawing
This commit is contained in:
parent
31a47b5b7d
commit
6c6593c3d9
|
@ -945,6 +945,13 @@ function camextents()
|
||||||
|
|
||||||
screen2cam.doc = "Convert a screen space position in pixels to a normalized viewport position in a camera."
|
screen2cam.doc = "Convert a screen space position in pixels to a normalized viewport position in a camera."
|
||||||
|
|
||||||
|
prosperon.gizmos = function()
|
||||||
|
{
|
||||||
|
game.all_objects(o => {
|
||||||
|
if (o.gizmo) render.image(game.texture(o.gizmo), o.pos);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
prosperon.make_camera = function()
|
prosperon.make_camera = function()
|
||||||
{
|
{
|
||||||
var cam = world.spawn();
|
var cam = world.spawn();
|
||||||
|
@ -984,6 +991,9 @@ prosperon.render = function()
|
||||||
profile.endframe();
|
profile.endframe();
|
||||||
profile.frame("hud");
|
profile.frame("hud");
|
||||||
if (render.draw_hud) prosperon.hud();
|
if (render.draw_hud) prosperon.hud();
|
||||||
|
render.flush_text();
|
||||||
|
|
||||||
|
render.set_camera(prosperon.camera);
|
||||||
if (render.draw_gizmos && prosperon.gizmos) prosperon.gizmos();
|
if (render.draw_gizmos && prosperon.gizmos) prosperon.gizmos();
|
||||||
render.flush_text();
|
render.flush_text();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue