nux-0.9.46
|
00001 /* 00002 * Copyright 2010 Inalogic® Inc. 00003 * 00004 * This program is free software: you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License, as 00006 * published by the Free Software Foundation; either version 2.1 or 3.0 00007 * of the License. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranties of 00011 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 00012 * PURPOSE. See the applicable version of the GNU Lesser General Public 00013 * License for more details. 00014 * 00015 * You should have received a copy of both the GNU Lesser General Public 00016 * License along with this program. If not, see <http://www.gnu.org/licenses/> 00017 * 00018 * Authored by: Jay Taoko <jaytaoko@inalogic.com> 00019 * 00020 */ 00021 00022 00023 #ifndef BITMAPFORMATS_H 00024 #define BITMAPFORMATS_H 00025 00026 #include "NuxCore/SystemTypes.h" 00027 00028 namespace nux 00029 { 00030 00031 typedef struct 00032 { 00033 const TCHAR *Name; 00034 int BlockSizeX; 00035 int BlockSizeY; 00036 int BlockSizeZ; 00037 int BlockBytes; 00038 int NumComponents; 00039 unsigned int PlatformFormat; // internal format 00040 int Format; 00041 int type; 00042 int RowMemoryAlignment; // best memory alignment in a row 00043 unsigned int Flags; 00044 bool Supported; 00045 } PixelFormatInfo; 00046 00047 typedef struct 00048 { 00049 const TCHAR *Name; 00050 int BlockBytes; 00051 int NumComponents; 00052 unsigned int Format; 00053 int type; 00054 unsigned int Flags; 00055 bool Supported; 00056 } ReadBackPixelFormatInfo; 00057 00058 typedef enum 00059 { 00060 BITFMT_UNKNOWN = 0, 00061 BITFMT_R8G8B8A8, // 32-bit RGBA pixel format with alpha, using 8 bits per channel. 00062 BITFMT_A8B8G8R8, // 32-bit ABGR pixel format with alpha, using 8 bits per channel. 00063 00064 BITFMT_B8G8R8A8, // 32-bit BGRA pixel format with alpha, using 8 bits per channel. 00065 BITFMT_A8R8G8B8, // 32-bit ARGB pixel format with alpha, using 8 bits per channel. 00066 00067 BITFMT_R8G8B8, // 24-bit RGB pixel format with 8 bits per channel. 00068 BITFMT_B8G8R8, // 24-bit RGB pixel format with 8 bits per channel. 00069 00070 BITFMT_R5G6B5, // 16-bit RGB pixel format with 5 bits for red, 6 bits for green, and 5 bits for blue. 00071 00072 BITFMT_RGBA16F, 00073 BITFMT_RGB32F, 00074 BITFMT_RGBA32F, 00075 BITFMT_D24S8, 00076 00077 BITFMT_DXT1, 00078 BITFMT_DXT2, 00079 BITFMT_DXT3, 00080 BITFMT_DXT4, 00081 BITFMT_DXT5, 00082 00083 BITFMT_R10G10B10A2, // 32-bit pixel format using 10 bits for each color and 2 bits for alpha. 00084 BITFMT_B10G10R10A2, // 32-bit pixel format using 10 bits for each color and 2 bits for alpha. 00085 BITFMT_A2R10G10B10, // 32-bit pixel format using 10 bits for each color and 2 bits for alpha. 00086 BITFMT_A2B10G10R10, // 32-bit pixel format using 10 bits for each color and 2 bits for alpha. 00087 00088 BITFMT_A8, // Gray level 8 bits 00089 00090 BITFMT_END_GFX_FORMATS, 00091 00092 BITFMT_X8R8G8B8, // 32-bit RGB pixel format, where 8 bits are reserved for each color. 00093 BITFMT_X8B8G8R8, // 32-bit RGB pixel format, where 8 bits are reserved for each color. 00094 00095 BITFMT_X1R5G5B5, // 16-bit pixel format where 5 bits are reserved for each color. 00096 BITFMT_A1R5G5B5, // 16-bit pixel format where 5 bits are reserved for each color and 1 bit is reserved for alpha. 00097 BITFMT_A4R4G4B4, // 16-bit ARGB pixel format with 4 bits for each channel. 00098 BITFMT_X4R4G4B4, // 16-bit RGB pixel format using 4 bits for each color. 00099 BITFMT_A8R3G3B2, // 16-bit ARGB texture format using 8 bits for alpha, 3 bits each for red and green, and 2 bits for blue. 00100 00101 //BITFMT_A8P8, // 8-bit color indexed with 8 bits of alpha. 00102 //BITFMT_A8L8, // 16-bit using 8 bits each for alpha and luminance. 00103 //BITFMT_GRAY16, // Gray level 16 bits 00104 00105 BITFMT_R3G3B2, // 8-bit RGB texture format using 3 bits for red, 3 bits for green, and 2 bits for blue. 00106 00107 //BITFMT_P8, // 8-bit color indexed. 00108 //BITFMT_L8, // 8-bit luminance only. 00109 //BITFMT_A4L4, // 8-bit using 4 bits each for alpha and luminance. 00110 //BITFMT_A8, // 8-bit alpha only. 00111 00112 00113 } BitmapFormat; 00114 00115 extern PixelFormatInfo GPixelFormats[]; 00116 extern ReadBackPixelFormatInfo GReadBackPixelFormats[]; 00117 00118 } 00119 00120 #endif // BITMAPFORMATS_H