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

Author Topic: SFML 2.0 Tutorials. Loading Textures error  (Read 3466 times)

0 Members and 1 Guest are viewing this topic.

The New Guy

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
SFML 2.0 Tutorials. Loading Textures error
« on: June 22, 2012, 09:45:51 pm »
So I have recently started with C++ development and I stumbled upon SFML after playing around with SDL. Regarding, tutorials of SFML 2.0 are there any good ones out there? I am going off of SFML 1.6 and just learning the differences(texture and not image, lots of case sensitive changes, etc). It doesn't seem it would be to hard to convet the 1.6 tuts to 2.0 since the changes are minor for somethings. I may have no idea what I am talking about so proceed to smashing me.


Also I am having problems loading images, it can't find the file in VS2010. I have the file saved in the project directory, but its a no go. Any ideas?

P.S. Sorry for not putting the second part in Help Section.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.0 Tutorials. Loading Textures error
« Reply #1 on: June 22, 2012, 09:54:45 pm »
Quote
Regarding, tutorials of SFML 2.0 are there any good ones out there?
I'm still writing them, you'll have to be patient. If you already know SFML 1.6, you can use the API documentation and the General forum to find out what has changed. There's usually a thread here for each major modification.

Quote
P.S. Sorry for not putting the second part in Help Section.
Don't be sorry, just do it ;)
Laurent Gomila - SFML developer

The New Guy

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
Re: SFML 2.0 Tutorials. Loading Textures error
« Reply #2 on: June 22, 2012, 09:57:03 pm »
Haha will do. I don't actually know 1.6. I started the tuts and then I read on the forums that people just said to start 2.0 since that is where SFML is going.

Fun Fact: The only reason I started a forum account is becase of your sarcastic upfront attitude that made me laugh a lot more than I'd like to admit. Hope you are looking forward to answering my boat load of questions that will come up.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10820
    • View Profile
    • development blog
    • Email
Re: SFML 2.0 Tutorials. Loading Textures error
« Reply #3 on: June 22, 2012, 10:02:58 pm »
I am going off of SFML 1.6 and just learning the differences(texture and not image, lots of case sensitive changes, etc). It doesn't seem it would be to hard to convet the 1.6 tuts to 2.0 since the changes are minor for somethings.

The old SFML 1.6 sf::Image and the new SFML 2.0 sf::Texture are function wise equivalent, except you can't do direct pixel manipulation. For this there still exists the new SFML 2.0 sf::Image.
This basically means you can replace all the old sf::Image with sf::Texture.

The function name changing is a bit annoying but there's nothing special. All functions are now camelCase insteald of CamelCase.

Also I am having problems loading images, it can't find the file in VS2010. I have the file saved in the project directory, but its a no go. Any ideas?
If you haven't changed anything in the project settings about this matter, the default working directory would be next to the .vcxproj. This then only works if you run the application from within VS. If you run it via the explorer you need to put the files next to the .exe.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The New Guy

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
Re: SFML 2.0 Tutorials. Loading Textures error
« Reply #4 on: June 22, 2012, 10:05:32 pm »
Appreciate the info. I am at work currently, and I believe I have the image saved in the same directory as the project file. Once I get home I will check over and if I can't get it to work I will bug you guys some more.

 

anything