Module OcsfmlGraphics

module OcsfmlGraphics: sig .. end

type 'a reference = 'a 
Indicates a c++ reference ; be cautious with border-side effects
module Rect: 
functor (M : RECT_VAL) -> sig .. end
Utility module for manipulating 2D axis aligned rectangles.
module IntRect: sig .. end
module FloatRect: sig .. end
module Color: sig .. end
module BlendMode: sig .. end
Available blending modes for drawing.
class const_transform : [ `Copy of < rep__sf_Transform : Transform.t; .. >
| `Matrix of
float * float * float * float * float * float * float * float * float
| `None ] ->
object .. end
class transform : [ `Copy of < rep__sf_Transform : Transform.t; .. >
| `Matrix of
float * float * float * float * float * float * float * float * float
| `None ] ->
object .. end
Define a 3x3 transform matrix.
class transformable : ?position:float * float -> ?scale:float * float -> ?origin:float * float -> ?rotation:float -> unit -> object .. end
Decomposed transform defined by a position, a rotation and a scale.
class image : [ `Color of Color.t * int * int
| `Copy of < rep__sf_Image : Image.t; .. >
| `Create of int * int
| `File of string
| `None
| `Stream of OcsfmlSystem.input_stream ] ->
object .. end
Class for loading, manipulating and saving images.
module Texture: sig .. end
class const_texture : [ `Copy of < rep__sf_Texture : Texture.t; .. > | `None ] -> object .. end
class texture : ?rect:IntRect.t -> [ `Copy of < rep__sf_Texture : Texture.t; .. >
| `File of string
| `Image of image
| `Memory of OcsfmlSystem.raw_data_type
| `None
| `Stream of OcsfmlSystem.input_stream ] ->
object .. end
Image living on the graphics card that can be used for drawing.
module CoordinateType: sig .. end
val bind_texture : ?texture:texture ->
?cordinate_type:CoordinateType.t -> unit -> unit
Activate the texture for rendering.

This function is mainly used internally by the SFML rendering system. However it can be useful when using sf::Texture together with OpenGL code (this function is equivalent to glBindTexture).

The coordinateType argument controls how texture coordinates will be interpreted. If Normalized (the default), they must be in range 0 .. 1, which is the default way of handling texture coordinates with OpenGL. If Pixels, they must be given in pixels (range 0 .. size). This mode is used internally by the graphics classes of SFML, it makes the definition of texture coordinates more intuitive for the high-level API, users don't need to compute normalized values.

val get_maximum_texture_size : unit -> int
Get the maximum texture size allowed.

This maximum size is defined by the graphics driver. You can expect a value of 512 pixels for low-end graphics card, and up to 8192 pixels or more for newer hardware.
Returns Maximum size allowed for textures, in pixels.

module Glyph: sig .. end
Structure describing a glyph.
class const_font : [ `Copy of < rep__sf_Font : Font.t; .. > | `None ] -> object .. end
Class for loading and manipulating character fonts.
class font : [ `Copy of < rep__sf_Font : Font.t; .. >
| `File of string
| `Memory of OcsfmlSystem.raw_data_type
| `None
| `Stream of OcsfmlSystem.input_stream ] ->
object .. end
val shader_is_available : unit -> bool
module ShaderSource: sig .. end
class shader : ?vertex:'a ShaderSource.source -> ?fragment:'a ShaderSource.source -> unit -> object .. end
Shader class (vertex and fragment)
val shader_bind : ?shader:shader -> unit -> unit
Bind the shader for rendering (activate it)

This function is normally for internal use only, unless you want to use the shader with a custom OpenGL rendering instead of a SFML drawable.

      window#set_active () ;
      shader#bind ;
      (* ... render OpenGL geometry ... *)
      shader#unbind 
      

class const_view : [ `Center of (float * float) * (float * float)
| `Copy of < rep__sf_View : View.t; .. >
| `None
| `Rect of FloatRect.t ] ->
object .. end
class view : [ `Center of (float * float) * (float * float)
| `Copy of < rep__sf_View : View.t; .. >
| `None
| `Rect of FloatRect.t ] ->
object .. end
2D camera that defines what region is shown on screen.
module Vertex: sig .. end
Define a point with color and texture coordinates.
module PrimitiveType: sig .. end
class drawable : ?overloaded:[ `draw ] -> Drawable.t -> object .. end
Abstract base class for objects that can be drawn to a render target.
class render_target : RenderTarget.t -> object .. end
Base class for all render targets (window, texture, ...)
exception CreateFailure
Exception raised by some object constructors (ie render_texture for instance)
class render_texture : ?depht_buffer:bool -> int -> int -> object .. end
Target for off-screen 2D rendering into an texture.
class render_window : ?style:OcsfmlWindow.Window.style list -> ?context:OcsfmlWindow.ContextSettings.t -> OcsfmlWindow.VideoMode.t -> string -> object .. end
Window that can serve as a target for 2D drawing.
class shape : ?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?texture:#const_texture -> ?texture_rect:IntRect.t -> ?fill_color:Color.t -> ?outline_color:Color.t -> ?outline_thickness:float -> Shape.t -> object .. end
Base class for textured shapes with outline.
class rectangle_shape : ?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?texture:#const_texture -> ?texture_rect:IntRect.t -> ?fill_color:Color.t -> ?outline_color:Color.t -> ?outline_thickness:float -> ?size:float * float -> unit -> object .. end
Specialized shape representing a rectangle.
class circle_shape : ?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?texture:#const_texture -> ?texture_rect:IntRect.t -> ?fill_color:Color.t -> ?outline_color:Color.t -> ?outline_thickness:float -> ?point_count:int -> ?radius:float -> unit -> object .. end
Specialized shape representing a circle.
class convex_shape : ?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?texture:#const_texture -> ?texture_rect:IntRect.t -> ?fill_color:Color.t -> ?outline_color:Color.t -> ?outline_thickness:float -> ?points:(float * float) list -> unit -> object .. end
Specialized shape representing a convex polygon.
module TextStyle: sig .. end
class text : ?string:string -> ?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?color:Color.t -> ?font:font -> ?character_size:int -> ?style:TextStyle.t list -> unit -> object .. end
Graphical text that can be drawn to a render target.
class sprite : ?texture:#const_texture -> ?position:float * float -> ?scale:float * float -> ?rotation:float -> ?origin:float * float -> ?color:Color.t -> ?texture_rect:IntRect.t -> unit -> object .. end
Drawable representation of a texture, with its own transformations, color, etc.
class vertex_array : ?primitive_type:PrimitiveType.t -> Vertex.t list -> object .. end