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

SCM Repository

[sml3d] View of /src/common/sml3d-type-util-sig.sml
ViewVC logotype

View of /src/common/sml3d-type-util-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Fri Dec 29 22:12:14 2006 UTC (13 years ago) by jhr
Original Path: src/opengl/gl-type-util-sig.sml
File size: 970 byte(s)
  Create initial repository
(* gl-type-util-sig.sml
 *
 * COPYRIGHT (c) 2006 John Reppy (http://www.cs.uchicago.edu/~jhr)
 * All rights reserved.
 *)

signature GL_TYPE_UTIL =
  sig

    include GL_TYPES

  (* pack tuples as records *)
    val packv2 : ('a * 'a)		-> 'a vec2
    val packv3 : ('a * 'a * 'a)		-> 'a vec3
    val packv4 : ('a * 'a * 'a * 'a)	-> 'a vec4

    val packt2 : ('a * 'a)		-> 'a tex2
    val packt3 : ('a * 'a * 'a)		-> 'a tex3
    val packt4 : ('a * 'a * 'a * 'a)	-> 'a tex4

    val packc3 : ('a * 'a * 'a)		-> 'a rgb
    val packc4 : ('a * 'a * 'a * 'a)	-> 'a rgba

  (* unpack records as tuples *)
    val unpackv2 : 'a vec2	-> ('a * 'a)
    val unpackv3 : 'a vec3	-> ('a * 'a * 'a)
    val unpackv4 : 'a vec4	-> ('a * 'a * 'a * 'a)

    val unpackt2 : 'a tex2	-> ('a * 'a)
    val unpackt3 : 'a tex3	-> ('a * 'a * 'a)
    val unpackt4 : 'a tex4	-> ('a * 'a * 'a * 'a)

    val unpackc3 : 'a rgb	-> ('a * 'a * 'a)
    val unpackc4 : 'a rgba	-> ('a * 'a * 'a * 'a)

  end

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