(index ("load-ogl-texture" 0) ("load-ogl-cubemap" 732) ("load-ogl-single-cubemap" 1811) ("load-ogl-hdr-texture" 2763) ("load-ogl-texture-from-memory" 3585) ("load-ogl-cubemap-from-memory" 4435) ("load-ogl-single-cubemap-from-memory" 6062) ("create-ogl-texture" 7099) ("create-ogl-single-cubemap" 8048) ("save-screenshot" 9029) ("last-result" 9519) ("ogl-texture-width" 9627) ("ogl-texture-height" 9627) ("force-channels/auto" 9837) ("force-channels/luminous" 9964) ("force-channels/luminous-alpha" 10099) ("force-channels/rgb" 10245) ("force-channels/rgba" 10364) ("texture-id/create-new-id" 10491) ("texture/power-of-two" 10875) ("texture/mipmaps" 10990) ("texture/repeats" 11093) ("texture/multiply-alpha" 11221) ("texture/invert-y" 11388) ("texture/compress" 11486) ("texture/dds-direct" 11630) ("texture/ntsc-safe-rgb" 11769) ("texture/cogo-y" 11899) ("texture/rectangle" 12009) ("save-type/tga" 12185) ("save-type/bmp" 12290) ("save-type/dds" 12386) ("fake-hdr/rgbe" 12478) ("fake-hdr/rgb-div-alpha" 12570) ("fake-hdr/rgb-div-alpha-squared" 12661))
(def (sig (procedure " (load-ogl-texture filename force-channels texture-id texture-flags)" (id load-ogl-texture))) (p "Loads an image from disk into an OpenGL texture.") (ul (li (tt "filename") ": Name of the file to load") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (load-ogl-cubemap xpos-file xneg-file ypos-file yneg-file zpos-file zneg-file force-channels texture-id texture-flags)" (id load-ogl-cubemap))) (p "Loads a cubemap texture from disc.") (ul (li (tt "xpos-file") ": File to load for the +x cube face") (li (tt "xneg-file") ": File to load for the -x cube face") (li (tt "ypos-file") ": File to load for the +y cube face") (li (tt "yneg-file") ": File to load for the -y cube face") (li (tt "zpos-file") ": File to load for the +z cube face") (li (tt "zneg-file") ": File to load for the -z cube face") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (load-ogl-single-cubemap filename face-order force-channels texture-id texture-flags)" (id load-ogl-single-cubemap))) (p "Loads a single image from disc and splits it into an OpenGL cubemap texture.") (ul (li (tt "filename") ": File to load and split into the texture") (li (tt "face-order") ": The order of the faces in the file, any permutation of " (tt "\"NSWEUD\"") " representing North, South, West, East, Up, Down") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (load-ogl-hdr-texture filename hdr-format rescale-to-max texture-id texture-flags)" (id load-ogl-hdr-texture))) (p "Loads an HDR image from disk into an OpenGL texture.") (ul (li (tt "filename") ": File to load and split into the texture") (li (tt "hdr-format") ": One of the " (tt "fake-hdr/***") " flags, i.e., " (tt "fake-hdr/rgbe")) (li (tt "rescale-to-max") ": If true, rescales the image to max") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (load-ogl-texture-from-memory buffer length force-channels texture-id texture-flags)" (id load-ogl-texture-from-memory))) (p "Loads an image from memory into an OpenGL texture.") (ul (li (tt "buffer") ": The blob from which the image should be loaded") (li (tt "length") ": The length, in bytes, to read from the blob") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (load-ogl-cubemap-from-memory xpos-buffer xpos-length xneg-buffer xneg-length ypos-buffer ypos-length yneg-buffer yneg-length zpos-buffer zpos-length zneg-buffer zneg-length force-channels texture-id texture-flags)" (id load-ogl-cubemap-from-memory))) (p "Loads a cubemap texture from memory.") (ul (li (tt "xpos-buffer") ": Buffer to load for the +x cube face") (li (tt "xpos-length") ": Size, in bytes, to read from xpos-buffer") (li (tt "xneg-buffer") ": Buffer to load for the -x cube face") (li (tt "xneg-length") ": Size, in bytes, to read from xneg-buffer") (li (tt "ypos-buffer") ": Buffer to load for the +y cube face") (li (tt "ypos-length") ": Size, in bytes, to read from ypos-buffer") (li (tt "yneg-buffer") ": Buffer to load for the -y cube face") (li (tt "yneg-length") ": Size, in bytes, to read from yneg-buffer") (li (tt "zpos-buffer") ": Buffer to load for the +z cube face") (li (tt "zpos-length") ": Size, in bytes, to read from zpos-buffer") (li (tt "zneg-buffer") ": Buffer to load for the -z cube face") (li (tt "zneg-length") ": Size, in bytes, to read from zneg-buffer") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (load-ogl-single-cubemap-from-memory buffer length order force-channels texture-id texture-flags)" (id load-ogl-single-cubemap-from-memory))) (p "Loads a single image from memory and splits it into an OpenGL cubemap texture.") (ul (li (tt "buffer") ": Blob to load and split into the texture") (li (tt "length") ": Size, in bytes, to read from the blob") (li (tt "face-order") ": The order of the faces in the file, any permutation of " (tt "\"NSWEUD\"") " representing North, South, West, East, Up, Down") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (create-ogl-texture data width height force-channels texture-id texture-flags)" (id create-ogl-texture))) (p "Creates a 2D OpenGL texture from raw image data. The raw data is not freed after being uploaded. (And it is thus safe to use a blob).") (ul (li (tt "data") ": Blob to upload as an OpenGL texture") (li (tt "width") ": The width of the image in pixels") (li (tt "height") ": The height of the image in pixels") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (create-ogl-single-cubemap data width height force-channels order texture-id texture-flags)" (id create-ogl-single-cubemap))) (ul (li (tt "data") ": Blob to upload as an OpenGL texture") (li (tt "width") ": The width of the image in pixels") (li (tt "height") ": The height of the image in pixels") (li (tt "face-order") ": The order of the faces in the file, any permutation of " (tt "\"NSWEUD\"") " representing North, South, West, East, Up, Down") (li (tt "force-channels") ": Format of image channels to force, see below definitions for appropriate values") (li (tt "texture-id") ": Use either " (tt "texture-id/create-new-id") " or use an existing texture id to overwrite an existing texture") (li (tt "texture-flags") ": See below for appropriate " (tt "texture/***") " flags to use, i.e., " (tt "texture/repeats") " or " (tt "texture/mipmaps") ". Flags are bitwise, and can be combined with " (tt "bitwise-ior"))) (p "Returns an OpenGL texture ID."))
(def (sig (procedure " (save-screenshot filename save-type x y width height)" (id save-screenshot))) (p "Captures the OpenGL window (RGB) and saves it to disk.") (ul (li (tt "filename") ": The file to save the image to") (li (tt "save-type") ": The format to save the image in, one of save-type/*") (li (tt "x") ": Start x position") (li (tt "y") ": Start y position") (li (tt "width") ": Width of image") (li (tt "height") ": Height of image")) (p "Returns " (tt "#t") " if successful."))
(def (sig (procedure " (last-result)" (id last-result))) (p "Returns the last error message as a string."))
(def (sig (procedure " (ogl-texture-width texture)" (id ogl-texture-width)) (procedure " (ogl-texture-height texture)" (id ogl-texture-height))) (p "Returns the width and height of the given OpenGL texture."))
(def (sig (constant " force-channels/auto" (id force-channels/auto))) (p "Leaves the image in whatever format it was found."))
(def (sig (constant " force-channels/luminous" (id force-channels/luminous))) (p "Forces the image to load as Luminous (greyscale)."))
(def (sig (constant " force-channels/luminous-alpha" (id force-channels/luminous-alpha))) (p "Forces the image to load as Luminous with Alpha."))
(def (sig (constant " force-channels/rgb" (id force-channels/rgb))) (p "Forces the image to load as Red Green Blue."))
(def (sig (constant " force-channels/rgba" (id force-channels/rgba))) (p "Forces the image to load as Red Green Blue Alpha."))
(def (sig (constant " texture-id/create-new-id" (id texture-id/create-new-id))) (p "Passed in as the " (tt "texture-id") " argument, this will cause soil to register a new texture ID using " (tt "gl:gen-textures") ". If the value passed as a " (tt "texture-id") " argument is greater than zero, then soil will just reuse that texture ID (great for reloading image assets in-game)."))
(def (sig (constant " texture/power-of-two" (id texture/power-of-two))) (p "Force the image to be power-of-two."))
(def (sig (constant " texture/mipmaps" (id texture/mipmaps))) (p "Generate mipmaps for the texture."))
(def (sig (constant " texture/repeats" (id texture/repeats))) (p "Sets the image to repeating, otherwise it will be clamped."))
(def (sig (constant " texture/multiply-alpha" (id texture/multiply-alpha))) (p "For when using (" (tt "gl:+one+") ", " (tt "gl:+one-minus-src-alpha+") ") blending."))
(def (sig (constant " texture/invert-y" (id texture/invert-y))) (p "Flip the image vertically."))
(def (sig (constant " texture/compress" (id texture/compress))) (p "If the card supports it this will convert RGB to DXT1, and RGBA to DXT5."))
(def (sig (constant " texture/dds-direct" (id texture/dds-direct))) (p "Will load DDS files directly without any additional processing."))
(def (sig (constant " texture/ntsc-safe-rgb" (id texture/ntsc-safe-rgb))) (p "Clamps RGB components to the NTSC GL safe range."))
(def (sig (constant " texture/cogo-y" (id texture/cogo-y))) (p "RGB becomes CoYCg and RGBA becomes CoCgAY."))
(def (sig (constant " texture/rectangle" (id texture/rectangle))) (p "Uses " (tt "ARB_texture_rectangle") "; generates pixedl indexed with no repeat, mip maps or cube maps."))
(def (sig (constant " save-type/tga" (id save-type/tga))) (p "TGA format in uncompressed RGBA or RGB."))
(def (sig (constant " save-type/bmp" (id save-type/bmp))) (p "BMP format in uncompressed RGB"))
(def (sig (constant " save-type/dds" (id save-type/dds))) (p "DDS format in DXT1 or DXT5"))
(def (sig (constant " fake-hdr/rgbe" (id fake-hdr/rgbe))) (p "RGB * pow( 2.0, A - 128.0)"))
(def (sig (constant " fake-hdr/rgb-div-alpha" (id fake-hdr/rgb-div-alpha))) (p "RGB / A"))
(def (sig (constant " fake-hdr/rgb-div-alpha-squared" (id fake-hdr/rgb-div-alpha-squared))) (p "RGB / (A * A)"))
