angus Posted August 22, 2018 Share Posted August 22, 2018 (edited) I am getting an error message when I use an image on a WidgetSprite attached to an ObjectGui GUI. The warnings printed are; Exception thrown at 0x00007FFE0208A388 in foobar_x64d.exe: Microsoft C++ exception: _com_error at memory location 0x00000060D22FEA68. Direct3D11 error: invalid arg D3D11Texture::create(): can't create RGBA8 1280x720 2D texture The error occurs on the line "ws->setImage(image, 1)" image->load(imagename.c_str()); Log::message("Loading image [%s]\n", imagename.c_str()); if (image->isLoaded()) { image->createMipmaps(); ws->setImage(image, 1); } The error message does not appear when the "is dynamic" parameter on widgetSprite->setImage(Filename, Is dynamic) is changed to zero. However the image IS dynamic and if I set that parameter to zero then the updated image is never read from disk and (I think) the image is served up not from the file I specify but from an internal Unigine cache. I have tried with both DDS files and PNG files. Edit: Actually solved by this: FileSystemAssets::get()->removeRuntime(imagename.c_str()); That bypasses the cache and I can load the changed image. Edited August 22, 2018 by angus Link to comment
morbid Posted August 23, 2018 Share Posted August 23, 2018 Hello angus, glad you've found a way to make it work. Could you send us a sample so we can check if there are any issues on our side? Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts