Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Unable to load textures in SFML.net  (Read 975 times)

0 Members and 1 Guest are viewing this topic.

mart++

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
[SOLVED] Unable to load textures in SFML.net
« on: June 04, 2020, 04:24:43 am »
I can create a window, draw shapes and lines etc to it, but haven't been able to load textures. I'm using C#, .net framework 4.6.2 with Visual Studio 2017.
When I create a texture, I can't call texture.loadFromFile(path) as it's shown in the tutorials.

If there's something I missed in the documentation or tutorials, please direct me to it. Thank you in advance.

Edit: Got it thanks to user Laurent.
Texture texture = new Texture(path);

« Last Edit: June 04, 2020, 08:24:31 am by mart++ »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Unable to load textures in SFML.net
« Reply #1 on: June 04, 2020, 07:35:02 am »
Don't hesitate to have a look at the source code.


Texture texture = new Texture(path);
Laurent Gomila - SFML developer

 

anything