Lines Matching refs:size

804 /** Get pixel size in bytes. */
968 IVec3 calculatePackedPitch (const TextureFormat& format, const IVec3& size)
971 const int rowPitch = pixelSize * size.x();
972 const int slicePitch = rowPitch * size.y();
995 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, const IVec3& size, const void* data)
997 , m_size (size)
1015 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, const IVec3& size, const IVec3& pitch, const void* data)
1017 , m_size (size)
1026 ConstPixelBufferAccess::ConstPixelBufferAccess(const TextureFormat& format, const IVec3& size, const IVec3& pitch, const IVec3& block, const void* data)
1028 , m_size (size)
1051 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, const IVec3& size, void* data)
1052 : ConstPixelBufferAccess(format, size, data)
1061 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, const IVec3& size, const IVec3& pitch, void* data)
1062 : ConstPixelBufferAccess(format, size, pitch, data)
1066 PixelBufferAccess::PixelBufferAccess(const TextureFormat& format, const IVec3& size, const IVec3& pitch, const IVec3& block, void* data)
1067 : ConstPixelBufferAccess(format, size, pitch, block, data)
1883 static inline int wrap (Sampler::WrapMode mode, int c, int size)
1888 return deClamp32(c, -1, size);
1891 return deClamp32(c, 0, size-1);
1894 return imod(c, size);
1897 return imod(c, size);
1900 c = deClamp32(c, -size, size);
1904 return (size - 1) - mirror(imod(c, 2*size) - size);
1907 return deClamp32(c, 0, size-1); // \note Actual mirroring done already in unnormalization function.
1916 static inline float unnormalize (Sampler::WrapMode mode, float c, int size)
1925 return (float)size*c;
1928 return (float)size * (c - deFloatFloor(c));
1931 return (float)size * deFloatAbs(c - 2.0f * rint(0.5f * c));
3058 // Checks if origCoords.coords is in bounds defined by size; if not, return a CubeFaceIntCoords with face set to the appropriate neighboring face and coords transformed accordingly.
3060 CubeFaceIntCoords remapCubeEdgeCoords (const CubeFaceIntCoords& origCoords, int size)
3062 bool uInBounds = de::inBounds(origCoords.s, 0, size);
3063 bool vInBounds = de::inBounds(origCoords.t, 0, size);
3071 IVec2 coords(wrap(Sampler::CLAMP_TO_BORDER, origCoords.s, size),
3072 wrap(Sampler::CLAMP_TO_BORDER, origCoords.t, size));
3079 case CUBEFACE_NEGATIVE_X: canonizedCoords = IVec3(0, size-1-coords.y(), coords.x()); break;
3080 case CUBEFACE_POSITIVE_X: canonizedCoords = IVec3(size-1, size-1-coords.y(), size-1-coords.x()); break;
3081 case CUBEFACE_NEGATIVE_Y: canonizedCoords = IVec3(coords.x(), 0, size-1-coords.y()); break;
3082 case CUBEFACE_POSITIVE_Y: canonizedCoords = IVec3(coords.x(), size-1, coords.y()); break;
3083 case CUBEFACE_NEGATIVE_Z: canonizedCoords = IVec3(size-1-coords.x(), size-1-coords.y(), 0); break;
3084 case CUBEFACE_POSITIVE_Z: canonizedCoords = IVec3(coords.x(), size-1-coords.y(), size-1); break;
3091 return CubeFaceIntCoords(CUBEFACE_NEGATIVE_X, IVec2(canonizedCoords.z(), size-1-canonizedCoords.y()));
3093 if (canonizedCoords.x() == size)
3094 return CubeFaceIntCoords(CUBEFACE_POSITIVE_X, IVec2(size-1-canonizedCoords.z(), size-1-canonizedCoords.y()));
3097 return CubeFaceIntCoords(CUBEFACE_NEGATIVE_Y, IVec2(canonizedCoords.x(), size-1-canonizedCoords.z()));
3099 if (canonizedCoords.y() == size)
3103 return CubeFaceIntCoords(CUBEFACE_NEGATIVE_Z, IVec2(size-1-canonizedCoords.x(), size-1-canonizedCoords.y()));
3105 if (canonizedCoords.z() == size)
3106 return CubeFaceIntCoords(CUBEFACE_POSITIVE_Z, IVec2(canonizedCoords.x(), size-1-canonizedCoords.y()));
3115 int size = faceAccesses[0].getWidth();
3134 CubeFaceIntCoords coords = remapCubeEdgeCoords(CubeFaceIntCoords(baseFace, baseSampleCoords[i]), size);
3175 int size = faceAccesses[0].getWidth();
3182 u = unnormalize(sampler.wrapS, s, size);
3183 v = unnormalize(sampler.wrapT, t, size);
3343 int size = faceAccesses[0].getWidth();
3350 u = unnormalize(sampler.wrapS, s, size);
3351 v = unnormalize(sampler.wrapT, t, size);
3372 CubeFaceIntCoords coords = remapCubeEdgeCoords(CubeFaceIntCoords(baseFace, baseSampleCoords[i]), size);
3675 inline int computeMipPyramidLevels (int size)
3677 return deLog2Floor32(size)+1;
3752 const int size = m_format.getPixelSize()*width*height*depth;
3756 m_data[levelNdx].setStorage(size);
3920 const int size = faceAccesses[0].getWidth();
3927 u = unnormalize(sampler.wrapS, coords.s, size);
3928 v = unnormalize(sampler.wrapT, coords.t, size);
3962 TextureCube::TextureCube (const TextureFormat& format, int size, bool es2)
3964 , m_size (size)
4053 const int size = getMipPyramidLevelSize(m_size, levelNdx);
4054 const int dataSize = m_format.getPixelSize()*size*size;
4058 m_access[face][levelNdx] = PixelBufferAccess(m_format, size, size, 1, m_data[face][levelNdx].getPtr());
4346 TextureCubeArray::TextureCubeArray (const TextureFormat& format, int size, int depth)
4347 : TextureLevelPyramid (format, computeMipPyramidLevels(size))
4348 , m_size (size)
4388 const int size = getMipPyramidLevelSize(m_size, levelNdx);
4390 TextureLevelPyramid::allocLevel(levelNdx, size, size, m_depth);
4507 return str << "format = (" << access.getFormat() << "), size = "