|
|
|
@ -252,16 +252,11 @@ void DistanceFieldGlyphCacheGLTest::setImage() { |
|
|
|
ImageView2D{cache.processedFormat(), data.size, zeros} |
|
|
|
ImageView2D{cache.processedFormat(), data.size, zeros} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
Containers::StridedArrayView3D<const char> src = inputImage->pixels(); |
|
|
|
Containers::StridedArrayView2D<const UnsignedByte> src = inputImage->pixels<UnsignedByte>(); |
|
|
|
/* Test also uploading under an offset. The cache might be three-component
|
|
|
|
/* Test also uploading under an offset */ |
|
|
|
in some cases, slice the destination view to just the first component */ |
|
|
|
Utility::copy(src, cache.image().pixels<UnsignedByte>()[0].sliceSize({ |
|
|
|
/** @todo actually the input can be just luminance, only the destination
|
|
|
|
|
|
|
|
cannot -- fix by dropping the dependency on GlyphCache and creating the |
|
|
|
|
|
|
|
texture directly */ |
|
|
|
|
|
|
|
Utility::copy(src, cache.image().pixels()[0].sliceSize({ |
|
|
|
|
|
|
|
std::size_t(data.sourceOffset.y()), |
|
|
|
std::size_t(data.sourceOffset.y()), |
|
|
|
std::size_t(data.sourceOffset.x()), |
|
|
|
std::size_t(data.sourceOffset.x())}, src.size())); |
|
|
|
0}, src.size())); |
|
|
|
|
|
|
|
cache.flushImage(data.flushRange); |
|
|
|
cache.flushImage(data.flushRange); |
|
|
|
MAGNUM_VERIFY_NO_GL_ERROR(); |
|
|
|
MAGNUM_VERIFY_NO_GL_ERROR(); |
|
|
|
|
|
|
|
|
|
|
|
|