Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Support URL based textures #671

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

New: Support URL based textures #671

wants to merge 2 commits into from

Conversation

leezer3
Copy link
Owner

@leezer3 leezer3 commented Jul 15, 2021

Changes:

This PR implements texture loading in the CSV / B3D plugin from an arbitrary online URL, e.g.

[MeshBuilder]
Vertex -0.5, -0.1, 0
Vertex -0.5, 0.1, 0
Vertex 0.5, 0.1, 0
Vertex 0.5, -0.1, 0
Face 0, 1, 2, 3

[Texture]
URL https://openbve-project.net/images/index-screenshots.jpg
Coordinates 0, 0, 1
Coordinates 1, 0, 0
Coordinates 2, 1, 0
Coordinates 3, 1, 1

n.b Minimum size of texture must be 100 bytes (to guard against 404 text etc.)

TODO:

  • May want a try / catch block around the whole webrequest thing.
  • What to do with a 404? Fallback texture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant