Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] View of /trunk/sml3d/src/sml3d/gl3/frame-buffer-sig.sml
ViewVC logotype

View of /trunk/sml3d/src/sml3d/gl3/frame-buffer-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1389 - (download) (annotate)
Sun Apr 6 02:28:36 2014 UTC (5 years, 5 months ago) by jhr
File size: 1776 byte(s)
  Working on OpenGL 3.2 support
(* frame-buffer-sig.sml
 *
 * COPYRIGHT (c) 2011 The SML3d Project (http://sml3d.cs.uchicago.edu)
 * All rights reserved.
 *
 * This interface covers the Framebuffer Objects part of the OpenGL 3.2 API.
 *)

signature GL_FRAME_BUFFER =
  sig

  (* opaque representation of a framebuffer object *)
    eqtype t

  (* generate fresh framebuffer IDs. [glGenFramebuffers] *)
    val gen : unit -> t
    val genList : int -> t list

  (* delete framebuffer IDs [glDeleteFramebuffers] *)
(* FIXME: add a description of what happens if a bound framebuffer is deleted *)
    val deleteList : t list -> unit

  (* return true if the framebuffer ID is valid (i.e., has not been deleted) [glIsFramebuffer] *)
    val valid : t -> bool

  (* [glBindFramebuffer] *)
    val bind : t option -> unit
    val bindRead : t option -> unit
    val bindDraw : t option -> unit

  end

signature GL_RENDER_BUFFER =
  sig

  (* opaque representation of a renderbuffer object *)
    eqtype t

  (* generate fresh renderbuffer IDs. [glGenRenderbuffers] *)
    val gen : unit -> t
    val genList : int -> t list

  (* delete renderbuffer IDs [glDeleteRenderbuffers] *)
(* FIXME: add a description of what happens if a bound renderbuffer is deleted *)
    val deleteList : t list -> unit

  (* return true if the renderbuffer ID is valid (i.e., has not been deleted) [glIsRenderbuffer] *)
    val valid : t -> bool

  (* [glBindRenderbuffer] *)
    val bind : t option -> unit

    structure Format : sig
	eqtype t
	val RGBA4 : t
	val RGB565 : t
	val RGB5_A1 : t
	val DEPTH_COMPONENT16 : t
	val STENCIL_INDEX8 : t
      end

  (* establish data storage, format and dimensions of a renderbuffer object's image [glRenderbufferStorage] *)
    val storage : t * Format.t * SML3dTypes.size2i -> unit

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0