Skip to content
Snippets Groups Projects

WIP: Whenever an image fails to load, it is defaulted to a 32x32 Fuchsia bitmap.

Closed Jan Delember requested to merge feature/#323_default_texture into master
2 unresolved threads

Random review. Closes #323.

Edited by Jan Delember

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jan Delember added 1 commit

    added 1 commit

    Compare with previous version

    By Ali Can Demiralp on 2018-03-20T17:58:46 (imported from GitLab)

  • Jan Delember added 1 commit

    added 1 commit

    • c385a05a - Double braces to fix cpplint.

    Compare with previous version

    By Ali Can Demiralp on 2018-03-20T18:06:41 (imported from GitLab)

    • We have code which requires invalid images in test_reference_images.
    • We no longer have invalid images. They are defaulted instead.
    • Do I remove that part of the test?

    By Ali Can Demiralp on 2018-03-21T16:15:25 (imported from GitLab)

    Edited by Jan Delember
  • Does it make sense to test against the default image instead here? Then I'd recommend doing that.

    By Heiko Overath on 2018-03-22T16:02:25 (imported from GitLab)

    • Yes, the tests need to be adapted

      By Jonathan Ehret on 2018-03-23T09:53:11 (imported from GitLab)

    • I really cannot figure out how to update the test for this case. It relies on the fact that the pointer returned by the ResourceManager is nullptr, which no longer is the case. I tried reading the failing section for the last 15 minutes and did not understand anything from it. Can someone who worked on OpenGLBufferData do this?

      By Ali Can Demiralp on 2018-04-04T12:52:00 (imported from GitLab)

    • Please register or sign in to reply
  • Jan Delember marked as a Work In Progress

    marked as a Work In Progress

    By Sebastian Freitag on 2018-03-23T14:56:40 (imported from GitLab)

41 43 declaration.dump());
42 44 return nullptr;
43 45 }
44 auto image =
45 std::make_unique<Image>(declaration["file_name"].get<std::string>());
46
47 auto filepath = declaration["file_name"].get<std::string>();
48
49 std::unique_ptr<Image> image;
50 if (boost::filesystem::exists(filepath.c_str()))
  • This only checks if the file exists. However, the file might fail to load for other reasons (e.g., it might be a corrupt file or an unsupported format)

    By Martin Bellgardt on 2018-03-27T08:27:53 (imported from GitLab)

  • FreeImage does not check whether a file is corrupt either (and it is not its job to do so), and crashes in that case. Which means the previous logic did not really change.

    Aside from this, boost::filesystem probably offers options for checking whether a file is valid. I will look into this.

    By Ali Can Demiralp on 2018-03-27T11:37:02 (imported from GitLab)

  • Please register or sign in to reply
  • Jan Delember changed target branch from develop to master

    changed target branch from develop to master

    By Jonathan Ehret on 2018-05-17T09:45:35 (imported from GitLab)

  • I'll close this, due to this now being implemented in !150 (merged)

    By Jonathan Ehret on 2018-07-10T14:45:10 (imported from GitLab)

  • closed

    By Jonathan Ehret on 2018-07-10T14:45:10 (imported from GitLab)

  • Please register or sign in to reply
    Loading