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

Author Topic: Mac OS X port to be continued  (Read 61707 times)

0 Members and 1 Guest are viewing this topic.

automata

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mac OS X port to be continued
« Reply #75 on: October 25, 2010, 05:07:15 am »
That solved some problems; the linker gave me errors relating to OpenAL, but I am pretty sure that is due to the fact that the OpenAL development libraries on my computer have been corrupted (due to my ignorance while messing around a year back). By deleting the Audio framework from the build targets I bypass all of that, but still remain with a cryptic error in XCode's build script:

Code: [Select]
/bin/sh -c /Users/lew/Desktop/sfml2/build/xcode/sfml.build/dev_10_6/all.build/Script-4C2639F61219B1B70074EB9F.sh

usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file ... target_directory
Command /bin/sh failed with exit code 64


(The .sh file just contained the command to copy .framework files to a folder.) Very weird, I think it's probably something uniquely messed up about my computer though, not a general problem. Unfortunately this means I probably won't be able to do any experiments with the code until I get a chance to do a clean OS reinstall.

About your problem: That screenshot looks exactly like what I've seen happen in earlier versions of SFML for OSX in minimal graphical test programs with no calls to either Draw() or Clear(), just Display(). What seems to happen is that the SFML program recieves a junk graphical memory recycled from other programs, and displays that if it isn't overwritten by the program. Since using sf::Image and sf::Sprite gets you a blank screen, something involved in their use probably forces a Clear() on the RenderWindow.

Here is my theory: You can render OpenGL with Window, but the RenderWindow class fails. The main difference between these two seems to be that RenderWindow has a Draw() method. There is probably a problem with something used by Draw(), either a function called or some data that isn't getting properly set by some other system.

Since presumably this is a bug specific to the OSX implementation, maybe somewhere down the chain is failing silently. I'd check to see if there is some point at which a call to the system fails, it signals that error by returning a null pointer rather than a pointer to data, and then the SFML code treats that null as if it were optional data rather than an error signal.

Good luck!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #76 on: October 25, 2010, 10:40:10 am »
About the sh script : it has nothing to do with your computer but "simply" a folder is missing in the copy path. Create all the directory, that is ~/Library/Frameworks/.

I'll investigate further your ideas as soon as I have some free time. Thanks.
SFML / OS X developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #77 on: October 25, 2010, 10:56:11 am »
I also forget something. If you try to run a SFML app which uses the graphics module you'll get an error at launch : you have to copy the extlibs to /usr/local/lib/. If you don't have a 64 bits machine you'll have to compile some of these extlibs.
SFML / OS X developer

automata

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mac OS X port to be continued
« Reply #78 on: October 26, 2010, 01:32:56 am »
Yeah, the directory not existing was what was causing it to fail; SFML2 compiles now!

Unfortunately I can't figure out how to get any of the example projects to build. The first issue I run into is that it looks for the frameworks in the wrong hard-coded location, like:

Code: [Select]
/Users/marcoantognini/Library/Frameworks/sfml2-graphics-64.framework

That was easy enough for me to change (to my own hard-coded path; there has to be a portable way of doing this), but building the project gives me errors on every function call that exists in SFML2 but not SFML. Obviously the compiler is looking at my old installed SFML library instead of my newly compiled SFML2 library, but I'm not sure how to let it know that I don't want that. Am I missing some obvious way to do this?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #79 on: October 26, 2010, 04:13:34 pm »
that's strange, I don't remember using any hard path but only path based on variables... Strange... Anyway, the simplest way I know is to remove the old SFML packages. I also tried to use some non-standard paths for .framework but I couldn't make it works...
SFML / OS X developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mac OS X port to be continued
« Reply #80 on: October 31, 2010, 06:53:47 pm »
Ok, good news is I have fixed the drawing bug. I really appreciate all your help! Thanks a lot!  :wink:
SFML / OS X developer

Terrydil

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Mac OS X port to be continued
« Reply #81 on: November 01, 2010, 01:28:45 am »
Quote from: "Hiura"
Ok, good news is I have fixed the drawing bug. I really appreciate all your help! Thanks a lot!  :wink:


Awesome!  :D