Home | History | Annotate | Download | only in common

Lines Matching refs:resource

46  * \brief Load image from resource
52 * \param archive Resource archive
53 * \param fileName Resource file name
68 tcu::Resource* resource = (tcu::Resource*)png_get_io_ptr(png_ptr);
69 resource->read(data, (int)length);
74 * \brief Load PNG image from resource
79 * \param archive Resource archive
80 * \param fileName Resource file name
84 de::UniquePtr<Resource> resource(archive.getResource(fileName));
88 resource->read(header, sizeof(header));
100 png_set_read_fn(png_ptr, resource.get(), pngReadResource);
213 static inline deUint16 readBigEndianShort (tcu::Resource* resource)
216 resource->read((deUint8*)&val, sizeof(val));
225 * \param archive Resource archive
226 * \param fileName Resource file name
230 de::UniquePtr<Resource> resource(archive.getResource(fileName));
235 resource->read(magic, DE_LENGTH_OF_ARRAY(magic));
238 throw InternalError("Signature doesn't match PKM signature", resource->getName().c_str(), __FILE__, __LINE__);
240 deUint16 type = readBigEndianShort(resource.get());
242 throw InternalError("Unsupported PKM type", resource->getName().c_str(), __FILE__, __LINE__);
244 deUint16 width = readBigEndianShort(resource.get());
245 deUint16 height = readBigEndianShort(resource.get());
246 deUint16 activeWidth = readBigEndianShort(resource.get());
247 deUint16 activeHeight = readBigEndianShort(resource.get());
252 resource->read((deUint8*)dst.getData(), dst.getDataSize());