Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-soil Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:49:06 2020 GMT+0.
• Introduction | What cl-soil is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Common lisp wrapper around the SOIL library (http://www.lonesock.net/soil.html)
All public symbols have docstrings.
API docs can also be found here
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-soil system |
Chris Bagley (Baggers) <techsnuffle@gmail.com>
BSD 2 Clause
A thin binding over libSOIL.so which allows easy loading of images
cl-soil.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-soil.asd file | ||
• The cl-soil/package.lisp file | ||
• The cl-soil/backend.lisp file | ||
• The cl-soil/cl-soil.lisp file | ||
• The cl-soil/stbi.lisp file | ||
• The cl-soil/docs.lisp file |
Next: The cl-soil/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-soil.asd
cl-soil (system)
Next: The cl-soil/backend․lisp file, Previous: The cl-soil․asd file, Up: Lisp files [Contents][Index]
Next: The cl-soil/cl-soil․lisp file, Previous: The cl-soil/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-soil (system)
backend.lisp
Next: The cl-soil/stbi․lisp file, Previous: The cl-soil/backend․lisp file, Up: Lisp files [Contents][Index]
backend.lisp (file)
cl-soil (system)
cl-soil.lisp
Next: The cl-soil/docs․lisp file, Previous: The cl-soil/cl-soil․lisp file, Up: Lisp files [Contents][Index]
cl-soil.lisp (file)
cl-soil (system)
stbi.lisp
loadf (function)
%loadf (function)
Previous: The cl-soil/stbi․lisp file, Up: Lisp files [Contents][Index]
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-soil package | ||
• The stb-image package |
Next: The stb-image package, Previous: Packages, Up: Packages [Contents][Index]
package.lisp (file)
Previous: The cl-soil package, Up: Packages [Contents][Index]
package.lisp (file)
stbi
loadf (function)
%loadf (function)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Creates an OpenGL cubemap texture by splitting up 1 image into 6 parts.
Returns the texture-id
data-pointer: pointer to the image data
width: width of the image in pixels
height: height of the image in pixels
channels: the number of channels:
Count Meaning
———————-
1 luminous
2 luminous/alpha
3 RGB
4 RGBA
face-order: the order of the faces in the file. Any combination of NSWEUD,
for North, South, Up, etc as a keyword. For example :UDNSWE
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Creates a 2D OpenGL texture from raw image data. Returns the texture-id
data-pointer: pointer to the image data
width: width of the image in pixels
height: height of the image in pixels
channels: the number of channels:
Count Meaning
———————-
1 luminous
2 luminous/alpha
3 RGB
4 RGBA
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Frees the image data.
This is really just cffi:foreign-free but exists as a reminder to free your data.
cl-soil.lisp (file)
This function resturn a string describing the last thing that happened inside SOIL. It can be used to determine why an image failed to load.
cl-soil.lisp (file)
Loads an image from disk. Returns the following:
- A pointer to the image data
- the width of the image
- the height of the image
- the component-count of the data as stored in the file
- the component-count of the returned image data
Where the component-count is one of the following:
Count Meaning
———————-
1 luminous
2 luminous/alpha
3 RGB
4 RGBA
filename: the name of the file to load
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
cl-soil.lisp (file)
Loads an image from memory. Returns the following:
- A pointer to the image data
- the width of the image in pixels
- the height of the image in pixels
- the component-count of the data as stored in the file
- the component-count of the returned image data
Where the component-count is one of the following:
Count Meaning
———————-
1 luminous
2 luminous/alpha
3 RGB
4 RGBA
data-pointer: pointer to the image data
data-length: length of the data in bytes
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
cl-soil.lisp (file)
Loads 6 images from disk into an OpenGL cubemap texture. Returns the texture-id
x-pos-filepath: the name of the file to upload as a texture face
x-neg-filepath: the name of the file to upload as a texture face
y-pos-filepath: the name of the file to upload as a texture face
y-neg-filepath: the name of the file to upload as a texture face
z-pos-filepath: the name of the file to upload as a texture face
z-neg-filepath: the name of the file to upload as a texture face
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Loads 6 images from memory into an OpenGL cubemap texture.
Returns the texture-id
x-pos-filepath: the name of the file to upload as a texture face
x-pos-length: length of the data in bytes
x-neg-filepath: the name of the file to upload as a texture face
x-neg-length: length of the data in bytes
y-pos-filepath: the name of the file to upload as a texture face
y-pos-length: length of the data in bytes
y-neg-filepath: the name of the file to upload as a texture face
y-neg-length: length of the data in bytes
z-pos-filepath: the name of the file to upload as a texture face
z-pos-length: length of the data in bytes
z-neg-filepath: the name of the file to upload as a texture face
z-neg-length: length of the data in bytes
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Loads an HDR image from disk into an OpenGL texture. Returns the texture-id
filename: the name of the file to upload as a texture
fake-hdr-format: Which fake HDR representation to use:
Name Meaning
——————————————
:rgbe (* RGB (expt 2.0 (- A 128.0))
:rgb-div-a (/ RGB A)
:rgb-div-a2 (/ RGB (* A A))
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
rescale-to-max: integer. <Not documented in original>
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
*Note:* If you want a true HDR texture try using ‘stb-image:loadf‘ to load an image as floating point data. The use GL to create an upload a float-texture.
cl-soil.lisp (file)
Loads 1 image from disk and splits it into an OpenGL cubemap texture.
Returns the texture-id
filename: the name of the file to upload as a texture
face-order: the order of the faces in the file. Any combination of NSWEUD,
for North, South, Up, etc as a keyword. For example :UDNSWE
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Loads 1 image from RAM and splits it into an OpenGL cubemap texture.
Returns the texture-id
data-pointer: pointer to the image data
data-length: length of the data in bytes
face-order: the order of the faces in the file. Any combination of NSWEUD,
for North, South, Up, etc as a keyword. For example :UDNSWE
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Loads an image from disk into an OpenGL texture. Returns the texture-id
filename: the name of the file to upload as a texture
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Loads an image from RAM into an OpenGL texture. Returns the texture-id
data-pointer: pointer to the image data
data-length: length of the data in bytes
force-channels: One of the following:
Name Effect
——————————————-
:auto leaves the image in whatever format it was found
:l forces the image to load as Luminous (greyscale)
:la forces the image to load as Luminous with Alpha
:rgb forces the image to load as Red Green Blue
:rgba forces the image to load as Red Green Blue Alpha
reuse-texture-id: The gl texture id to reuse, or 0 to generate a new texture.
flags: One or a list of the following
Name Effect
——————————————–
:power-of-two force the image to be POT
:mipmaps generate mipmaps for the texture
:texture-repeats Sampling set to repeat (otherwise will clamp)
:multiply-alpha for using (:one, :one_minus_src_alpha) blending
:invert-y flip the image vertically
:compress-to-dxt if gpu support it, converts RGB to DXT1, RGBA to DXT5
:dds-load-direct will load DDS files directly without _ANY_ additional
processing.
cl-soil.lisp (file)
Saves an image from memory. Returns the filepath on success
filename: the name of the file to save to
image-type: One of the following formats
:tga
:bmp
:dds
width: the width of the image in pixels
height: the height of the image in pixels
channels: the number of channels. Where the integer is one of the following
Count Meaning
———————-
1 luminous
2 luminous/alpha
3 RGB
4 RGBA
data: cffi pointer to the image data
cl-soil.lisp (file)
Captures the OpenGL window (RGB) and saves it to disk.
Returns the filepath on success
filename: the name of the file to save to
image-type: One of the following formats
:tga
:bmp
:dds
x: x component of origin in pixels
x: y component of origin in pixels
width: the width of the image in pixels
height: the height of the image in pixels
cl-soil.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal macros | ||
• Internal functions |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
cl-soil.lisp (file)
cl-soil.lisp (file)
cl-soil.lisp (file)
Previous: Internal macros, Up: Internal definitions [Contents][Index]
cl-soil.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
C F H L M S W |
---|
Jump to: | %
C F H L M S W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C P S |
---|
Jump to: | C P S |
---|