The cl-tga Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-tga Reference Manual

This is the cl-tga Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:25:34 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

CL-TGA

Quicklisp

Cl-tga was written to facilitate loading .tga files into OpenGL programs. It's a very simple library, and, at the moment, only supports non-RLE encoded forms of the files, though it shouldn't be hard to fix that.

Cl-tga does not re-order the color bytes from the file body. tga files are econded in bgr byte-order, and so loading code using cl-opengl should specify the :bgr or :bgra data format in order to not have wonky looking textures, eg.:

(gl:tex-image-2d :texture-2d 0 :rgba
		 (tga:image-width image) (tga:image-height image)
		 0
		 (ecase (tga:image-channels image)
		   (3 :bgr)
	  	   (4 :bgra))
		 :unsigned-byte (tga:image-data image))

Dictionary

read-tga filespec => tga

Takes a filespec and returns a cl-tga::tga instance that contains the file data

image-height, image-width, image-channels, image-bpp, image-data

All of these functions take only a cl-tga::tga instance and return properties of it:

height: height of the image

width: width of the image

channels: 3 for rgb, 4 for rgba

bpp: bytes per pixel, will be (member 16 24 32)

data: The raw image data encoded as a (vector (unsigned-byte 8)) in bgr(a) color order


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-tga

Author

Matt Novenstern <fisxoj@gmail.com>

License

MIT

Description

Describe cl-tga here

Source

cl-tga.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-tga.asd

Location

cl-tga.asd

Systems

cl-tga (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-tga/package.lisp

Parent

cl-tga (system)

Location

package.lisp

Packages

cl-tga


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-tga/cl-tga.lisp

Dependency

package.lisp (file)

Parent

cl-tga (system)

Location

cl-tga.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-tga

Source

package.lisp (file)

Nickname

tga

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: read-tga FILESPEC
Package

cl-tga

Source

cl-tga.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: image-bpp OBJECT
Generic Function: (setf image-bpp) NEW-VALUE OBJECT
Package

cl-tga

Methods
Method: image-bpp (TGA tga)

automatically generated reader method

Source

cl-tga.lisp (file)

Method: (setf image-bpp) NEW-VALUE (TGA tga)

automatically generated writer method

Source

cl-tga.lisp (file)

Generic Function: image-channels OBJECT
Generic Function: (setf image-channels) NEW-VALUE OBJECT
Package

cl-tga

Methods
Method: image-channels (TGA tga)

automatically generated reader method

Source

cl-tga.lisp (file)

Method: (setf image-channels) NEW-VALUE (TGA tga)

automatically generated writer method

Source

cl-tga.lisp (file)

Generic Function: image-data OBJECT
Generic Function: (setf image-data) NEW-VALUE OBJECT
Package

cl-tga

Methods
Method: image-data (TGA tga)

automatically generated reader method

Source

cl-tga.lisp (file)

Method: (setf image-data) NEW-VALUE (TGA tga)

automatically generated writer method

Source

cl-tga.lisp (file)

Generic Function: image-height OBJECT
Generic Function: (setf image-height) NEW-VALUE OBJECT
Package

cl-tga

Methods
Method: image-height (TGA tga)

automatically generated reader method

Source

cl-tga.lisp (file)

Method: (setf image-height) NEW-VALUE (TGA tga)

automatically generated writer method

Source

cl-tga.lisp (file)

Generic Function: image-width OBJECT
Generic Function: (setf image-width) NEW-VALUE OBJECT
Package

cl-tga

Methods
Method: image-width (TGA tga)

automatically generated reader method

Source

cl-tga.lisp (file)

Method: (setf image-width) NEW-VALUE (TGA tga)

automatically generated writer method

Source

cl-tga.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: +tga-a+
Package

cl-tga

Source

cl-tga.lisp (file)

Special Variable: +tga-rgb+
Package

cl-tga

Source

cl-tga.lisp (file)

Special Variable: +tga-rle+
Package

cl-tga

Source

cl-tga.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: read-word STREAM
Package

cl-tga

Source

cl-tga.lisp (file)

Function: skip STREAM &optional BYTES
Package

cl-tga

Source

cl-tga.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Classes

Class: tga ()
Package

cl-tga

Source

cl-tga.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: length
Type

fixnum

Initform

0

Slot: width
Type

fixnum

Initform

0

Readers

image-width (generic function)

Writers

(setf image-width) (generic function)

Slot: height
Type

fixnum

Initform

0

Readers

image-height (generic function)

Writers

(setf image-height) (generic function)

Slot: img-type
Type

fixnum

Initform

0

Slot: bits
Type

fixnum

Initform

0

Readers

image-bpp (generic function)

Writers

(setf image-bpp) (generic function)

Slot: channels
Type

fixnum

Initform

0

Readers

image-channels (generic function)

Writers

(setf image-channels) (generic function)

Slot: stride
Type

fixnum

Initform

0

Slot: img-data
Initform

0

Readers

image-data (generic function)

Writers

(setf image-data) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-tga.asd: The cl-tga<dot>asd file
cl-tga/cl-tga.lisp: The cl-tga/cl-tga<dot>lisp file
cl-tga/package.lisp: The cl-tga/package<dot>lisp file

F
File, Lisp, cl-tga.asd: The cl-tga<dot>asd file
File, Lisp, cl-tga/cl-tga.lisp: The cl-tga/cl-tga<dot>lisp file
File, Lisp, cl-tga/package.lisp: The cl-tga/package<dot>lisp file

L
Lisp File, cl-tga.asd: The cl-tga<dot>asd file
Lisp File, cl-tga/cl-tga.lisp: The cl-tga/cl-tga<dot>lisp file
Lisp File, cl-tga/package.lisp: The cl-tga/package<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
F   G   I   M   R   S  
Index Entry  Section

(
(setf image-bpp): Exported generic functions
(setf image-bpp): Exported generic functions
(setf image-channels): Exported generic functions
(setf image-channels): Exported generic functions
(setf image-data): Exported generic functions
(setf image-data): Exported generic functions
(setf image-height): Exported generic functions
(setf image-height): Exported generic functions
(setf image-width): Exported generic functions
(setf image-width): Exported generic functions

F
Function, read-tga: Exported functions
Function, read-word: Internal functions
Function, skip: Internal functions

G
Generic Function, (setf image-bpp): Exported generic functions
Generic Function, (setf image-channels): Exported generic functions
Generic Function, (setf image-data): Exported generic functions
Generic Function, (setf image-height): Exported generic functions
Generic Function, (setf image-width): Exported generic functions
Generic Function, image-bpp: Exported generic functions
Generic Function, image-channels: Exported generic functions
Generic Function, image-data: Exported generic functions
Generic Function, image-height: Exported generic functions
Generic Function, image-width: Exported generic functions

I
image-bpp: Exported generic functions
image-bpp: Exported generic functions
image-channels: Exported generic functions
image-channels: Exported generic functions
image-data: Exported generic functions
image-data: Exported generic functions
image-height: Exported generic functions
image-height: Exported generic functions
image-width: Exported generic functions
image-width: Exported generic functions

M
Method, (setf image-bpp): Exported generic functions
Method, (setf image-channels): Exported generic functions
Method, (setf image-data): Exported generic functions
Method, (setf image-height): Exported generic functions
Method, (setf image-width): Exported generic functions
Method, image-bpp: Exported generic functions
Method, image-channels: Exported generic functions
Method, image-data: Exported generic functions
Method, image-height: Exported generic functions
Method, image-width: Exported generic functions

R
read-tga: Exported functions
read-word: Internal functions

S
skip: Internal functions

Jump to:   (  
F   G   I   M   R   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
B   C   H   I   L   S   W  
Index Entry  Section

+
+tga-a+: Internal special variables
+tga-rgb+: Internal special variables
+tga-rle+: Internal special variables

B
bits: Internal classes

C
channels: Internal classes

H
height: Internal classes

I
img-data: Internal classes
img-type: Internal classes

L
length: Internal classes

S
Slot, bits: Internal classes
Slot, channels: Internal classes
Slot, height: Internal classes
Slot, img-data: Internal classes
Slot, img-type: Internal classes
Slot, length: Internal classes
Slot, stride: Internal classes
Slot, width: Internal classes
Special Variable, +tga-a+: Internal special variables
Special Variable, +tga-rgb+: Internal special variables
Special Variable, +tga-rle+: Internal special variables
stride: Internal classes

W
width: Internal classes

Jump to:   +  
B   C   H   I   L   S   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S   T  
Index Entry  Section

C
cl-tga: The cl-tga system
cl-tga: The cl-tga package
Class, tga: Internal classes

P
Package, cl-tga: The cl-tga package

S
System, cl-tga: The cl-tga system

T
tga: Internal classes

Jump to:   C   P   S   T