The cl-tga Reference Manual

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

The cl-tga Reference Manual

This is the cl-tga Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:05:40 2022 GMT+0.

Table of Contents


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


2 Systems

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


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

2.1 cl-tga

Describe cl-tga here

Author

Matt Novenstern <fisxoj@gmail.com>

License

MIT

Source

cl-tga.asd.

Child Components

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   [Contents][Index]

3.1.1 cl-tga/cl-tga.asd

Source

cl-tga.asd.

Parent Component

cl-tga (system).

ASDF Systems

cl-tga.


3.1.2 cl-tga/package.lisp

Source

cl-tga.asd.

Parent Component

cl-tga (system).

Packages

cl-tga.


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

3.1.3 cl-tga/cl-tga.lisp

Dependency

package.lisp (file).

Source

cl-tga.asd.

Parent Component

cl-tga (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


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

4.1 cl-tga

Source

package.lisp.

Nickname

tga

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


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

5.1 Public Interface


5.1.1 Ordinary functions

Function: read-tga (filespec)
Package

cl-tga.

Source

cl-tga.lisp.


5.1.2 Generic functions

Generic Reader: image-bpp (object)
Package

cl-tga.

Methods
Reader Method: image-bpp ((tga tga))

automatically generated reader method

Source

cl-tga.lisp.

Target Slot

bits.

Generic Writer: (setf image-bpp) (object)
Package

cl-tga.

Methods
Writer Method: (setf image-bpp) ((tga tga))

automatically generated writer method

Source

cl-tga.lisp.

Target Slot

bits.

Generic Reader: image-channels (object)
Package

cl-tga.

Methods
Reader Method: image-channels ((tga tga))

automatically generated reader method

Source

cl-tga.lisp.

Target Slot

channels.

Generic Writer: (setf image-channels) (object)
Package

cl-tga.

Methods
Writer Method: (setf image-channels) ((tga tga))

automatically generated writer method

Source

cl-tga.lisp.

Target Slot

channels.

Generic Reader: image-data (object)
Package

cl-tga.

Methods
Reader Method: image-data ((tga tga))

automatically generated reader method

Source

cl-tga.lisp.

Target Slot

img-data.

Generic Writer: (setf image-data) (object)
Package

cl-tga.

Methods
Writer Method: (setf image-data) ((tga tga))

automatically generated writer method

Source

cl-tga.lisp.

Target Slot

img-data.

Generic Reader: image-height (object)
Package

cl-tga.

Methods
Reader Method: image-height ((tga tga))

automatically generated reader method

Source

cl-tga.lisp.

Target Slot

height.

Generic Writer: (setf image-height) (object)
Package

cl-tga.

Methods
Writer Method: (setf image-height) ((tga tga))

automatically generated writer method

Source

cl-tga.lisp.

Target Slot

height.

Generic Reader: image-width (object)
Package

cl-tga.

Methods
Reader Method: image-width ((tga tga))

automatically generated reader method

Source

cl-tga.lisp.

Target Slot

width.

Generic Writer: (setf image-width) (object)
Package

cl-tga.

Methods
Writer Method: (setf image-width) ((tga tga))

automatically generated writer method

Source

cl-tga.lisp.

Target Slot

width.


5.2 Internals


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

5.2.1 Special variables

Special Variable: +tga-a+
Package

cl-tga.

Source

cl-tga.lisp.

Special Variable: +tga-rgb+
Package

cl-tga.

Source

cl-tga.lisp.

Special Variable: +tga-rle+
Package

cl-tga.

Source

cl-tga.lisp.


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

5.2.2 Ordinary functions

Function: read-word (stream)
Package

cl-tga.

Source

cl-tga.lisp.

Function: skip (stream &optional bytes)
Package

cl-tga.

Source

cl-tga.lisp.


5.2.3 Classes

Class: tga
Package

cl-tga.

Source

cl-tga.lisp.

Direct methods
Direct slots
Slot: length
Package

common-lisp.

Type

fixnum

Initform

0

Slot: width
Type

fixnum

Initform

0

Readers

image-width.

Writers

(setf image-width).

Slot: height
Type

fixnum

Initform

0

Readers

image-height.

Writers

(setf image-height).

Slot: img-type
Type

fixnum

Initform

0

Slot: bits
Type

fixnum

Initform

0

Readers

image-bpp.

Writers

(setf image-bpp).

Slot: channels
Type

fixnum

Initform

0

Readers

image-channels.

Writers

(setf image-channels).

Slot: stride
Type

fixnum

Initform

0

Slot: img-data
Initform

0

Readers

image-data.

Writers

(setf image-data).


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

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

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

F
Function, read-tga: Public ordinary functions
Function, read-word: Private ordinary functions
Function, skip: Private ordinary functions

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

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

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

R
read-tga: Public ordinary functions
read-word: Private ordinary functions

S
skip: Private ordinary functions

Jump to:   (  
F   G   I   M   R   S