1 | <HTML> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
3 | <!-- Created on , 12 2006 by texi2html 1.64 --> |
---|
4 | <!-- |
---|
5 | Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) |
---|
6 | Karl Berry <karl@freefriends.org> |
---|
7 | Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
8 | and many others. |
---|
9 | Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
10 | Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> |
---|
11 | |
---|
12 | --> |
---|
13 | <HEAD> |
---|
14 | <TITLE>OGRE Manual v1.2.0 ('Dagon'): Pixel Formats</TITLE> |
---|
15 | |
---|
16 | <META NAME="description" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Pixel Formats"> |
---|
17 | <META NAME="keywords" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Pixel Formats"> |
---|
18 | <META NAME="resource-type" CONTENT="document"> |
---|
19 | <META NAME="distribution" CONTENT="global"> |
---|
20 | <META NAME="Generator" CONTENT="texi2html 1.64"> |
---|
21 | <LINK TYPE="text/css" rel="stylesheet" href="../style.css"> |
---|
22 | </HEAD> |
---|
23 | |
---|
24 | <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> |
---|
25 | |
---|
26 | <A NAME="SEC259"></A> |
---|
27 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
28 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_58.html#SEC257"> < </A>]</TD> |
---|
29 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_55.html#SEC249"> Up </A>]</TD> |
---|
30 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_60.html#SEC262"> > </A>]</TD> |
---|
31 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
32 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
33 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
34 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD> |
---|
35 | </TR></TABLE> |
---|
36 | <HR SIZE=1> |
---|
37 | <H3> 5.8.4 Pixel Formats </H3> |
---|
38 | <!--docid::SEC259::--> |
---|
39 | <P> |
---|
40 | |
---|
41 | A pixel format described the storage format of pixel data. It defines the way pixels are encoded in memory. The following classes of pixel formats (PF_*) are defined: |
---|
42 | </P><P> |
---|
43 | |
---|
44 | <DL COMPACT> |
---|
45 | <DT>Native endian formats (PF_A8R8G8B8 and other formats with bit counts) |
---|
46 | <DD>These are native endian (16, 24 and 32 bit) integers in memory. This means that an image with format PF_A8R8G8B8 can be seen as an array of 32 bit integers, defined as 0xAARRGGBB in hexadecimal. The meaning of the letters is described below. |
---|
47 | <P> |
---|
48 | |
---|
49 | <DT>Byte formats (PF_BYTE_*) |
---|
50 | <DD>These formats have one byte per channel, and their channels in memory are organized in the order they are specified in the format name. For example, PF_BYTE_RGBA consists of blocks of four bytes, one for red, one for green, one for blue, one for alpha. |
---|
51 | <P> |
---|
52 | |
---|
53 | <DT>Short formats (PF_SHORT_*) |
---|
54 | <DD>These formats have one unsigned short (16 bit integer) per channel, and their channels in memory are organized in the order they are specified in the format name. For example, PF_SHORT_RGBA consists of blocks of four 16 bit integers, one for red, one for green, one for blue, one for alpha. |
---|
55 | <P> |
---|
56 | |
---|
57 | <DT>Float16 formats (PF_FLOAT16_*) |
---|
58 | <DD>These formats have one 16 bit floating point number per channel, and their channels in memory are organized in the order they are specified in the format name. For example, PF_FLOAT16_RGBA consists of blocks of four 16 bit floats, one for red, one for green, one for blue, one for alpha. The 16 bit floats, also called half float) are very similar to the IEEE single-precision floating-point standard of the 32 bits floats, except that they have only 5 exponent bits and 10 mantissa. Note that there is no standard C++ data type or CPU support to work with these efficiently, but GPUs can |
---|
59 | calculate with these much more efficiently than with 32 bit floats. |
---|
60 | <P> |
---|
61 | |
---|
62 | <DT>Float32 formats (PF_FLOAT32_*) |
---|
63 | <DD>These formats have one 32 bit floating point number per channel, and their channels in memory are organized in the order they are specified in the format name. For example, PF_FLOAT32_RGBA consists of blocks of four 32 bit floats, one for red, one for green, one for blue, one for alpha. The C++ data type for these 32 bits floats is just "float". |
---|
64 | <P> |
---|
65 | |
---|
66 | <DT>Compressed formats (PF_DXT[1-5]) |
---|
67 | <DD>S3TC compressed texture formats, a good description can be found at | Wikipedia (http://en.wikipedia.org/wiki/S3TC) |
---|
68 | <P> |
---|
69 | |
---|
70 | </DL> |
---|
71 | <P> |
---|
72 | |
---|
73 | <A NAME="SEC260"></A> |
---|
74 | <H3> Colour channels </H3> |
---|
75 | <!--docid::SEC260::--> |
---|
76 | <P> |
---|
77 | |
---|
78 | The meaning of the channels R,G,B,A,L and X is defined as |
---|
79 | </P><P> |
---|
80 | |
---|
81 | <DL COMPACT> |
---|
82 | <DT>R |
---|
83 | <DD>Red colour component, usually ranging from 0.0 (no red) to 1.0 (full red). |
---|
84 | <DT>G |
---|
85 | <DD>Green colour component, usually ranging from 0.0 (no green) to 1.0 (full green). |
---|
86 | <DT>B |
---|
87 | <DD>Blue colour component, usually ranging from 0.0 (no blue) to 1.0 (full blue). |
---|
88 | <DT>A |
---|
89 | <DD>Alpha component, usually ranging from 0.0 (entire transparent) to 1.0 (opaque). |
---|
90 | <DT>L |
---|
91 | <DD>Luminance component, usually ranging from 0.0 (black) to 1.0 (white). The luminance component is duplicated in the R, G, and B channels to achieve a greyscale image. |
---|
92 | <DT>X |
---|
93 | <DD>This component is completely ignored. |
---|
94 | </DL> |
---|
95 | <P> |
---|
96 | |
---|
97 | If none of red, green and blue components, or luminance is defined in a format, these default to 0. For the alpha channel this is different; if no alpha is defined, it defaults to 1. |
---|
98 | </P><P> |
---|
99 | |
---|
100 | <A NAME="SEC261"></A> |
---|
101 | <H3> Complete list of pixel formats </H3> |
---|
102 | <!--docid::SEC261::--> |
---|
103 | <P> |
---|
104 | |
---|
105 | This pixel formats supported by the current version of Ogre are |
---|
106 | </P><P> |
---|
107 | |
---|
108 | <DL COMPACT> |
---|
109 | |
---|
110 | <DT>Byte formats |
---|
111 | <DD>PF_BYTE_RGB, PF_BYTE_BGR, PF_BYTE_BGRA, PF_BYTE_RGBA, PF_BYTE_L, PF_BYTE_LA, PF_BYTE_A |
---|
112 | <P> |
---|
113 | |
---|
114 | <DT>Short formats |
---|
115 | <DD>PF_SHORT_RGBA |
---|
116 | <P> |
---|
117 | |
---|
118 | <DT>Float16 formats |
---|
119 | <DD>PF_FLOAT16_R, PF_FLOAT16_RGB, PF_FLOAT16_RGBA |
---|
120 | <P> |
---|
121 | |
---|
122 | <DT>Float32 formats |
---|
123 | <DD>PF_FLOAT32_R, PF_FLOAT32_RGB, PF_FLOAT32_RGBA |
---|
124 | <P> |
---|
125 | |
---|
126 | <DT>8 bit native endian formats |
---|
127 | <DD>PF_L8, PF_A8, PF_A4L4, PF_R3G3B2 |
---|
128 | <P> |
---|
129 | |
---|
130 | <DT>16 bit native endian formats |
---|
131 | <DD>PF_L16, PF_R5G6B5, PF_B5G6R5, PF_A4R4G4B4, PF_A1R5G5B5 |
---|
132 | <P> |
---|
133 | |
---|
134 | <DT>24 bit native endian formats |
---|
135 | <DD>PF_R8G8B8, PF_B8G8R8 |
---|
136 | <P> |
---|
137 | |
---|
138 | <DT>32 bit native endian formats |
---|
139 | <DD>PF_A8R8G8B8, PF_A8B8G8R8, PF_B8G8R8A8, PF_R8G8B8A8, PF_X8R8G8B8, PF_X8B8G8R8, PF_A2R10G10B10 PF_A2B10G10R10 |
---|
140 | <P> |
---|
141 | |
---|
142 | <DT>Compressed formats |
---|
143 | <DD>PF_DXT1, PF_DXT2, PF_DXT3, PF_DXT4, PF_DXT5 |
---|
144 | <P> |
---|
145 | |
---|
146 | </DL> |
---|
147 | <P> |
---|
148 | |
---|
149 | <A NAME="Pixel boxes"></A> |
---|
150 | <HR SIZE=1> |
---|
151 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
152 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_58.html#SEC257"> < </A>]</TD> |
---|
153 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_55.html#SEC249"> Up </A>]</TD> |
---|
154 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_60.html#SEC262"> > </A>]</TD> |
---|
155 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
156 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
157 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
158 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD> |
---|
159 | </TR></TABLE> |
---|
160 | <BR> |
---|
161 | <FONT SIZE="-1"> |
---|
162 | This document was generated |
---|
163 | by <I>Steve Streeting</I> on <I>, 12 2006</I> |
---|
164 | using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html |
---|
165 | "><I>texi2html</I></A> |
---|
166 | |
---|
167 | </BODY> |
---|
168 | </HTML> |
---|