|
|
@@ -91,19 +91,17 @@ namespace dsr {
|
|
|
// Post-condition: Returns true iff image contains a mip-map pyramid generated by image_generatePyramid
|
|
|
// Returns false without a warning if the image handle is empty
|
|
|
bool image_hasPyramid(const ImageRgbaU8& image);
|
|
|
- // Post-condition: Returns true iff image fulfills the criterias for being a texture
|
|
|
+ // Post-condition:
|
|
|
+ // Returns true iff image fulfills the criterias for being a texture
|
|
|
+ // Returns false without a warning if the image handle is empty
|
|
|
// Texture criterias:
|
|
|
- // * Each dimension of width and height should be a power-of-two
|
|
|
- // width = 2 ^ N
|
|
|
- // height = 2 ^ N
|
|
|
- // * Width and height should also be from 4 to 16384 pixels
|
|
|
+ // * Each dimension of width and height should be a power-of-two from 4 to 16384
|
|
|
+ // width = 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 or 16384
|
|
|
+ // height = 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 or 16384
|
|
|
// Large enough to allow padding-free SIMD vectorization of 128-bit vectors (4 x 32 = 128)
|
|
|
// Small enough to allow expressing the total size in bytes using a signed 32-bit integer
|
|
|
- // 4 <= width <= 16384
|
|
|
- // 4 <= height <= 16384
|
|
|
- // * Each row must consume the whole stride
|
|
|
+ // * If it's a sub-image, it must also consume the whole with of the original image so that width times pixel size equals the stride
|
|
|
// Textures may not contain padding in the rows, but it's okay to use sub-images from a vertical atlas where the whole width is consumed
|
|
|
- // Returns false without a warning if the image handle is empty
|
|
|
bool image_isTexture(const ImageRgbaU8& image);
|
|
|
|
|
|
// Pixel access
|