package ocamlsdl2

  1. Overview
  2. Docs
val create_window_and_renderer : width:int -> height:int -> flags:Sdlwindow.window_flags list -> Sdlwindow.t * t
type renderer_flags =
  1. | Software
  2. | Accelerated
  3. | PresentVSync
  4. | TargetTexture
val string_of_renderer_flags : renderer_flags -> string
val renderer_flags_of_string : string -> renderer_flags
val create_renderer : win:Sdlwindow.t -> index:int -> flags:renderer_flags list -> t
val set_logical_size : t -> (int * int) -> unit
val set_logical_size2 : t -> x:int -> y:int -> unit
val set_draw_color : t -> rgb:(int * int * int) -> a:int -> unit
val set_draw_color3 : t -> r:int -> g:int -> b:int -> a:int -> unit
val set_draw_blend_mode : t -> SdlblendMode.t -> unit
val draw_point : t -> (int * int) -> unit
val draw_point2 : t -> x:int -> y:int -> unit
val draw_points : t -> points:(int * int) array -> unit
val draw_line : t -> ((int * int) * (int * int)) -> unit
val draw_line2 : t -> p1:(int * int) -> p2:(int * int) -> unit
val draw_lines : t -> (int * int) array -> unit
val draw_rect : t -> Sdlrect.t -> unit
val draw_rects : t -> Sdlrect.t array -> unit
val fill_rect : t -> Sdlrect.t -> unit
val fill_rects : t -> Sdlrect.t array -> unit
val copy : t -> texture:Sdltexture.t -> ?src_rect:Sdlrect.t -> ?dst_rect:Sdlrect.t -> unit -> unit
type renderer_flip =
  1. | Flip_None
  2. | Flip_Horizontal
  3. | Flip_Vertical
val copyEx : t -> texture:Sdltexture.t -> ?src_rect:Sdlrect.t -> ?dst_rect:Sdlrect.t -> ?angle:float -> ?center:(int * int) -> ?flip:renderer_flip -> unit -> unit
val set_scale : t -> (float * float) -> unit
val render_present : t -> unit
val clear : t -> unit
type renderer_info = {
  1. name : string;
  2. max_texture_width : int;
  3. max_texture_height : int;
}
val get_render_drivers : unit -> renderer_info array
OCaml

Innovation. Community. Security.