////////////////////////////////////////////////////////////////////////// loads DDS image filename - fully qualified name of DDS image flipImage - specifies whether image is flipped on load, default is true
| 296 | // filename - fully qualified name of DDS image |
| 297 | // flipImage - specifies whether image is flipped on load, default is true |
| 298 | bool CDDSImage::load(string filename, bool flipImage) |
| 299 | { |
| 300 | assert(filename.length() != 0); |
| 301 | |
| 302 | // clear any previously loaded images |
| 303 | clear(); |
| 304 | |
| 305 | // open file |
| 306 | SampleRenderer::File *fp = 0; |
| 307 | PxToolkit::fopen_s(&fp, filename.c_str(), "rb"); |
| 308 | if (fp == NULL) |
| 309 | return false; |
| 310 | |
| 311 | bool success = load(fp, flipImage); |
| 312 | |
| 313 | fclose(fp); |
| 314 | |
| 315 | return success; |
| 316 | } |
| 317 | |
| 318 | /////////////////////////////////////////////////////////////////////////////// |
| 319 | // loads DDS image from FILE stream |
no test coverage detected