remove label from argument Renderer.draw_rect ~bb
This commit is contained in:
parent
9162e9f3b4
commit
5f31d1eb7f
|
@ -105,7 +105,7 @@ module Sprite_graph = struct
|
||||||
let rec render_rec ren = function
|
let rec render_rec ren = function
|
||||||
| [] -> ()
|
| [] -> ()
|
||||||
| { tf; bb; fill } :: nodes ->
|
| { tf; bb; fill } :: nodes ->
|
||||||
S2.Renderer.draw_rect ren ~tf ~bb ~fill;
|
S2.Renderer.draw_rect ren bb ~tf ~fill;
|
||||||
render_rec ren nodes
|
render_rec ren nodes
|
||||||
|
|
||||||
let render t ~ren =
|
let render t ~ren =
|
||||||
|
|
|
@ -334,20 +334,18 @@ let clear _t (bg : color) =
|
||||||
Gl.clear Gl.color_buffer_bit;
|
Gl.clear Gl.color_buffer_bit;
|
||||||
end
|
end
|
||||||
|
|
||||||
let draw_rect t ~tf ~bb ~fill =
|
let draw_rect t ~tf ~fill rect =
|
||||||
let sh = t.polygon in
|
let sh = t.polygon in
|
||||||
begin
|
begin
|
||||||
(* TODO: cache/store uniform locations in some way *)
|
(* TODO: cache/store uniform locations in some way *)
|
||||||
use sh;
|
use sh;
|
||||||
set_mat2a (uniform sh "Transform") tf;
|
set_mat2a (uniform sh "Transform") tf;
|
||||||
set_aabb (uniform sh "BoundingBox") bb;
|
set_aabb (uniform sh "BoundingBox") rect;
|
||||||
set_int (uniform sh "Border") 0;
|
set_int (uniform sh "Border") 0;
|
||||||
set_color (uniform sh "Fill") fill;
|
set_color (uniform sh "Fill") fill;
|
||||||
draw_geometry t.polygon_rect;
|
draw_geometry t.polygon_rect;
|
||||||
end
|
end
|
||||||
|
|
||||||
let _white = Color.white ()
|
|
||||||
|
|
||||||
let draw_texture t ~tf ~rect ~clip ~tint tex =
|
let draw_texture t ~tf ~rect ~clip ~tint tex =
|
||||||
let sh = t.sprite in
|
let sh = t.sprite in
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -36,7 +36,7 @@ module Renderer : sig
|
||||||
val pre_draw : t -> unit
|
val pre_draw : t -> unit
|
||||||
val post_draw : t -> unit
|
val post_draw : t -> unit
|
||||||
val clear : t -> color -> unit
|
val clear : t -> color -> unit
|
||||||
val draw_rect : t -> tf:mat2a -> bb:aabb -> fill:color -> unit
|
val draw_rect : t -> tf:mat2a -> fill:color -> aabb -> unit
|
||||||
val draw_sprite : t -> tf:mat2a -> ?tint:color -> ?pos:vec2 -> Sprite.t -> unit
|
val draw_sprite : t -> tf:mat2a -> ?tint:color -> ?pos:vec2 -> Sprite.t -> unit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue