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

Author Topic: Getting an image  (Read 855 times)

0 Members and 1 Guest are viewing this topic.

drakebell09

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Getting an image
« on: May 01, 2012, 07:44:14 am »
Hello all, the names Drake. Been working with C++ for a decent amount of time, got a decent foundation as far as programming goes. I know this is going to be a laughable question for most of you, but I was going though a pong tutorial and I got to the part to "add images". I made my own scaled blender picture in the .png format, and the website I went to also supplied me a "pre-made" image (as well as code so I know my code is 100% correct). My question is, I can do everything needed to make the program run, but I simply cannot get the picture to show up when the SFML window opens up. I've been reading in on it, and I cant figure it out due to lack of information (and have been up for several hours  ;D). Im pretty positive its because I have to put it in the directory? and or PATH?. I would appreciate a sort of step by step walkthrough I how to do this. Ive worked on it several times and I cannot get an image to show up. I am beginner obviously so simplicity is the key, Im not looking for advanced topics but rather just simply getting the image to show up when I run my program. I very much appreciate and sorry for having to ask such a noobish  question. Thank you kindly. (Im using Visual 2008, and SFML 1.6 by the way)
« Last Edit: May 01, 2012, 07:52:36 pm by drakebell09 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Rookie Question
« Reply #1 on: May 01, 2012, 09:29:41 am »
Hi

Please read this first: http://en.sfml-dev.org/forums/index.php?topic=5559.0

... and edit your post accordingly (hints: title, code, error message, version of SFML, ...).

The answer to your problem might even be there, so read it carefully.

:)
Laurent Gomila - SFML developer

drakebell09

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Getting an image
« Reply #2 on: May 01, 2012, 07:54:06 pm »
Ok, yes I changed my title around, the sfml version and my OS will be in there. I still cant find the answer so anyone willing to help please do so. Thank you .

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Getting an image
« Reply #3 on: May 01, 2012, 08:20:47 pm »
The answer was there:
Quote
check the working directory; a lot of loading failures are caused by a bad assumption of what the working directory is: when launched from the IDE, it may be the project's directory rather than the executable's one
Laurent Gomila - SFML developer

 

anything