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

Author Topic: iPhone Port (in progress)  (Read 51396 times)

0 Members and 1 Guest are viewing this topic.

seoushi

  • Newbie
  • *
  • Posts: 15
    • View Profile
iPhone Port (in progress)
« Reply #30 on: April 15, 2009, 10:25:53 pm »
sdl redefines main and has the event issues I describe. Threading might be an option however I'm not sure if apple allows it and it would be a pain to do.

nfries88

  • Newbie
  • *
  • Posts: 42
    • View Profile
iPhone Port (in progress)
« Reply #31 on: April 16, 2009, 02:45:37 am »
Quote from: "seoushi"
sdl redefines main and has the event issues I describe. Threading might be an option however I'm not sure if apple allows it and it would be a pain to do.


iPhoneOS is pretty much a stripped-down OS X, isn't it?
I'd assume it'd allow threading...

Gammenon

  • Newbie
  • *
  • Posts: 27
    • View Profile
iPhone Port (in progress)
« Reply #32 on: April 17, 2009, 09:50:09 am »
Quote from: "nfries88"
Quote from: "seoushi"
sdl redefines main and has the event issues I describe. Threading might be an option however I'm not sure if apple allows it and it would be a pain to do.


iPhoneOS is pretty much a stripped-down OS X, isn't it?
I'd assume it'd allow threading...


I think iPhone OS allows threading, but perhaps apple does not allow an application that uses threads this form.

Gammenon

  • Newbie
  • *
  • Posts: 27
    • View Profile
iPhone Port (in progress)
« Reply #33 on: April 17, 2009, 10:05:56 am »
Well, what about this?

Quote
You can use the following to force the processing of events (useful also if your drawng code is taking too much time):
BOOL processedEvent = [[ NSRunLoopcurrentRunLoop] runMode: NSDefaultRunLoopMode beforeDate:[NSDatedistantPast]];


Extracted from https://devforums.apple.com/message/55119#55119

Perhaps we can call this inside SFML's GetEvent function  :D

Gammenon

  • Newbie
  • *
  • Posts: 27
    • View Profile
iPhone Port (in progress)
« Reply #34 on: June 13, 2009, 11:37:50 am »
Bump!

alaterale

  • Guest
iPhone Port (in progress)
« Reply #35 on: June 16, 2009, 01:50:57 pm »
Any news on this port?  I'm developing a few things and want to get them on the iphone, so I'd love to use this if I could (since I really like SFML).

I tried out the attachment demo, and it does run in the simulator, but I couldn't get any input working (I thought it was working, albeit intermittenly or unreliably).

Still, I really like how much it's gone so far, I'm going to start integrating this into my local SFML files.  I don't mind if it needs to have its own main redefinition, I don't see that being a huge problem as long as I can get some of the touch information.

Thanks!

alaterale

  • Guest
iPhone Port (in progress)
« Reply #36 on: June 23, 2009, 09:45:36 pm »
Has anyone out there worked on this lately?

I've tried using it as is in my own project, with just trying to use the test.mm (as a starting point to understanding how to port my own app), and I keep on getting errors.  First it was because I was using a different MainWindow.xib than the demo, but now I get errors about the gl context when creating the framebuffer.

Can anyone provide a simple tutorial for porting a regular SFML app to using this, for those who have little iPhone programming experience?

Edit: Also, can anyone tell me what preprocessor define definitely means that the system is iphone or iphone simulator?  The above mentioned files didn't change config, so I've added SFML_SYSTEM_IPHONEOS specific stuff throughout the library, but in Config.hpp, I can't seem to find a set of defines that would point towards iphone.  So, for now, I'm just hacking it to always enable IPHONEOS.  There's got to be a way to do this, since people might have code for MacOSX and the iPhone in their program or something.  I've seen posts online about this, but they never seem to work.

Gammenon

  • Newbie
  • *
  • Posts: 27
    • View Profile
iPhone Port (in progress)
« Reply #37 on: October 13, 2009, 11:43:22 am »
Is there any improvement in this topic?

alaterale

  • Guest
iPhone Port (in progress)
« Reply #38 on: October 13, 2009, 12:13:24 pm »
I wish there would be myself, but I think it's probably been sidelined or something for now.  It'd be really awesome to have the iphone be officially supported in SFML (and for other systems like the pre or something).

alaterale

  • Guest
iPhone Port (in progress)
« Reply #39 on: October 22, 2009, 02:53:50 am »
Any more updates on this?  Does anyone know if this iphone port is going to be making it into the SFML 2.0 branch?  I'm eager for any news that iphone/ipodtouch targets will be more officially supported soon (even though 2.0 isn't officially out yet :P).  I'd love to start bringing over my engine to that platform soon if I could :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
iPhone Port (in progress)
« Reply #40 on: October 22, 2009, 08:30:25 am »
Nothing on my side. So far I still have no plan for supporting iPhone (and other mobile platforms) in SFML 2.
Laurent Gomila - SFML developer

alaterale

  • Guest
iPhone Port (in progress)
« Reply #41 on: October 22, 2009, 08:37:37 am »
Ah, ok then.  Well, I guess I'll try to get the stuff that was already written working.  Hopefully it will work with 1.6, or can without too many changes :P

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
iPhone Port (in progress)
« Reply #42 on: October 22, 2009, 08:41:53 am »
It should work. 1.6 will just be a bug fix release.
Laurent Gomila - SFML developer

alaterale

  • Guest
iPhone Port (in progress)
« Reply #43 on: October 22, 2009, 09:23:01 pm »
Ok, I need a little help with something iphone/osx specific.  I got everything to compile and build, but apparently the MainWindow.xib file is having some problems locating a variable defined in the UIKit dir?  It causes the iphone simulator to crash.

I get this:
iPhone Simulator 2.2 (77.4.9), iPhone OS 2.2.1 (5H11)
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x523e80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'

Looking it up online, it says that I'm not defining a IBOutlet or something.  But looking at the UIKitAppDelegate.h file in UIKit, it is being defined, along with glView.  All this is pretty confusing to me since I have very little interface builder experience or objective c experience.  It's probably a very simple fix, but I can't figure this out, and I figured maybe someone here could give me a hand?

Edit: Nevermind about that, I think I fixed it.  Apparently these xib files are just xml, and it had a wrong path being set for the UIKit files.

Also, for anyone's information, the list of files that were stated as being changed on the first page is a bit off, there are a lot more changes to SFML than the three listed in Window (Event.hpp and the two Input files).  And I found the answer to my original question on how to programmaticly determine whether xcode is compiling for iphone or regular macosx.

alaterale

  • Guest
Help from any MacOSX coders?
« Reply #44 on: October 29, 2009, 10:07:48 pm »
I've run into another stumbling block in this that I hope someone else can help with.  I ran into mysterious crash problems when attempting to run a basic example on the iphone simulator, when I was sure that the original example provided in the link works (the test.mm file).

Well, it only half works it seems :(  If you download and build-run, yes it does work fine, but I think something is amiss with the project file.  If you clean the project, something that is necessary to running gets deleted (still figuring what thing exactly), and any future attempts at building the project and running end up in an error over GetEvent or something else.  This isn't the same error that I was getting, but I would think that the example could work regardless of having previous object data there (like if you make a new opengl es project and then copy the source files over, it should work).

Could someone with some macosx experience try this out on their end?  I just reformatted and reinstalled 10.5 and I still get it here.  I tried deleting and then readding the SFML libs dir and I still get the same thing.  I don't know much objectivec/uikit so its a bit difficult to debug where this is failing, but my guess is maybe its some initialization thing?