|
Oolite
|
import "OOTextureScaling.h"import "OOCPUInfo.h"import "OOFunctionAttributes.h"import "OOLogging.h"import "OOMaths.h"#include <stdlib.h>Go to the source code of this file.
Macros | |
| #define | DUMP_MIP_MAPS 0 |
| #define | DUMP_SCALE 0 |
| #define | DUMP_MIP_MAP_PREPARE(pl) |
| #define | DUMP_MIP_MAP_DUMP(px, w, h) |
| #define | DUMP_SCALE_PREPARE() |
| #define | DUMP_SCALE_DUMP(PM, stage) |
| #define | ACCUM2(PX, WT) |
| #define | CLEAR_ACCUM2() |
| #define | ACCUM2TOPX() |
| #define | ACCUM4(PX, WT) |
| #define | CLEAR_ACCUM4() |
| #define | ACCUM4TOPX() |
| #define ACCUM2 | ( | PX, | |
| WT ) |
Definition at line 1264 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally2(), and SqueezeVertically2().
| #define ACCUM2TOPX | ( | ) |
Definition at line 1280 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally2(), and SqueezeVertically2().
| #define ACCUM4 | ( | PX, | |
| WT ) |
Definition at line 1402 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally4(), and SqueezeVertically4().
| #define ACCUM4TOPX | ( | ) |
Definition at line 1430 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally4(), and SqueezeVertically4().
| #define CLEAR_ACCUM2 | ( | ) |
Definition at line 1273 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally2(), and SqueezeVertically2().
| #define CLEAR_ACCUM4 | ( | ) |
Definition at line 1415 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally4(), and SqueezeVertically4().
| #define DUMP_MIP_MAP_DUMP | ( | px, | |
| w, | |||
| h ) |
Definition at line 222 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1(), GenerateMipMaps2(), and GenerateMipMaps4().
| #define DUMP_MIP_MAP_PREPARE | ( | pl | ) |
Definition at line 218 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1(), GenerateMipMaps2(), and GenerateMipMaps4().
| #define DUMP_MIP_MAPS 0 |
Definition at line 34 of file OOTextureScaling.m.
| #define DUMP_SCALE 0 |
Definition at line 35 of file OOTextureScaling.m.
| #define DUMP_SCALE_DUMP | ( | PM, | |
| stage ) |
Definition at line 239 of file OOTextureScaling.m.
Referenced by OOScalePixMap().
| #define DUMP_SCALE_PREPARE | ( | ) |
Definition at line 238 of file OOTextureScaling.m.
Referenced by OOScalePixMap().
|
static |
Definition at line 1548 of file OOTextureScaling.m.
References OOPixMap::bufferSize, EXPECT_NOT, OOPixMap::height, OOIsValidPixMap(), OOLogGenericParameterError, OOPixMap::pixels, and OOPixMap::rowBytes.
Referenced by OOScalePixMap().
|
static |
Definition at line 365 of file OOTextureScaling.m.
References DUMP_MIP_MAP_DUMP, DUMP_MIP_MAP_PREPARE, ScaleToHalf_1_x1(), and ScaleToHalf_1_x4().
Referenced by OOGenerateMipMaps().
|
static |
Definition at line 551 of file OOTextureScaling.m.
References DUMP_MIP_MAP_DUMP, DUMP_MIP_MAP_PREPARE, and ScaleToHalf_2_x1().
Referenced by OOGenerateMipMaps().
|
static |
Definition at line 643 of file OOTextureScaling.m.
References DUMP_MIP_MAP_DUMP, DUMP_MIP_MAP_PREPARE, EXPECT, and ScaleToHalf_4_x1().
Referenced by OOGenerateMipMaps().
| BOOL OOGenerateMipMaps | ( | void * | textureBytes, |
| OOPixMapDimension | width, | ||
| OOPixMapDimension | height, | ||
| OOPixMapFormat | format ) |
Definition at line 336 of file OOTextureScaling.m.
References EXPECT_NOT, GenerateMipMaps1(), GenerateMipMaps2(), GenerateMipMaps4(), kOOLogParameterError, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, OOLog, OOPixMapFormatName(), and OORoundUpToPowerOf2_PixMap.
Referenced by OOTextureLoader(OOPrivate)::applySettings, OOTextureLoader::generateMipMapsForCubeMap, and OOPixMapTextureLoader::loadTexture.
| OOPixMap OOScalePixMap | ( | OOPixMap | srcPx, |
| OOPixMapDimension | dstWidth, | ||
| OOPixMapDimension | dstHeight, | ||
| BOOL | leaveSpaceForMipMaps ) |
Definition at line 244 of file OOTextureScaling.m.
References DUMP_SCALE_DUMP, DUMP_SCALE_PREPARE, EnsureCorrectDataSize(), EXPECT_NOT, FAIL, OOPixMap::format, OOPixMap::height, kOONullPixMap, OOAllocatePixMap(), OOIsValidPixMap(), OOLogGenericParameterError, OOMakePixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, SqueezeHorizontally(), SqueezeVertically(), StretchHorizontally(), StretchVertically(), and OOPixMap::width.
Referenced by OOTextureLoader(OOPrivate)::applySettings, OOConvertCubeMapToLatLong(), and ScaleToMatch().
|
static |
Definition at line 414 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1().
|
static |
Definition at line 453 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1().
|
static |
Definition at line 605 of file OOTextureScaling.m.
Referenced by GenerateMipMaps2().
|
static |
Definition at line 690 of file OOTextureScaling.m.
Referenced by GenerateMipMaps4().
| OOINLINE void SqueezeHorizontally | ( | OOPixMap | pixMap, |
| OOPixMapDimension | dstHeight ) |
Definition at line 171 of file OOTextureScaling.m.
References OOPixMap::format, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, OOINLINE, SqueezeHorizontally1(), SqueezeHorizontally2(), and SqueezeHorizontally4().
Referenced by OOScalePixMap().
|
static |
Definition at line 1144 of file OOTextureScaling.m.
References EXPECT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by SqueezeHorizontally().
|
static |
Definition at line 1283 of file OOTextureScaling.m.
References ACCUM2, ACCUM2TOPX, CLEAR_ACCUM2, EXPECT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by SqueezeHorizontally().
|
static |
Definition at line 1433 of file OOTextureScaling.m.
References ACCUM4, ACCUM4TOPX, CLEAR_ACCUM4, EXPECT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by SqueezeHorizontally().
| OOINLINE void SqueezeVertically | ( | OOPixMap | pixMap, |
| OOPixMapDimension | dstHeight ) |
Definition at line 115 of file OOTextureScaling.m.
References OOPixMap::format, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, OOINLINE, SqueezeVertically1(), SqueezeVertically2(), and SqueezeVertically4().
Referenced by OOScalePixMap().
|
static |
Definition at line 1202 of file OOTextureScaling.m.
References EXPECT, EXPECT_NOT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by SqueezeVertically().
|
static |
Definition at line 1340 of file OOTextureScaling.m.
References ACCUM2, ACCUM2TOPX, CLEAR_ACCUM2, EXPECT, EXPECT_NOT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by SqueezeVertically().
|
static |
Definition at line 1490 of file OOTextureScaling.m.
References ACCUM4, ACCUM4TOPX, CLEAR_ACCUM4, EXPECT, EXPECT_NOT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by SqueezeVertically().
Definition at line 142 of file OOTextureScaling.m.
References OOPixMap::format, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, OOINLINE, StretchHorizontally1(), StretchHorizontally2(), and StretchHorizontally4().
Referenced by OOScalePixMap().
Definition at line 964 of file OOTextureScaling.m.
References OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchHorizontally().
Definition at line 1019 of file OOTextureScaling.m.
References OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchHorizontally().
Definition at line 1081 of file OOTextureScaling.m.
References EXPECT, OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchHorizontally().
Definition at line 91 of file OOTextureScaling.m.
References OOINLINE, OOPixMap::rowBytes, StretchVerticallyN_x1(), and StretchVerticallyN_x4().
Referenced by OOScalePixMap().
Definition at line 825 of file OOTextureScaling.m.
References OOPixMap::height, OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchVertically().
Definition at line 869 of file OOTextureScaling.m.
References OOPixMap::height, OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchVertically().