Oolite 1.91.0.7645-241119-222d325
|
import "OOTextureScaling.h"
import "OOFunctionAttributes.h"
#include <stdlib.h>
import "OOLogging.h"
import "OOMaths.h"
import "OOCPUInfo.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 1362 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally2(), and SqueezeVertically2().
#define ACCUM2TOPX | ( | ) |
Definition at line 1376 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally2(), and SqueezeVertically2().
#define ACCUM4 | ( | PX, | |
WT ) |
Definition at line 1513 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally4(), and SqueezeVertically4().
#define ACCUM4TOPX | ( | ) |
Definition at line 1539 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally4(), and SqueezeVertically4().
#define CLEAR_ACCUM2 | ( | ) |
Definition at line 1370 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally2(), and SqueezeVertically2().
#define CLEAR_ACCUM4 | ( | ) |
Definition at line 1525 of file OOTextureScaling.m.
Referenced by SqueezeHorizontally4(), and SqueezeVertically4().
#define DUMP_MIP_MAP_DUMP | ( | px, | |
w, | |||
h ) |
Definition at line 233 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1(), GenerateMipMaps2(), and GenerateMipMaps4().
#define DUMP_MIP_MAP_PREPARE | ( | pl | ) |
Definition at line 232 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1(), GenerateMipMaps2(), and GenerateMipMaps4().
#define DUMP_MIP_MAPS 0 |
Definition at line 36 of file OOTextureScaling.m.
#define DUMP_SCALE 0 |
Definition at line 37 of file OOTextureScaling.m.
#define DUMP_SCALE_DUMP | ( | PM, | |
stage ) |
Definition at line 241 of file OOTextureScaling.m.
Referenced by OOScalePixMap().
#define DUMP_SCALE_PREPARE | ( | ) |
Definition at line 240 of file OOTextureScaling.m.
Referenced by OOScalePixMap().
|
static |
Definition at line 1674 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 377 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 599 of file OOTextureScaling.m.
References DUMP_MIP_MAP_DUMP, DUMP_MIP_MAP_PREPARE, and ScaleToHalf_2_x1().
Referenced by OOGenerateMipMaps().
|
static |
Definition at line 696 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 343 of file OOTextureScaling.m.
References EXPECT_NOT, GenerateMipMaps1(), GenerateMipMaps2(), GenerateMipMaps4(), kOOLogParameterError, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, OOLog, OOPixMapFormatName(), and OORoundUpToPowerOf2_PixMap.
OOPixMap OOScalePixMap | ( | OOPixMap | srcPx, |
OOPixMapDimension | dstWidth, | ||
OOPixMapDimension | dstHeight, | ||
BOOL | leaveSpaceForMipMaps ) |
Definition at line 245 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 OOCombinedEmissionMapGenerator::anisotropy, and OOConvertCubeMapToLatLong().
|
static |
Definition at line 430 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1().
|
static |
Definition at line 472 of file OOTextureScaling.m.
Referenced by GenerateMipMaps1().
|
static |
Definition at line 655 of file OOTextureScaling.m.
Referenced by GenerateMipMaps2().
|
static |
Definition at line 747 of file OOTextureScaling.m.
Referenced by GenerateMipMaps4().
OOINLINE void SqueezeHorizontally | ( | OOPixMap | pixMap, |
OOPixMapDimension | dstHeight ) |
Definition at line 187 of file OOTextureScaling.m.
References OOPixMap::format, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, SqueezeHorizontally1(), SqueezeHorizontally2(), and SqueezeHorizontally4().
Referenced by OOScalePixMap().
|
static |
Definition at line 1230 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 1382 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 1547 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 129 of file OOTextureScaling.m.
References OOPixMap::format, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, SqueezeVertically1(), SqueezeVertically2(), and SqueezeVertically4().
Referenced by OOScalePixMap().
|
static |
Definition at line 1294 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 1445 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 1610 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 157 of file OOTextureScaling.m.
References OOPixMap::format, kOOPixMapGrayscale, kOOPixMapGrayscaleAlpha, kOOPixMapInvalidFormat, kOOPixMapRGBA, StretchHorizontally1(), StretchHorizontally2(), and StretchHorizontally4().
Referenced by OOScalePixMap().
Definition at line 1039 of file OOTextureScaling.m.
References OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchHorizontally().
Definition at line 1098 of file OOTextureScaling.m.
References OOPixMap::height, OOIsValidPixMap(), OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchHorizontally().
Definition at line 1164 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 98 of file OOTextureScaling.m.
References OOPixMap::rowBytes, StretchVerticallyN_x1(), and StretchVerticallyN_x4().
Referenced by OOScalePixMap().
Definition at line 889 of file OOTextureScaling.m.
References OOPixMap::height, OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchVertically().
Definition at line 937 of file OOTextureScaling.m.
References OOPixMap::height, OOPixMapBytesPerPixel(), OOPixMap::pixels, OOPixMap::rowBytes, OOPixMap::width, x, and y.
Referenced by StretchVertically().