/usr/lib/ocaml/lablgl/gluMisc.ml is in liblablgl-ocaml-dev 1:1.05-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | (* $Id: gluMisc.ml,v 1.6 2003-02-06 18:19:12 furuse Exp $ *)
open Gl
open GlPix
external build_1d_mipmaps :
internal:int ->
width:int -> format:[< GlTex.format] -> [< kind] Raw.t -> unit
= "ml_gluBuild1DMipmaps"
let build_1d_mipmaps ?internal:i img =
let internal = match i with None -> format_size (format img) | Some i -> i in
if height img < 1 then
raise (GLerror "GluMisc.build_1d_mipmaps : bad height");
build_1d_mipmaps ~internal
~width:(width img) ~format:(format img) (to_raw img)
external build_2d_mipmaps :
internal:int -> width:int ->
height:int -> format:[< GlTex.format] -> [< kind] Raw.t -> unit
= "ml_gluBuild2DMipmaps"
let build_2d_mipmaps ?internal:i img =
let internal = match i with None -> format_size (format img) | Some i -> i in
build_2d_mipmaps ~internal
~width:(width img) ~height:(height img) ~format:(format img) (to_raw img)
external get_string : [`version|`extensions] -> string = "ml_gluGetString"
external scale_image :
format:[< Gl.format] ->
w:int -> h:int -> data:[< kind] Raw.t ->
w:int -> h:int -> data:[< kind] Raw.t -> unit
= "ml_gluScaleImage_bc" "ml_gluScaleImage"
let scale_image ~width ~height img =
let k = Raw.kind (to_raw img) and format = format img in
let new_img = GlPix.create k ~format ~height ~width in
scale_image ~format ~w:(GlPix.width img) ~h:(GlPix.height img)
~data:(to_raw img) ~w:width ~h:height ~data:(to_raw new_img);
new_img
|